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

Answer

(a) 23

Converting to binary:

2QuotientRemainder
2231 (LSB)
2111
251
220
211 (MSB)
 0 

Therefore, (23)10 = (10111)2

Converting to octal:

8QuotientRemainder
8237 (LSB)
822 (MSB)
 0 

Therefore, (23)10 = (27)8

(b) 100

Converting to binary:

2QuotientRemainder
21000 (LSB)
2500
2251
2120
260
231
211 (MSB)
 0 

Therefore, (100)10 = (1100100)2

Converting to octal:

8QuotientRemainder
81004 (LSB)
8124
811 (MSB)
 0 

Therefore, (100)10 = (144)8

(c) 145

Converting to binary:

2QuotientRemainder
21451 (LSB)
2720
2360
2180
291
240
220
211 (MSB)
 0 

Therefore, (145)10 = (10010001)2

Converting to octal:

8QuotientRemainder
81451 (LSB)
8182
822 (MSB)
 0 

Therefore, (145)10 = (221)8

(d) 19

Converting to binary:

2QuotientRemainder
2191 (LSB)
291
240
220
211 (MSB)
 0 

Therefore, (19)10 = (10011)2

Converting to octal:

8QuotientRemainder
8193 (LSB)
822 (MSB)
 0 

Therefore, (19)10 = (23)8

(e) 121

Converting to binary:

2QuotientRemainder
21211 (LSB)
2600
2300
2151
271
231
211 (MSB)
 0 

Therefore, (121)10 = (1111001)2

Converting to octal:

8QuotientRemainder
81211 (LSB)
8157
811 (MSB)
 0 

Therefore, (121)10 = (171)8

(f) 161

Converting to binary:

2QuotientRemainder
21611 (LSB)
2800
2400
2200
2100
251
220
211 (MSB)
 0 

Therefore, (161)10 = (10100001)2

Converting to octal:

8QuotientRemainder
81611 (LSB)
8204
822 (MSB)
 0 

Therefore, (161)10 = (241)8