Number Systems


The number forty-two can be written in a variety of ways:


Notation System Symbols Used
Base 10 (decimal) 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
Base 8 (octal) 0, 1, 2, 3, 4, 5, 6, 7
Base 2 (binary) 0, 1
Base 16 (hexadecimal) 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F





Counting in Hexadecimal


Dec. Hex. Dec. Hex. Dec. Hex. Dec. Hex.
0 0 11 B 22 16 33 21
1 1 12 C 23 17 34 22
2 2 13 D 24 18 35 23
3 3 14 E 25 19 36 24
4 4 15 F 26 1A 37 25
5 5 16 10 27 1B 38 26
6 6 17 11 28 1C 39 27
7 7 18 12 29 1D 40 28
8 8 19 13 30 1E 41 29
9 9 20 14 31 1F 42 2A
10 A 21 15 32 20 43 2B

 


Converting From Other Bases to Base 10


Base 16 to Base 10:

   1AC = 1 × 162 + A × 161 + C × 160

           = 1 × 162 + 10 × 161 + 12 × 160

           = 256 + 160 + 12

           = 428
 
 

   FF2E05 = F × 165 + F × 164 + 2 × 163 + E × 162 + 0 × 161 + 5 × 160

                = 15 × 165 + 15 × 164 + 2 × 163 + 14 × 162 + 0 × 161 + 5 × 160

                = 15,728,640 + 983,040 + 8,192 + 3,584 + 0 + 5

                = 16,723,461
 
 

Base 5 to Base 10:

   12034 = 1 × 54 + 2 × 53 + 0 × 52 + 3 × 51 + 4 × 50

             = 625 + 250 + 0 + 15 + 4

             = 894
 
 

Base 2 to Base 10:

   110101 = 1 × 25 + 1 × 24 + 0 × 23 + 1 × 22 + 0 × 21 + 1 × 20

               = 32 + 16 + 0 + 4 + 0 + 1

               = 53
 
 


Converting From Base 10 to Other Bases


Base 10 to Base 16:

     1 ÷ 16 = 0 remainder 1     >>>   1         =  1AC
   26 ÷ 16 = 1 remainder 10   >>>   A
428 ÷ 16 = 26 remainder 12  >>>   C
 
 

Base 10 to Base 5:

      3 ÷ 5 = 0 remainder 3                          =  3203
    17 ÷ 5 = 3 remainder 2
  85 ÷ 5 = 17 remainder 0
428 ÷ 5 = 85 remainder 3
 
 

Base 10 to Base 2:

        1 ÷ 2 = 0 remainder 1                        =  110011000
        3 ÷ 2 = 1 remainder 1
        6 ÷ 2 = 3 remainder 0
      12 ÷ 2 = 6 remainder 0
    25 ÷ 2 = 12 remainder 1
    51 ÷ 2 = 25 remainder 1
  102 ÷ 2 = 51 remainder 0
214 ÷ 2 = 102 remainder 0
428 ÷ 2 = 214 remainder 0