Open In App

ISRO | ISRO CS 2015 | Question 9

Like Article
Like
Save
Share
Report

The number of 1’s in the binary representation of (3*4096 + 15*256 + 5*16 + 3) are:
(A) 8
(B) 9
(C) 10
(D) 12


Answer: (C)

Explanation:

Given expression = 3*4096 + 15*256 + 5*16 + 3
= (2 + 1)*4096 + (8 + 4 + 2 + 1)*256 + (4 + 1)*16 + 2 + 1
= (2 + 1)*212 + (23 + 22 + 2 + 1 )*28 + (22 + 1)*24 + 2 + 1
= (213 + 212) + (211 + 210 + 29 + 28) + (26 + 24) + 2 + 1
As 213 is 1 followed by 12 zeros, 212 is 1 followed by 11 zeros and so on,
adding all these numbers give total 10 one's

So, option (C) is correct.

Quiz of this Question


Last Updated : 20 Nov, 2018
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads