Computer Science 237
Computer Organization

Williams College
Fall 2006

Lab 6: Sequential Logic
Due: Monday, October 23, 2006 at 9:00 AM

Lab meets this week in TCL 216. We will begin at 1:15 sharp to set up your accounts to use LogicWorks and to experiment with some of the functionality of LogicWorks. Expect to be done in under an hour. In Lab: Using LogicWorks

At the start of lab, you will see how to install a copy of LogicWorks into your Mac account. Once you have this set up, launch the LogicWorks application. We will build (together) an XOR circuit from AND and OR gates and experiment with some of the functionality of LogicWorks.

Before you leave lab, build an XOR circuit in LogicWorks using one 2-input AND gate, one 2-input OR gate, and one 2-input NAND gate (Big hint: AND together A OR B with A NAND B). Use binary switches for your inputs A and B, and install a binary probe on the output to verify your circuit's correct operation. Use a label to put your name on the circuit. Save the circuit with the name XORCircuit, print it out, and then copy the file to your FreeBSD account and use the turnin utility to submit XORCircuit. Expand the circuit to a half adder. Save this circuit as HalfAdder and submit it as well.

Homework Problems

Please complete the following problems on paper. You may verify your work using TTL logic or LogicWorks.

  1. Occasionally it is necessary to add 1 to a number, for example, a program counter.
  2. In class we learned about clocked D-type flip-flops. Such a device has inputs D and CLK, and output Q. Occasionally, it is useful to explicitly set (S) or reset (R) Q without regard to D. For example, it might be useful to clear (reset) all of memory without explicitly providing data to each bit.
  3. Suppose you have several T-type clocked flip-flops with Q and Qbar and asynchronous set and reset.
  4. Using any of the flip-flops, latches, and counters that we have discussed in class as building blocks, construct a circuit that takes input from a single switch and produces a single output. After the first, second, and third times that the switch goes from 0 to 1, the output is 0. The fourth time that the switch goes from 0 to 1, the output becomes 1. The fifth, sixth, and seventh times the switch goes from 0 to 1, the output should be 0. The eighth time, the output is 1, and so on. In other words, the output is 1 exactly when the switch has been moved from 0 to 1 a number of times that is divisible by 4.