Jump to content

how to convert fractional decimal to binary ?

Featured Replies

How to convert this following fractional decimal to binary??

 

1/2 , 1/4, 1/8

 

Kindly help me...

Edited by raja.mugavai

I'm not sure if you want binary fractions, or a binary number with a 'decimal' point.

If you want a binary fraction, then just change the numerator and denominator into binary. Since 1(dec)=1(bin) and 2(dec)=10(bin):
1/2(dec) = 1/10(bin)

Similarily 1/4(dec)=1/100(bin).

If you want to find the equivalent binary number with a 'decimal' point, then there are two ways to do it:

First way using the number 3/4=0.75 as an example.
1 ) Multiply the dec# by a power of two so that it is integral: ex. 0.75*2^2=3
2 ) Convert this integral number into binary: ex. 3(dec)=11(bin)

3 ) Now divide this new binary number by the same power of 2, you multiplied the decimal one by. Since you are in binary, dividing by a power of two is just moving the 'decimal' point: ex 11(bin) / 2^2(dec) = 0.11 (moving the decimal twice to the left).
You have your answer. 3/4=0.75(dec)= 0.11(bin)

Second way using the same example

1 ) Multiply decimal fraction by 2: ex. 0.75*2= 1.5
2 ) Take the number in the unit place (one's place): ex. in this case it would be a 1, this is the first digit after the decimal point for the binary equivalent. ie. 0.75(dec)=0.1????(bin)

3 ) Take the fraction part of the new decimal number and multiply by two again: ex. 0.5*2= 1.0
4 ) Again take the number in the units place as the next binary number: so 0.75(dec)=0.11???(bin)

5 ) Keep repeating this until you get a 0 as the fraction part of the decimal number, or until the decimal part starts repeating: in this case we got a 0 in the fractions part of the decimal number 1.0, so we stop.

If the fraction part starts repeating you know that the binary fraction repeats too.

Edited by tarimshahab

  • 1 month later...

Ex- 0.25 dec ---> bin

 

0.25*2 =0.5 / take 0

0.5*2=1.0 / take1 (0 left so no more multiply )

 

 

 

answer 0.01 bin

Archived

This topic is now archived and is closed to further replies.

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.