awesome

The Gateway to Computer Science Excellence

First time here? Checkout the FAQ!

x

+18 votes

The number of $1$'s in the binary representation of $(3*4096 + 15*256 + 5*16 + 3)$ are:

- $8$
- $9$
- $10$
- $12$

+56 votes

Best answer

I suggest following approach , here we can clearly see that numbers are getting multiplied by powers of 16. So this is nothing but Hexadecimal number in disguise.

$(3\times 4096 + 15 \times 256 + 5 \times 16 + 3) = (3F53)_{16} = (0011111101010011)_2$ which has total $2 + 4 + 2 + 2 = 10$ 1's

Correct Answer: $C$

$(3\times 4096 + 15 \times 256 + 5 \times 16 + 3) = (3F53)_{16} = (0011111101010011)_2$ which has total $2 + 4 + 2 + 2 = 10$ 1's

Correct Answer: $C$

+29 votes

We have, 3*4096 + 15*256 + 5*16 + 3

= (2+1)*2^{12 }+ (8+4+2+1) * 2^{8} + (4+1)*2^{4 }+ 2 + 1

= 2^{13} + 2^{12 }+ 2^{11 }+ 2^{10 }+ 2^{9 }+ 2^{8} + 2^{6} + 2^{4} + 2 + 1

= 1 1 1 1 1 1 1 1 1 1

= 10 1's So, **OPTION (C) .. **

+24 votes

$3 = (11)_2$

$3\times 4096 = 3\times (2^{12}) = (11)_2<< 12 = (11000000000000)_2$

Similarly, $15 \times 256 = (1111)_2 << 8 = (111100000000)_2$ and $5 \times 16 = (101)_2 << 4 = (1010000)_2$

So, $3\times 4096 + 15 \times 256 + 5\times 16 + 3 = (11111101010011)_2$

Number of 1's = 10.

$3\times 4096 = 3\times (2^{12}) = (11)_2<< 12 = (11000000000000)_2$

Similarly, $15 \times 256 = (1111)_2 << 8 = (111100000000)_2$ and $5 \times 16 = (101)_2 << 4 = (1010000)_2$

So, $3\times 4096 + 15 \times 256 + 5\times 16 + 3 = (11111101010011)_2$

Number of 1's = 10.

- All categories
- General Aptitude 1.8k
- Engineering Mathematics 7.3k
- Digital Logic 2.9k
- Programming & DS 4.9k
- Algorithms 4.3k
- Theory of Computation 6k
- Compiler Design 2k
- Databases 4.1k
- CO & Architecture 3.4k
- Computer Networks 4.1k
- Non GATE 1.4k
- Others 1.4k
- Admissions 596
- Exam Queries 577
- Tier 1 Placement Questions 23
- Job Queries 72
- Projects 18

49,530 questions

54,139 answers

187,354 comments

71,068 users