CSC 101 CompLit, Fall
1996
Merrie Bergmann
Ileana Streinu
Dominique Thiébaut
This homework is split between logic circuits and
computer architecture. In the first half, you analyze one circuit
and send me email; and then you make a circuit and deposit it
in the DropBox. In the second half, you use a stack and send me
email about it.
1. Do Exercise 6a on p.256. You are welcome to use XLogicCircuits to help. Type up the logic table for the circuit and email it to me (orourke on sophia) with subject HW8: 6a. The table should have columns for two inputs a and b, and one output z.
The second half of 6a, finding an "equivalent
boolean expression" is extra credit for this problem
(3 pts), as this was not covered in class and I don't expect you
to be able to do this. [Boolean expressions are explained on pp.222-3.
There are two common notations: (A and B) or (not C) = AB +C'.]
2. Make a circuit with three inputs A, B, C, and
one output. The output should be 1 only when all three inputs
are 0:
Save your circuit as H8.NOT.Last.First, and drag to the DropBox.
Apple Pipper
Find Seelye.Mac/SeelyeCourseware/Literacy/ApplePipper. This is a stack written by John Kim, a grad student at UMass, which I commissioned to fill a gap in the textbook. Copy it to the desktop of your Mac. The stack displays the running of Pip commands according to the architecture diagram on p.247.
In this exercise you will explore a few properties of the 10 Pip commands by watching Pipper in action.
To become familiar with the stack, key in the commands for the 2X program from Lab 7. Reset Pipper, and step through it with the Next button. Then Reset again and try the Off/On switch.
Now make a table of the 10 Pip commands we used (p.246
or p.188). For each command, note whether that command employs
the value in the ACC in its action, whether it might change
the value in PC (other than the automatic increase by 1), or might
change the contents of RAM. So your table should have 10 rows
and 4 columns filled with Y's and N's:
Command | uses ACC? | alters PC? | alters RAM? |
STO | |||
LOD | |||
SET | |||
JMP | |||
JMZ | |||
ADI | |||
ADD | |||
SBI | |||
SBD | |||
HLT |
Fill in the rows by testing each command, and watching what they do. (For example, to test LOD, you could put LOD 2 into [1], put some number in [2], and use the "Next" button to execute just statement [1]. You don't need to write a complete program. Or if you are confident enough, you can just think it through mentally, and never use the ApplePiper stack.) A command "employs the value in the ACC" if the output wire from the ACC (the one to its right) lights up to bring the data in the ACC to someplace else. Putting data into the ACC (via the wire to its left) is not "employing" it in its activity. Note that for the last two columns, the question is might they alter PC or RAM; some commands may or may not depending on circumstances. So: are there circumstances where the command does alter the PC (aside from increment by 1) or change some part of RAM (ACC is not part of RAM)?
Don't bother getting fancy in Word with the table, as you will have to email this, and all your efforts will be reduced to ASCII characters. Send me (orourke) your table by email with a Subject: HW8:Ten commands.