CSE 111, Fall 00, HW #2

CSE 111, Fall 2000

#### HW #2: BINARY REPRESENTATION

1. Complete the decimal/binary table that I put on the blackboard in lecture (and that is also on the Web as part of Lecture Notes #2) by finding the binary representations of the following decimal numerals:

   99, 100, 101, 999, 1000

   (Use the smallest possible number of bits for each; i.e., no "leading zeros".)
   Hint: You will need more than 8 bits for these. After the 128s place, comes the 256s place (256=128*2), then the 512s place (512=256*2), etc.

2. Do Biermann, p. 244, #1, 3, 4

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

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

   (b)
   Compute 2^1, 2^2, ..., 2^8, 2^9
   (where 2^n = 2x2x...x2 (n times); e.g., 2^4 = 2x2x2x2).

   (c)
   What is the relationship between your answers to part (a) and your answers to part (b)?

DUE: AT THE START OF LECTURE: WED., SEP. 20