http://fishcaro.crosswinds.net/day_25_number_systems.htm
INDEX CARDS #25:
THE DECIMAL NUMBER SYSTEM (25a)Any time you have ten of anything, it gets bundled up into a bigger pile. Got ten piles of 10? Bundle them up into a pile of one hundred. Got ten piles of hundreds? Bundle them up into a pile of one thousand. And so on. Hence the origin of our DECIMAL (base ten) number system. In the base TEN number system, TEN distinct digits are used: 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. These ten digits are used to represent any number. The position of each digit determines its contribution. For example, the decimal number "364" (read as "three hundred sixty-four") represents 3 hundreds, 6 tens, and 4 ones: |
THE BINARY NUMBER SYSTEM (25b)Got two piles of 2? Bundle them up into a pile of 4. Got two piles of 4? Bundle them up into a pile of 8. Continuing in this way, we get piles of sizes: 21=2, 22=4, 23=8, 24=16, 25=32, 26=64, 27=128, 28=256, and so on. In the base TWO number system, TWO distinct digits are used: 0 and 1 . These two digits are used to represent any number. The position of each digit determines its contribution. For example, 364 objects can be bundled up into: 1 pile of 256, 1 pile of 64, 1 pile of 32, 1 pile of 8, and 1 pile of 4. Hence, the binary representation of 364 is:
|
READING NUMBERS IN OTHER BASES (25c)DON'T put commas into the number: "101,101,100" and DON'T READ IT AS "one hundred one million, one hundred one thousand, one hundred." These conventions are reserved for decimal numbers, and this isn't a decimal number. You can express any number in any base that you'd like: just group accordingly. Numbers expressed in base two can get VERY LONG. You already saw how long the name for 364 is: 364 (base ten) = 101101100 (base two). This gets rather tedious. When you have a number expressed in base two, you already have information about "piles" of sizes 8 and 16. So, it's easy to convert from base two (binary) to base eight (OCTAL) and base sixteen (HEXADEMICAL). Consequently, the octal and hexadecimal systems are frequently used in connection with computers. |
SPECIAL SYMBOLS FOR BASE SIXTEEN (25d)HEX=6 (think "hexagon"); DECIMAL=10; 6 + 10 = 16. So, hexadecimal seems an appropriate name. In the base SIXTEEN number system, SIXTEEN distinct "digits" are required. This poses a bit of a problem, since only ten are readily available: 0 through 9. This leaves us needing six additional "digits." Here's what was chosen: A is used to represent ten; B is used to represent eleven; C is used to represent twelve; D is used to represent thirteen; E is used to represent fourteen; F is used to represent fifteen.These sixteen symbols (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F) can now be used to represent any number. The position of each symbol determines its contribution. |
HEXADECIMAL NUMBERS (25e)For example, 364 objects can be bundled up into: 1 pile of 256, 6 piles of 16, and twelve ones. Hence, the hexadecimal representation of 364 is:
Read this as: "one six C, base sixteen" or "hexadecimal; one six C."
How do I know when I'm being given a hexadecimal number? Hexadecimal
numbers used in HTML are preceded with the symbol "#".
|
BINARY TO HEXADECIMAL and more (25f)To convert from binary to octal, use the "group by threes" technique. For example, 10111101 (base two) = 010 111 101 (break into groups of three; add leading zeros) = 2 7 5 (convert each group of three into octal) = 275 (base eight).To convert from binary to hexadecimal, use the "group by fours" technique. For example, 10111101 (base two) = 1011 1101 (break into groups of four) = B D (convert each group of four into hexadecimal) = BD (base sixteen).Thus, 10111101 (base two) equals 275 (base eight) equals BD (base sixteen). |
Printable version of Index Card 25a
Printable version of Index Card 25b
Printable version of Index Card 25c
Printable version of Index Card 25d
Printable version of Index Card 25e
Printable version of Index Card 25f
WORKSHEET #25:
ASSIGNMENT #25: