Mathematics Review

Positional Number Systems

Decimal
3210 column  position
149310 = 1*103 + 4*102 + 9*101 + 3*100

3210-1-2 column  position
1493.7610 = 1*103 + 4*102 + 9*101 + 3*100 + 7*10-1 + 3*10-2

Binary
43210 column  position
101102 = 1*24 + 0*23 + 1*22 + 1*21 + 0*20

43210-1-2 column  position
10110.012 = 1*24 + 0*23 + 1*22 + 1*21 + 0*20 + 0*2-1 + 1*2-2

Hexadecimal
3210 column  position
12B416 = 1*163 + 2*162 + 11*161 + 4*160 = 4096 + 512 + 176 + 4 = 478810

3210-1-2 column  position
12B4.0A16 = 1*163 + 2*162 + 11*161 + 4*160 + 0*16-1 + 10*16-2
                  = 4096 + 512 + 176 + 4 + 10/256 = 4788 10/25610

Memorize 0-15 Decimal/Binary/Hexadecimal Conversions

Decimal/Binary/Hexadecimal
Decimal Binary Hexadecimal   Decimal Binary Hexadecimal
0 0000 0 8 1000 8
1 0001 1 9 1001 9
2 0010 2 10 1010 A
3 0011 3 11 1011 B
4 0100 4 12 1100 C
5 0101 5 13 1101 D
6 0110 6 14 1110 E
7 0111 7 15 1111 F

Conversions

From any Base to Decimal - Write in positional form Base 10. See Positional Number Systems above.

From Decimal to any Base - Algorithm can be roughly stated as:

  1. Divide Number by base.
  2. Write Remainder
  3. Set Number = Quotient
  4. Go to 1 if Quotient not equal 0
  5. Result is remainder of each division, written in reverse order produced.
Binary to Hexadecimal - Group right to left by 4's and use memorized table on each group. Hexadecimal to Binary - Use memorized table to convert one hexadecimal digit into corresponding 4 binary digits.

Arithmetic

Binary Definitions
+        0       0        1       1
        +0      +1       +0      +1
         0       1        1      10
-        0        0        1       1
        -0       -1       -0      -1
         0       -1        1       0
*        0        0        1        1
        *0       *1       *0       *1
         0        0        0        1
/        0/0 undefined    1/0 undefined
         0/1 = 0          1/1 = 1
Examples
       10110        10110        1010              1010
       +1011        -1011        *101        101/110010
      100001         1011        1010           -101
                                0000              010
                              +1010              -000  
                               110010              101
                                                  -101
                                                    000
                                                    000

Hexadecimal Arithmetic - Convert digits to decimal, do arithmetic, convert back to hexadecimal.

Examples

 ACE                    167B
+BAD                    -ACE
167B                     BAD
 
 CDE                    1C89
+FAB                    -FAB
1C89                     CDE
 FF                     100
 +1                      -1
100                      FF