Homework 2

Please turn turn this homework in by attaching three tkgate files to an email message to dbennett@edinboro.edu. Make sure that your name is part of this message.
  1. Build a subtraction circuit that will perform subtraction of two four bit unsigned integers. You may only use basic gates for this circuit.
  2. Build a circuit to serve as a program counter for an 8 bit machine. Your circuit should:
    1. Contain a data output line. This is 8 bits wide and contains the current value of the program counter. (Dout)
    2. Contain a data input line. This is 8 bits wide and contains jump destination. (Din)
    3. Contain a control line that tells the PC register to load. (load)
    4. Contain a control line that tells the PC where to load from. (inc/not jmp)
    5. Contain a reset line, which when asserted, sets the PC to zero (reset)
    6. Operation:
      • To perform a regular PC increment
        • Add 1 to the current value of the register
        • assert the inc/not jmp line
        • assert the load line
      • To perform a jump
        • De-Assert the inc/not jmp line
        • Assert the load line
    7. For this exercise, you may use any elements available in tkgate.
  3. Implement the register file described in figure B.8.7. You should assume 8 bit registers. For this exercise, you may use any available elements in tkgate.