- Sep 19, 2000
- 10,286
- 147
- 106
OK, so for our assignment we are making a VERY simple 8 bit cpu, the functions avalible to the cpu are as follows
No Operation
Move # to Reg0
Move # to Reg1
Move Register to Display
Move Accum to Reg0
Move Accum to Reg1
ADD Reg0, Reg1
AND Reg0, Reg1
OR Reg0, Reg1
XOR Reg0, Reg1
Where the Accum is the accumulation of the ALU (simple D-flip-flop looped through a mux). ANYWAYS... Part of the assignment is first to subtract 2 numbers without adding anything to the ALU and then to subtract them using some new circuitry. I know that I will always have 4 bits and If I wanted to cop out, I could just do some mathematical thing to make the output correct. But I want to really write the program the will do subtraction with the available functions.
Any suggestions? (BTW I don't have Inversion in the original circuit which makes it all the harder)
No Operation
Move # to Reg0
Move # to Reg1
Move Register to Display
Move Accum to Reg0
Move Accum to Reg1
ADD Reg0, Reg1
AND Reg0, Reg1
OR Reg0, Reg1
XOR Reg0, Reg1
Where the Accum is the accumulation of the ALU (simple D-flip-flop looped through a mux). ANYWAYS... Part of the assignment is first to subtract 2 numbers without adding anything to the ALU and then to subtract them using some new circuitry. I know that I will always have 4 bits and If I wanted to cop out, I could just do some mathematical thing to make the output correct. But I want to really write the program the will do subtraction with the available functions.
Any suggestions? (BTW I don't have Inversion in the original circuit which makes it all the harder)
