Exercise 1 -- Digital Representations
Due: Tuesday, October 6, 1998 (in class)

  1. The basic unit of memory in most computer systems is the "byte", a unit composed of eight binary digits. This explains why multiples of 8 bits are popular when discussing ways to represent digital images. The popularity of 24-bit color and 8-bit color (rather than 21-bit color or 9-bit color) is due to the wide acceptance of this 8 binary digit memory unit.

    Knowing this, however, one might wonder what ever happened to 16 bits. Being a multiple of 8, it would be a natural candidate for a color image representation scheme, but we never talked about it. Well, it does exist. On some Macs, when you go to configure monitor options, you are given three choices: "256 colors", "thousands of colors" and "millions of colors". The "thousands" option corresponds to 16-bit color. The question is, "How does it work?"

    In this question, I won't ask you to figure out how it works, but I would like you to explore ways it might work. The two obvious candidates are that 16-bit color might mimic either 24-bit color or 8-bit color.

    If 16-bit color mimics 24-bit color, then the 16 bits would have to be divided up into three sub-pieces: one to describe redness, one for greenness and one for blueness. Unfortunately, 16 doesn't divide in 3 very well, so one would have to waste one bit and use three 5-bit numbers to describe the components of a color (letting the last bit go to waste).

    If 16-bit color works like 8-bit color, then each image file would contain both a "pallete" listing the 24-bit color descriptions for all of the distinct colors that appear in the image and a table of containing one 16-bit number for each pixels in the image. Each 16-bit number would be interpreted as the position in the list of 24-bit colors containing the color of the pixel associated with the 16-bit number.

    1. In 24-bit color images, each color component is described by a number ranging from 0 to 255. Assuming for a moment that 16-bit color works like 24-bit color, what range of numbers would be used to describe the redness (or greenness or blueness) of each pixel?

    2. Again assuming 16-bit color works like 24-bit color, how many distinct colors could be represented in a 16-bit color image.

    3. How many 8-bit bytes of memory would be required to represent a 100 x 50 pixel image using 1 16-bit color scheme that works like 24-bit color? How many bytes would be required to represent an image from our digital camera (a 1280 x 960 pixel image)?

    4. Now, assuming 16-bit color works like 8-bit color. How many bytes of memory would be required to represent the 100 x 50 and 1280 x 960 images described above? (Note: In determining number of bytes needed to store the pallete, assume that each image contains as many distinct colors as possible so that you are computing the largest file size required for an image of the given dimensions.)

  2. Consider the following graph of the voltage levels observed over time at a point on a cable being used to transmit a binary digital signal.

    image

    1. Assuming that Manchester encoding is being used, what is the sequence of 0's and 1's represented by the signal on the cable?

    2. Assuming on-off keying is being used, the signal shown is ambiguous. It could correspond to several different sequences of binary digits. Show the shortest such sequence.

    3. Show at least one of the other sequences of binary digits this signal could encode assuming on-off keying is being used.

  3. When we discussed modulation in class, I described the wave actually transmitted using the formula:

    d(t) x c(t)

    Where I explained that:

    d(t)
    was the function describing the data to be transmitted (its value being either "0" or "1" at various times "t", depending on the message being sent, and

    c(t)
    was the "carrier", i.e. the wave being modified to encode the signal. Typically, c(t) = sin(freq*t) for some fairly large number "freq".

    I lied. In most real transmission systems, the signal actually sent is more likely to be described by:

    ( 1 - d(t)/r) x c(t)

    where r is a value greater than or equal to 1. Note, when r equals 1 this is just the opposite of the scheme above. Namely, a "0" bit is encoded by sending the carrier signal and a "1" is encoded by sending nothing.

    I'd like you explore how this signal behaves when r is not 1.

    1. Suppose r is equal to 2. Draw a diagram depicting the wave transmitted when the bit sequence "110010" is sent using this scheme.

    2. When the value of r is 2, this scheme has an advantage over both the scheme originally described in class and the version of this scheme with r equal to 1. Explain what this advantage is.

    3. Using a value of 2 for r is better than using 1. In fact, up to a point, using even larger values for r is better. Unfortunately, using a value of r that is too large will make the whole system unworkable. Explain why? (You need not guess how big an r is feasible).

If you have questions, you are encouraged to ask them through the discussion area for this homework assignment