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.
- Build a subtraction circuit that will perform subtraction of two four bit unsigned integers. You may only use basic gates for this circuit.
- Build a circuit to serve as a program counter for an 8 bit machine. Your circuit should:
- Contain a data output line. This is 8 bits wide and contains the current value of the program counter. (Dout)
- Contain a data input line. This is 8 bits wide and contains jump destination. (Din)
- Contain a control line that tells the PC register to load. (load)
- Contain a control line that tells the PC where to load from. (inc/not jmp)
- Contain a reset line, which when asserted, sets the PC to zero (reset)
- 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
- For this exercise, you may use any elements available in tkgate.
- 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.