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.

How do I convert a decimal fraction into binary fraction?

Status
Not open for further replies.

alangs

Member level 3
Member level 3
Joined
Feb 5, 2010
Messages
57
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,288
Location
india
Activity points
1,681
How do I convert the decimal fraction (0.859375)10 into a binary fraction???
 

0.859375 isn't a fraction. There is an example of conversions for numbers less than unity here:

**broken link removed**

Keith.
 

Multiply by 2 as the link above.


But 0.859375 = 55/64 then just shift right 55 binary 6 times.

0.859375 = 0.110111
 

An easy way is to convert to hex first and then convert hex to binary.
Multiply by 16
write down the integer portion in hex (12 = C, 14 = E, etc)
subtract the integer portion from the result
multiply by 16
write down the integer portion in hex
continue until the fractional portion = zero, or you have enough accuracy.
For your example:
.859375 X 16 = 13.75 (Write down "D")
13.75 -13 = .75
.75 X 16 = 12 Write down "C")
The fractional part is now zero, so you're done
The answer in hex is DC = 11011100 binary

If you have a scientific calculator with a "Hex" mode, and you are satisfied with 4 hex digits of accuracy, do the following:
In decimal mode, multiply the fraction by 65536.
.859375 X 65536 = 56320
Switch to "Hex" mode.
DC00 is displayed.
.
Remember, if you are using twos complement representation, the binary result must be shifted right 1 place to make room for the sign bit.
Regards,
Kral
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top