Binary Numbers
Given a binary number, add up the
powers of 2 corresponding to 1s
0100 1100
0x2
0
= 0
0x2
1
= 0
1x2
2
= 4
1x2
3
= 8
0x2
4
= 0
0x2
5
= 0
1x2
6
= 64
0x2
7
=
0
= 76