90 likes | 100 Views
What is this? How did you know its numerical value?. How did you know?. How do you know that the symbols “1021” meant the number one thousand twenty-one ? Base 10: To represent all numbers less than ten (ie - one, two, three, etc) we choose special symbols (ie - “1”, “2”, “3”, etc)
E N D
What is this? How did you know its numerical value?
How did you know? • How do you know that the symbols “1021” meant the number one thousand twenty-one? • Base 10: • To represent all numbers less than ten (ie - one, two, three, etc) we choose special symbols (ie - “1”, “2”, “3”, etc) • For quantities greater than ten, we combine several symbols and determine the value of the entire string by looking at the positioning of each symbol.
“42” 2 * 1 == 2 + 4 * 10 == 40 forty-two The action starts at 10 … • “42” uses two symbols to represent the quantity forty-two • The position of the “4” symbol (to the left of the “2” symbol) tells us that “4” does not merely represent the quantity four • Instead, these two symbols are read as “fourgroups of ten’s and twogroups of one’s.” If we sum these quantities, we get the number forty-two • Note that our “group sizes” were multiples of ten - which is why this system is called “base 10” Number of groups Size of group
But all of these groupsizes are powers of 10! “1021” 1 * 1 == 1 2 * 10 == 20 0 * 100 == 000 + 1 * 1000 == 1000 One thousand twenty one A larger example
“1021” 1 * 100 == 1 2 * 101 == 20 0 * 102 == 000 + 1 * 103 == 1000 One thousand twenty one A larger example - rewritten This is why it’s called “base 10” Sometimes, a subscript is written below a number to show what its base is: 102110
“102116” 1 * 160 == 1 2 * 161 == 32 0 * 162 == 000 + 1 * 163 == 4096 Four thousand one hundred twenty-nine Alternative Paradigms • We can use other numbers for bases. • “Binary” is “base two”, while “hexadecimal” means “base 16”
“916” 9 * 160 == 9 “1016” nine 0 * 160 == 0 + 1 * 161 == 16 sixteen A need for more symbols • How do you represent the quantity ten in hexadecimal? Solution: Invent a new symbol for ten!
More symbols • What symbols should we use to represent numbers like ten, eleven, twelve, thirteen, fourteen, and fifteen in hexidecimal? • And why don’t we need a symbol for sixteen? • Computer scientists are lazy … so they reused some other commonly used symbols: the English alphabet!
“3FD16” 13 * 160 == 13 15 * 161 == 240 + 3 * 162 == 768 One thousand twenty one All your base 36 “27EA16” 10 * 160 == 10 14 * 161 == 224 7 * 162 == 1792 + 2 * 163 == 8192 Ten thousand two hundred eighteen