Topic: Digital Circuits
How many 1's are present in the binary representation of 3 x 512 + 7 x 64 + 5 x 8 + 3?
- A. 8
- B. 9
- C. 10
- D. 11
Answer: B. 9
Explanation: Express the expression in powers of 2: \n3 x 512 = 3 x 2^9 = (2+1)2^9 = 2^10 + 2^9 (2 ones). \n7 x 64 = 7 x 2^6 = (4+2+1)2^6 = 2^8 + 2^7 + 2^6 (3 ones). \n5 x 8 = 5 x 2^3 = (4+1)2^3 = 2^5 + 2^3 (2 ones). \n3 = 2^1 + 2^0 (2 ones). \nTotal ones = 2 + 3 + 2 + 2 = 9.