Number Bases

Robert P. Webber and Don Blaheta, Longwood University

Binary and Hexadecimal

Why are we working on this? In our ultimate goal of representing all data, we need to take everything we've figured out how to represent as numbers---and things that were numbers in the first place---and put it in a form the computer can use. For pure human use, decimal is convenient, but binary form will work best for computers. Hexadecimal is a compromise: easily converted to binary for computer use but somewhat easier for humans to work with. Skills in this section: Translate freely among bases 2, 10, and 16 Concepts: Data representation, Classic algorithms, Limitations of representation

See the PDF version of this document.

Exercises

  1. Convert the binary numbers to decimal.
    1. 10110
    2. 11100111
    3. 101.011
  2. Convert the decimal numbers to binary.
    1. 86
    2. 131
    3. 35.25
  3. Convert the base 10 numbers to hexadecimal.
    1. 68
    2. 543
    3. 127
  4. Convert the hexadecimal numbers to decimal.
    1. 10D
    2. 345
    3. BEEF
  5. Convert the base 16 numbers to binary.
    1. 53
    2. 94B0
    3. 3ED
  6. Convert the binary numbers to hexadecimal.
    1. 1010 0101
    2. 0011 0000 1101 1111
    3. 1001 0111 0110 1000
  7. Convert the base 10 number 36 to
    1. binary
    2. hexadecimal
  8. Convert the binary number 1000 1010 to
    1. hexadecimal
    2. decimal
  9. Convert the base 16 number 3C5 to
    1. binary
    2. base 10
  10. Convert the base 10 number 130.4375 to binary.
  11. Convert the binary number 1001101.1001 to decimal.
  12. Convert the hexadecimal number A2.4 to base 10.

Credits and licensing

This article is by Robert P. Webber and Don Blaheta, licensed under a Creative Commons BY-SA 3.0 license.

Version 2015-Sep-30 02:10