CSE 111, Fall 2004

Homework #2:

Binary Representation


  1. Complete the decimal-binary table that I put on the blackboard in lecture by finding the binary representations of the following decimal numerals:

    (Use the smallest possible number of bits for each; i.e., no "leading zeros".)

    Hint: You will need more than 8 bits for some of these. After the 128s place, comes the 256s place (256=128*2), then the 512s place (512=256*2), etc.

  2. Convert decimal 75 to 8-bit binary form.

  3. Find the decimal forms of the following binary numerals:

    1. 1010110
    2. 11110011

  4. Find the sum of the numbers in the previous problem using binary addition.

  5. What is the largest number (in its decimal representation) that can be represented in:

    1. 1-bit binary?
    2. 2-bit binary?
    3. 3-bit binary?
    4. 4-bit binary?
    5. 5-bit binary?
    6. 6-bit binary?
    7. 7-bit binary?
    8. 8-bit binary?
    9. 9-bit binary?

  6. Compute 2^1, 2^2, ..., 2^8, 2^9
    (where 2^n = 2 x 2 x ... x 2 (n times);
    e.g., 2^4 = 2 x 2 x 2 x 2 = 16).

  7. What is the relationship between your answers to problem 5 and your answers to problem 6?
DUE: AT THE START OF LECTURE: WEDNESDAY, SEPTEMBER 15



Copyright © 2004 by William J. Rapaport (rapaport@cse.buffalo.edu)
file: 111F04/hw2-2004-09-07.html