Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

algorithm for Q12 format

Status
Not open for further replies.

rmreddy

Member level 3
Joined
Feb 20, 2007
Messages
65
Helped
2
Reputation
4
Reaction score
1
Trophy points
1,288
Activity points
1,718
q12 format

hi all,
can anyone share the material or algorithm for converting a flaoting point value in C to a fixed point Q12 - format, as we do in a DSP processor.

i want to know the logic behind how it works ....
 

q12 fixed point

Q12 format for fixed-point numbers means 12 fractional bits 3 integer bits and 1 sign bit. Say you have number x as floating-point (within +_1.0 range), xq12 is given as;

xq12 = round(x*2^12);

I hope it helps.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top