Lab 4: Digital Logic

This week, we will be designing simple circuits that solve interesting problems; some of these will be useful in the next unit, when we learn how computer processors and memory work. We'll use the SimCir circuit simulation tool.

By the end of this lab, you should be comfortable with:

Lab Tasks:

  1. Visit The SimCir page, and download simcir121.zip.
  2. Open the file simcir.html, and construct a circuit with a battery connected to a toggle switch, which is connected to an LED. Flip the switch, and check that the LED changes.
  3. Your workspace (to construct circuits in) is not very large. Increase it by opening the file simcir.html in a text editor, and changing the values for width and height.
  4. Construct a circuit with three inputs A,B, and C, which has the output A . (B + C).
  5. Construct a circuit that has this truth table.
    ABCOutput
    0000
    0011
    0100
    0110
    1001
    1010
    1101
    1110

  6. Write out a truth table for this circuit. Can you find a simpler circuit with the same truth table?
    (Note that to see the circuit, you will have to save the cml file to your simcir directory, and edit the simcir.html file.)
  7. Construct a sequential memory circuit, following the outline in your handout.
  8. Design a circuit for a 2-bit decoder.
  9. Design a circuit for a 3-bit encoder.
  10. Design a circuit with 3 inputs, which outputs 1 if the majority of its inputs are 1, and 0 if the majority of the inputs are 0.