MBA
Exam
How many times would zero be used while writing all the natural numbers from 1 to 63 in the Binary System?
(a) 32 (b) 80 (c) 111 (d) 129 1) a 2) b 3) c 4) d
Read Solution (Total 1)
-
- How many times would zero be used while writing all the natural numbers from 1 to 63 in the Binary System?
whats the approach??
For 1 to 63 in binary, the number wud have 6 digits
xxxxxx
Case 1 = xxxxx0
To find the number of such combinations, any number preceding 0 can be either 1 or 0 but all of them cannot be zero at the same time
Hence total number of such numbers is 2^5-1 = 31
Case 2 -xxxx0x
The 4 places preceeding zero can be anything but cannot be all zero
hence 2^4-1 = 15 and the last place can be 0/1 = 2 ways
total 15*2 = 30 ways
Similary, the cases would be
(2^3-1)*4= 28
(2^2-1)*8 = 24
(2-1)*16 = 16
Hence total number of zeroes = 31+30+28+24+16 = 129 - 8 years agoHelpfull: Yes(0) No(0)
MBA Other Question