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.

conversion of negative real numbers............

Status
Not open for further replies.

pinkyvidya

Member level 2
Joined
Sep 9, 2009
Messages
49
Helped
5
Reputation
10
Reaction score
4
Trophy points
1,288
Location
kerala
Activity points
1,655
Any one please help me in converting a negative real number having both integer and fractional part into binary and tell me a method to multiply a real constant with a negative fractional number in binary....i need conversion in fixed point format.....thanks in advance.....

For eg:
1: how to convert -3.675 into binary
2: multiply 34 and -0.75 in binary
 

One way is to convert it to the floating point notation. Then you´ll have a mantissa (signed or not) and an exponent. Convert the mantissas to positive numbers and keep tracking of the signals. Then you can multiply the mantissas and work on the exponents to get your result. Finally, calculate the final sign. Your results will be in the floating point format. You can work on them to restore them to the binary notation (with some truncation) if you want. This task is very easy to perform if you´re using a C compiler. All you need is to declare your variables as "float" and the final result as "int".
Regards
 

Thanks for the reply....but i need conversion in fixed point format since i am working with fixed size....also i need to know how to use verilog to represent it....
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top