Assignment 11, due Jul 19
Part of
the homework for CS:2630, Summer 2018
|
On every assignment, write your name legibly as it appears on your University ID card! Homework is due on paper at the start of class on the day indicated (Tuesday or Thursday). 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!
Q = x nor Q
Q = y nor Q
a) Draw this logic circuit. Neatness counts! (0.5 points)
b) For all possible values of x and y, show all possible values of Q and Q. Arrange this as a truth table, but note that some row or rows will have more than one value for each output. (0.5 points)
c) Using the truth table you worked out above, which combinarion of x and y should be used to make this flipflop hold a value? (0.2 points)
d) How do you make this flipflop hold Q = 1? Your instructions should assume that x and y are initially as specified in part c and that they return to that condition at the end. (0.3 points)
CR, by rights, ought to return the display pointer dspptr (the X coordinate) to the first byte on the current line, without changing the Y coordinate, and LF ought to move the display pointer down one line without changing the X coordinate.
a) Give C-like pseudocode for getat() a routine you could add to the Hawk monitor that returns, in R3 and R3, the current X and Y coordinates. Feel free to write things like return (x,y) to indicate the return of two different integers. You can compute X and Y from dispptr. (0.5 points)
b) Give C-like pseudocode for a modified version of putchar(ch) that outputs the character if it was not a CR or LF, and that properly interprets CR and LF. Feel free to use x,y=getat() and setat(x,y) in your code. (1.0 points)