Chapter 2
Chapter 2
2
Computer Fundamentals & Programming in C
Chapter
2.2 CONVERSIONS
Conversions of Decimal to Binary
The method that is used for converting of decimals into binary is known as the remainder
method. We use the following steps in getting the binary number :
(a) Divide the decimal number by 2.
(b) Write the remainder (which is either 0 or 1) at the right most position.
(c) Repeat the process of dividing by 2 until the quotient is 0 and keep writing the remainder
after each step of division.
(d) Write the remainders in reverse order.
2 45 Remainder
2 22 1
2 11 0
2 5 1
2 2 1
2 1 0
0 1
8 45 Remainder
8 5 5
8 0 5
Binary Number 1 0 1 1 0 1
Solved Multiplication 32 0 8 4 0 1
Binary Number 1 0 1 1 0 1 1 1
Octal Number 5 5
Octal Number 1 5 5
Octal Number 5 5
Wt. of each bit 81 80
Weighted Value 5×8 5 × 80
Solved Multiplication 40 5
Thus, (55)8 = 40 + 5 = 45
Octal Number 5 5 6
Wt. of each bit 81 80 8–1
Weighted Value 5×8 5 × 80 6 × 8–1