Last Time We studied representations of numbers and base numbering systems. We focused on three imporatant bases in the computing world, 2, 8, and 16.
Base numbering systems have an alpahet.
- {0,1} binary numbers, base 2
- {0,1,2,3,4,5,6,7} octal numbers, base 8
- {0,1,2,3,4,5,6,7,A,B,C,D,E,F} hexadecimal, base 16
We learned about money and the "greedy algorithm", which says, "Use the largest possible bill and use as many as you can. Keep doing this down through the denominations.
In base b, the "bills" are
1, b, b2, b3, ......
82 0b1010010 2 16 64 82 Octal 0b1 010 010 1 2 2 0b 101 0010 5 2 0x112 1 1 2 0001 0001 0010 0b100010010