Chapter 0 Exercise Set 0: Decimal, Binary, Octal and HexΒΆ

We will adopt the convention from the Intel 8080 Assembly Language Programming Manual, and append B to a number to indicate binary, D for decimal, Q for octal (the manual also uses O, but that is visually difficult to distinguish from 0, zero, so we will avoid that), and H for hexadecimal.

Note

When the base a number can be readily inferred from context, these suffixes will often be omitted.

  1. Convert each of the following octal values to 8-bit binary strings.

    1. 072Q

    2. 200Q

    3. 107Q

    4. 303Q

    5. 072Q

    6. 111Q

    7. 303Q

  2. Convert each of the following octal from the previous exercise to hexidecimal.

  3. Convert each of the following binary values to octal, hex and decimal.

    1. 00 111 010B

    2. 11 111 111B

    3. 01 000 000B

    4. 00 100 100B

    5. 11 000 011B

  4. Convert each of the following hex values to binary, octal, and decimal.

    1. 13H

    2. 2AH

    3. 3AH

    4. 76H

    5. C3H