CBSE Class 11 Computer Science
Question 7 of 91
Data Representation — Question 7
Back to all questions 7
Question Question 7
Convert the following decimal numbers to binary and octal :
(a) 23
(b) 100
(c) 145
(d) 19
(e) 121
(f) 161
(a) 23
Converting to binary:
| 2 | Quotient | Remainder |
|---|---|---|
| 2 | 23 | 1 (LSB) |
| 2 | 11 | 1 |
| 2 | 5 | 1 |
| 2 | 2 | 0 |
| 2 | 1 | 1 (MSB) |
| 0 |
Therefore, (23)10 = (10111)2
Converting to octal:
| 8 | Quotient | Remainder |
|---|---|---|
| 8 | 23 | 7 (LSB) |
| 8 | 2 | 2 (MSB) |
| 0 |
Therefore, (23)10 = (27)8
(b) 100
Converting to binary:
| 2 | Quotient | Remainder |
|---|---|---|
| 2 | 100 | 0 (LSB) |
| 2 | 50 | 0 |
| 2 | 25 | 1 |
| 2 | 12 | 0 |
| 2 | 6 | 0 |
| 2 | 3 | 1 |
| 2 | 1 | 1 (MSB) |
| 0 |
Therefore, (100)10 = (1100100)2
Converting to octal:
| 8 | Quotient | Remainder |
|---|---|---|
| 8 | 100 | 4 (LSB) |
| 8 | 12 | 4 |
| 8 | 1 | 1 (MSB) |
| 0 |
Therefore, (100)10 = (144)8
(c) 145
Converting to binary:
| 2 | Quotient | Remainder |
|---|---|---|
| 2 | 145 | 1 (LSB) |
| 2 | 72 | 0 |
| 2 | 36 | 0 |
| 2 | 18 | 0 |
| 2 | 9 | 1 |
| 2 | 4 | 0 |
| 2 | 2 | 0 |
| 2 | 1 | 1 (MSB) |
| 0 |
Therefore, (145)10 = (10010001)2
Converting to octal:
| 8 | Quotient | Remainder |
|---|---|---|
| 8 | 145 | 1 (LSB) |
| 8 | 18 | 2 |
| 8 | 2 | 2 (MSB) |
| 0 |
Therefore, (145)10 = (221)8
(d) 19
Converting to binary:
| 2 | Quotient | Remainder |
|---|---|---|
| 2 | 19 | 1 (LSB) |
| 2 | 9 | 1 |
| 2 | 4 | 0 |
| 2 | 2 | 0 |
| 2 | 1 | 1 (MSB) |
| 0 |
Therefore, (19)10 = (10011)2
Converting to octal:
| 8 | Quotient | Remainder |
|---|---|---|
| 8 | 19 | 3 (LSB) |
| 8 | 2 | 2 (MSB) |
| 0 |
Therefore, (19)10 = (23)8
(e) 121
Converting to binary:
| 2 | Quotient | Remainder |
|---|---|---|
| 2 | 121 | 1 (LSB) |
| 2 | 60 | 0 |
| 2 | 30 | 0 |
| 2 | 15 | 1 |
| 2 | 7 | 1 |
| 2 | 3 | 1 |
| 2 | 1 | 1 (MSB) |
| 0 |
Therefore, (121)10 = (1111001)2
Converting to octal:
| 8 | Quotient | Remainder |
|---|---|---|
| 8 | 121 | 1 (LSB) |
| 8 | 15 | 7 |
| 8 | 1 | 1 (MSB) |
| 0 |
Therefore, (121)10 = (171)8
(f) 161
Converting to binary:
| 2 | Quotient | Remainder |
|---|---|---|
| 2 | 161 | 1 (LSB) |
| 2 | 80 | 0 |
| 2 | 40 | 0 |
| 2 | 20 | 0 |
| 2 | 10 | 0 |
| 2 | 5 | 1 |
| 2 | 2 | 0 |
| 2 | 1 | 1 (MSB) |
| 0 |
Therefore, (161)10 = (10100001)2
Converting to octal:
| 8 | Quotient | Remainder |
|---|---|---|
| 8 | 161 | 1 (LSB) |
| 8 | 20 | 4 |
| 8 | 2 | 2 (MSB) |
| 0 |
Therefore, (161)10 = (241)8