This week we looked at numbers written in different bases.
321
represents the sum of 3 hundreds, 2 tens, and 1 one. In base 10 the places are
..., ten thousands, thousands, hundreds, tens, ones.
Another way to say this is that the places are powers of ten:
..., 10^4, 10^3, 10^2, 10^1, 10^0.
We could also write numbers in base 2, in which case we're only allowed to use the digits 0 and 1. The places in base 2 are powers of two instead of powers of ten:
..., 2^4, 2^3, 2^2, 2^1, 2^0
or in other words,
..., sixteens, eights, fours, twos, ones
In base 2, the string of digits
1101
represents the sum of 1 eight, 1 four, 0 twos, and 1 one for a total of thirteen.
We could also write numbers in base 3, or base 4, or any base we like. Computers use base 2 a lot. They also use base 16, better known as hexadecimal. In base 16 we use the digits from 0 to 9, but we also use letters:
10 A
11 B
12 C
13 D
14 E
15 F
The place values in hexadecimal are powers of 16:
..., 4096, 256, 16, 1
Thus the string
10AF
represents the sum of 1 four-thousand ninety-six, 0 two-hundred fifty-sixes, 10 sixteens, and 15 ones for a total of 4271.
The class solved the following puzzle:
If only you, I, and DEAD people know hexadecimal, how many people know hexadecimal?
No comments:
Post a Comment