Assignment 3, due feb 6
the homework for 22C:122/55:132, Spring 2004
Always, on every assignment, please write your name legibly as it appears on your University ID and on the class list! All assignments will be due on Fridays at the start of class, and unless there is what insurance companies call "an act of God", the only exceptions to this rule will be by advance arrangement.
For all of the following problems, consider this algorithm for division:
repeat A: while (input_ready = 0) do B: nothing end_while C: output_valid = 0 D: divisor = input_A E: dividend = input_B F: quotient = 0 G: while (dividend >= divisor) do H: dividend = dividend - divisor I: quotient = quotient + 1 end_while J: output_valid = 1 forever
Note that input-ready is a 1-bit input to the whole system, while input_A and input_B are one-word inputs. The outputs from the system are output_valid, one bit, and the remainder and quotient. Also note that the statements in the program have all been given labels for your convenience, should you find a need to reference them in shorthand form.