Elitmus
Exam
Numerical Ability
Arithmetic
How many 1s in the binary representation of 512*64+255+3?
options: a)11 b)9 c)13 d) don't remember
Asked on 25th may 2014
Read Solution (Total 8)
-
- 512*64 + 255 + 3
= 2^9 * 2^6 + (2^8 - 1)+ 2 + 1
= 2^15 + 2^8 + 2^1
= (1000000100000010)2
no. of 1's = 3
no. of 0's = 13 - 10 years agoHelpfull: Yes(35) No(0)
- 512*64 = 32768
32768 => 2^15 = 1000 0000 0000 0000 (Binary form of 2^15) => no. of 1's is (1)
(ie) [1*2^15 + 0*2^14 + 0*2^13 + 0*2^12 +... ]
255 => 1111 1111 [1*2^7 + 1*2^6 + 1*2^5 + 1*2^4 + 1*2^3 + 1*2^2 + 1*2^1 + 1*2^0]
No. of 1's is (8)
3 => 0011 [0*2^3 + 0*2^2 + 1*2^1 + 1*2^0 = 3]
No. of 1's is (2)
So totally (1)+(8)+(2) = 11
Ans : (a) 11 - 10 years agoHelpfull: Yes(6) No(5)
- 3 consists. 2 (1's)
255. -------- 8
512*64--------- 1
Total=11 - 10 years agoHelpfull: Yes(1) No(2)
- 512*64+255+3
512*64=2^9*2^6
=2^15
255=128+64+32+16+8+4+2+1
=2^7+2^6+2^5+2^4+2^3+2^2+2^1+2^0
3=2+1
=2^1+2^0
On Adding Them
2^15+2^7+2^6+2^5+2^4+2^3+2^2+2(2^1)+2(2^0)
binary no=111111122
no of 1's is 7 - 10 years agoHelpfull: Yes(0) No(3)
- 512*64 = 32768
32768 => 2^15 = 1000 0000 0000 0000 (Binary form of 2^15) => no. of 1's is (1)
(ie) [1*2^15 + 0*2^14 + 0*2^13 + 0*2^12 +... ]
255 => 1111 1110 [1*2^7 + 1*2^6 + 1*2^5 + 1*2^4 + 1*2^3 + 1*2^2 + 1*2^1 + 0*2^0]
No. of 1's is (7)
3 => 0011 [0*2^3 + 0*2^2 + 1*2^1 + 1*2^0 = 3]
No. of 1's is (2)
So totally (1)+(7)+(2) = 10
Ans : 10 - 10 years agoHelpfull: Yes(0) No(4)
- question was little different,the expression is not right
- 10 years agoHelpfull: Yes(0) No(0)
- Actual question is 512+255×64+3
- 10 years agoHelpfull: Yes(0) No(0)
- Actual question is 1024+512*64+255+3
- 10 years agoHelpfull: Yes(0) No(0)
Elitmus Other Question