raja.mugavai Posted July 31, 2014 Posted July 31, 2014 (edited) How to convert this following fractional decimal to binary?? 1/2 , 1/4, 1/8 Kindly help me... Edited July 31, 2014 by raja.mugavai
tarimshahab Posted August 1, 2014 Posted August 1, 2014 (edited) 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=32 ) 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.52 ) 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.04 ) 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 August 1, 2014 by tarimshahab 1
faslan Posted September 2, 2014 Posted September 2, 2014 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
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now