Decimal to binary
Any decimal number can be converted to its binary equivalent.
- For integers ,conversion is obtained just by dividing number continuously by 2 and keeping track of remainders obtained .
( 26 )10 = ( ? )2
Divide 26 by 2,
quotient obtained from this division will become dividend in next step,
dividend =13 ( rem=0 )
again, divide it with 2.( Keeping track of remainders),
dividend = 6 ( rem=1)
repeat the same process until dividend become less than the divisor.
dividend =3 ( rem=0)
dividend =1 ( rem=1)
now, dividend =1 is less than 2
Stop dividing when dividend become less than the divisor.
Now write in following sequence,
First write the last dividend in left and then write remainders obtained in reverse order .
As shown below,
(last dividend is 1 & remainders in reverse order)
This will be the final answer i. e. ( 11010 )2
answer is ( 1 1 0 1 0 )2
While for fractional part ,the conversion is done by continuous multiplication by 2 and keeping track of the integers generated.
See in given example,
( 0.625 )10 = ( ? )
0.625 × 2 = 1.25 , integer obtained is 1
now,multiply the fractional part obtained with 2
0.25 × 2 = 0.5 ,integer obtained 0
again, same process,
0.5 × 2 = 1 ,integer obtained 1
now, we don’t have any fractional part left .So stop multiplying here.
Next step is , write down the integer obtained in the sequence they obtained after radix point ,as follows:
= ( 0.101 )2
This is the way we can convert a decimal number into its binary equivalent.
follow us at youtube raulstutorial digital electronics