Open In App

ISRO | ISRO CS 2007 | Question 18

The number of digit 1 present in the binary representation of

3 × 512 + 7 × 64 + 5 × 8 + 3

(A)



8

(B)



9

(C)

10

(D)

12

Answer: (B)
Explanation:

3 × 512 + 7 × 64 + 5 × 8 + 3
= (2 + 1)× 512 + (4 + 2 + 1)× 64 + (4 + 1)× 8 + 2 + 1

= 1024 + 512 + 64 x 4 + 64 x 2 + 64 + 32 + 8 + 2 + 1 = 1024 + 512 + 256 + 128 + 64 + 32 + 8 + 2 + 1 As 1024 has ten 0\’s followed by 1, 512 has nine 0\’s followed by 1 and so on.. So, the expression will contain total nine 1\’s and will be represented as 11111101011. Option (B) is correct.

Quiz of this Question
Please comment below if you find anything wrong in the above post

Article Tags :