CS 208: Computer Organization and Architecture

Problems: binary arithmetic and digital logic

Submit the Logisim circuit, as a file named sevensegment.circ, via the Courses system. Submit the rest of the problems either on paper or in a suitably named file via Courses.

  1. If you interpret the hexadecimal number 0xFFFFA789 as a 32-bit two's complement integer, what is its decimal equivalent? (Note that it is common to write hexadecimal numbers preceded by "0x"--this convention is based on the notation used for representing integer constants in the C programming language.)

  2. What is the 32-bit two's complement equivalent of the decimal number -4321? Give your answer as an 8-digit hexadecimal number.

  3. Do problems C.6, 7, 8, and 11 (on the textbook's CD).

  4. A seven-segment display is a familiar output device that is used to display numbers and a few letters. Cheap alarm clocks, old calculators, and lots of other devices use seven-segment displays.

    Logisim has a seven-segment display widget in its Input/Output section. Your job is to create a Logisim circuit taking two input lines representing an integer between 0 and 3, and produce output on a seven-segment display widget showing the corresponding digit. You may use AND, OR, and NOT gates, plus necessary pins and wires.

    If you felt like doing a four-input version of this exercise, well...that would be a bit masochistic. But feel free. (No extra credit for such craziness, just pointing out that it would acceptable.)