IS:112 SOFTWARE & HARDWARE CONCEPTS

STUDY GUIDE - NUMBER SYSTEMS

GENERAL

 

 

DECIMAL SYSTEM - BASE 10

10,000      1,000      100      10      1

 

What value does each of the following decimal numbers represent?

8

9       3      2

1          4      6      7

3               2         0       9      4

 

 

BINARY SYSTEM - BASE 2

256      128      64      32       16      8      4      2      1

What value does each of the following binary numbers represent?

1      0

1      0      1

1      0      1      1

0     0      1      1      0

1      0      0      0      1

1      1       1      1      0      0

1        0      0      0      1      1      0

1        1        1      1      1      1      1      1

HEXADECIMAL SYSTEM - BASE 16

4096      256      16      1

 

What value is represented by the following hexadecimal numbers?

8

B

4      2

A      5

1       D      F

A      B      C

1           1       1      E

 

CONVERTING FROM ONE SYSTEM TO ANOTHER

Binary to Decimal:

Use expansion method of multiplying the digit and the positional weight for all digits and summing.

(This is the method used previously in this handout)

 

Hexadecimal to Decimal:

Use expansion method of multiplying the digit and the positional weight for all digits and summing.

(This is the method used previously in this handout)

 

Decimal to Binary:

Repeatedly divide the decimal number (and subsequent quotients) by two until the quotient is zero; use remainders, with the first remainder being placed in the rightmost (low-order or ones) position.

Examples: Divide by two until quotient is 0:

2)37                                 2)248

2)18 R 1                          2)124 R 0

  2)9 R 0                           2) 62 R 0

  2)4 R 1                           2) 31 R 0

  2)2 R 0                           2) 15 R 1

  2)1 R 0                           2) 7 R 1

    0 R 1                            2) 3 R 1

                                         2) 1 R 1

                                             0 R 1

Using remainders (first is low-order):

1 0 0 1 0 1
1 1 1 1 1 0 0 0

Decimal to Hexadecimal:

Repeatedly divide the decimal number (and subsequent quotients) by sixteen until the quotient is zero; use remainders, with the first remainder being placed in the rightmost (low-order or ones) position.

Examples: Divide by 16 until quotient is 0:

16)48                          16)243

16) 3 R 0                      16) 15 R 3

      0 R 3                               0 R 15 = F

Using the remainders (first is low-order)

3 0
F 3

 

Binary to Hexadecimal:

Group binary digits by four (starting at the rightmost position); convert each group into a single hex digit; add leading zeros if necessary.

Examples: 1 0 1 1 0 0 0 1 1 0 0 1 1 0 0

                  1011    0001    0100   1100

                     B          1          4         C

 

 

Hexadecimal to Binary:

Convert each hex digit (starting at the rightmost position) into four binary digits; use all four positions for each hex digit to maintain binary position.

Examples:       4       A       C       2       A       0

                    0100 1010 1100 0010 1010 0000
                    0100101011000010101000000

BINARY ADDITION/SUBTRACTION

Four basic addition results:      0      0 1      1

                              +0 +1 +0 +1

0 1 1 10

 

Examples: 1001 1100 1111

+ 101 + 101 + 101

1110 10001 10100

 

Four basic subtraction results: 0 1 1 (1)0 borrow

-0 -0 -1 - 1

1 1 0 1

Remember when subtracting, the value borrowed (if any) is 2 (decimal) or 10 (binary)

 

Examples: 1011 1010 1001 1000

- 10 - 10 - 10 - 1

1001 1000 111 111

 

HEXADECIMAL ADDITION/SUBTRACTION

There are many hexadecimal combinations/results, so each will not be listed.

 

When adding in hexadecimal, the value carried (if any) is 16 (decimal) or 10 (hexadecimal)

 

Examples: 1 6 3 1 A 8

+ 9 7 + B B

1 F A 2 6 3

 

 

When subtracting in hexadecimal, the value borrowed (if any) is 16 (decimal) or 10 (hexadecimal)

 

Examples: 5 9 F 4 6 0 2 C A

- 2 C - E - E D

5 7 3 4 5 2 1 D D