|
(This chapter is provided to help you understand certain parts of chapter 19, Memory.) Normally, when we use a number such as 110, we understand it to mean "one hundred and ten," but in this chapter you will see how this is not always the case. Hexadecimal numbers We generally use the base 10 (decimal) numbering system, where each digit must be between 0-9; but the "hexadecimal" system (base 16) can also have digits (The hexadecimal numbers in this tutorial are red.)
1 = One 2 = Two 3 = Three 4 = Four 5 = Five 6 = Six 7 = Seven 8 = Eight 9 = Nine A = Ten B = Eleven C = Twelve D = Thirteen E = Fourteen F = Fifteen
11 = Seventeen 12 = Eighteen 13 = Nineteen 14 = Twenty 15 = Twenty one 16 = Twenty two 17 = Twenty three 18 = Twenty four 19 = Twenty five 1A = Twenty six 1B = Twenty seven 1C = Twenty eight 1D = Twenty nine 1E = Thirty 1F = Thirty one 20 = Thirty two 21 = Thirty three 22 = Thirty four 23 = Thirty five 24 = Thirty six . . .
100 = 10 * 10 1000 = 10 * 10 * 10 10000 = 10 * 10 * 10 * 10 . . .
100 = 16 * 16 (256) 1000 = 16 * 16 * 16 (4096) 10000 = 16 * 16 * 16 * 16 (65536) . . .
Binary numbers The "binary" system (base 2) can only have two digits, 0 and 1. Therefore, no binary number has a digit between 2 and 9. (Binary numbers are shown in dark blue.)
1 = One 10 = Two 11 = Three 100 = Four 101 = Five 110 = Six 111 = Seven 1000 = Eight 1001 = Nine 1010 = Ten 1011 = Eleven 1100 = Twelve 1101 = Thirteen 1110 = Fourteen 1111 = Fifteen 10000 = Sixteen 10001 = Seventeen 10010 = Eighteen 10011 = Nineteen 10100 = Twenty . . .
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 . . . 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 . . .
100 = 10 * 10 1000 = 10 * 10 * 10 10000 = 10 * 10 * 10 * 10 . . .
100 = 2 * 2 (4) 1000 = 2 * 2 * 2 (8) 10000 = 2 * 2 * 2 * 2 (16) . . .
Feel free to distribute this tutorial, upload it to your website, link to it from your site, etc. http://www.geocities.com/progsharehouse/qbtutor Mirror: http://development.freeservers.com/qbtutor |