CSci 230: Computing Systems Organization
Home Syllabus Readings Assignments Tests

Assignment 6: Shallow incrementer

Due: 5:00pm, Friday, October 3. Value: 30 pts.

Below are two implementations of a circuit. Each takes a four-bit input representing an integer a and emits a five-bit output representing the computation of a + 1.

Cascading circuit      Compressed circuit

The first circuit uses the more intuitive technique: We have simply cascaded three half-adders (each consisting of a XOR gate and an AND gate) to arrive at our four-bit output. Note that the the o4 output simply turns out to be the AND of all the inputs. The computation of this output has a depth of three AND gates: That is, every path from an input to an output passes through at most three gates (which is achieved in going from a0 to o3).

(Actually, the XOR gate is actually a combination of several AND/OR/NOT gates. In this assignment, we'll ignore that detail and count a XOR gate as just one gate.)

In the second circuit, we have added a new AND gate which allows us to compute o4 with a shallower depth: One AND gate computes the a0 a1 and another computes a2 a3. While the depth of this circuit is still three, we've reduced the depth to o4: The longest path from an input to o4 was three in the cascading circuit, but in this circuit the longest path goes through only two gates.

Your assignment is to design an eight-bit adder using a similar technique. In particular, you should design an incrementing circuit with the following depths for each output.

o0:1      o5:4
o1:1      o6:4
o2:2      o7:4
o3:3      o8:3
o4:3

(This will be a marked improvement over the technique using cascading half-adders, where the depths would be 1, 1, 2, 3, 4, 5, 6, 7, 7. On the other hand, the cascading technique uses only 15 gates, whereas your solution will use slightly more. My solution uses 20.)

In drawing your circuit, your gates should have only two inputs each (except for NOT gates). Draw and test your circuit using Logisim, a circuit simulation program developed here at Hendrix and used at many other colleges and universities around the world. On the Linux computers, you can execute it by entering the command logisim & at the terminal prompt; you can also download it freely as directed on its Web page. It runs on Linux, Mac OS X, and Windows.

Important: Please download shallow-inc.circ [download] to open within Logisim as a framework for your solution. Make sure to edit the text label at upper left in the file to reflect your name(s)!