(A)Consider the set of all possible positive binary whole numbers each having exactly twelve digits consisting of precisely six 1's and six 0's. The first digit cannot be 0 . Determine the sum of all these numbers in the decimal notation.
(B)Consider the set of all possible positive binary whole numbers each having exactly fourteen digits consisting of precisely seven 1's and seven 0's. The first digit cannot be 0. Determine the sum of all these numbers in the decimal notation.
(In reply to
solution (spoiler) by Charlie)
Slight correction to Charlie's solution to Part 2.
Note that for Part 1, they are 12 digit binary numbers, so:
"All have their highorder bit on, with a value of 2^11=2048."
(I also got 1,376,046 for Part 1)
In Part 2, they are 14 digit numbers, it should be:
"All have their highorder bit on, with a value of 2^13=8192."
and there are 13 (rather than 12) places you may or may not have a bit.
So the total is 1716*8192 + 792*8191= 20,544,744
<table cellspacing="0" border="0"><tbody><tr><td valign="bottom" height="26" align="right">
</td>
</tr>
</tbody></table>

Posted by Larry
on 20191110 10:07:56 