Assignment 7, due Oct 17

Part of the homework for CS:2630, Fall 2019
by Douglas W. Jones
THE UNIVERSITY OF IOWA Department of Computer Science

On every assignment, write your name legibly as it appears on your University ID card! Homework is due on paper in discussion section on Thursday. Some parts of assignments may be submitted on-line and completed in discussion section. Exceptions will be made only by advance arrangement (excepting "acts of God"). Late work must be turned in to the TA's mailbox (ask the CS receptionist in 14 MLH for help). Never push homework under someone's door!

  1. Background: Consider this set of boolean logic equations describing a digital system with 2 inputs a and b, and one output, e.

    c = ab
    d = a + b
    e = c + d

    a) Draw a circuit diagram for this circuit. Grading will account for neatness, so consider drawing it on scratch paper first and then redrawing it once you figure out how to make it nice looking. (0.5 points)

    b) Draw a truth table for it, showing the inputs a and b, the intermediate values c and d and the final value e. Again, neatness counts. (0.5 point)

    c) This system of equations computes a logical function closely related to one of the functions discussed in the first half of Chapter 8 of the notes. What function and what is the relationship? (0.5 point)

  2. Background: The Hawk subtract instruction is done using an adder with a carry in of 1 and with the subtrahend inverted. So SUB R3,R4,R5 actually computes R3 = R4 + ~R5 + 1.

    A question: What does the carry out of the adder tell you? That is, when computing a – b, does a carry out imply some relationship (greater, less, equal) between the two numbers? What about the lack of a carry out? (0.5 point)

  3. A small problem: Look at the Hawk shift instructions, and figure out where a shifter or shifters should be placed relative to the ALU. Note that the left-shift function and right-shift function may be in different places relative to the ALU. The easiest way to present a solution is as a diagram showing two inputs (the two operands), one output, with the ALU and shifter or shifters shown as labeled boxes in between. (1 point)