In: Computer Science
Convert the following decimal number into (a) binary and (b) Octal (SHOW ALL STEPS)
205.75
(a) Binary :
Theory:An easy method of converting decimal to binary number equivalents is to write down the decimal number and to continually divide-by-2 (two) to give a result and a remainder of either a “1” or a “0” until the final result equals zero. This is done for the integer part.But for the fractional part, we just have to multiply-by-2 and decimal carry of either "1" or "0" untill the final result equals to zero or the recursion near to a point
Number : 205.75
1)Integer part:205
Divide by 2 continously
Result: Remainder:
125 1 (LSB)
62 1
31 0
15 1
7 1
3 1
1 1
0 1 (MSB)
2)Decimal part : 0.75
Multiply with 2 continously
Result Decimal Carry
0.50 1(Decimal bit starts and goes downward)
0.0 1
Therefore.now the binary digit is (11111011.11)2
(b) Octal :
Theory:An easy method of converting decimal to binary number equivalents is to write down the decimal number and to continually divide-by-8 (eight) to give a result and a remainder until the final result equals zero. This is done for the integer part.But for the fractional part, we just have to multiply-by-8 and decimal carry untill the final result equals to zero or the recursion near to a point
Number : 205.75
1)Integer part:205
Divide by 8 continously
Result: Remainder:
25 5 (LSB)
3 1
0 3(MSB)
2)Decimal part : 0.75
Multiply with 8 continously
Result Decimal Carry
0.00 6(Decimal bit starts and goes downward)
Therefore.now the octal digit is (315.6)8