I am working on project 5 and have already completed most parts of it. The only question that is always confusing me for a couple of weeks is how the ALU deal with different kinds of instructions, namely, the A-instruction and C-instruction.
I know how the CPU process C-instructions according to the decoding of C-instruction control bits, but what about A-instruction. I mean, instructions stored in the ROM are processed line by line in the CPU controled by pc, when it comes to the line of A-instruction, for example,
then all the CPU does is to load the binary bits of 100 into A-register for the use of next C-instruction line. Therefore unlike C-instruction, at this instruction moment, the ALU don't have to do anything since there is no computation needed.
So here comes the problem which tortured me for several weeks: if the ALU should do nothing with A-instruction, how can I implement it. After all, you have to give some imput pins to ALU for processing no matter whether it's an A-instruction or C-instruction.
I have been thinking about this question for two week now, but still can't get it. Could someone please give some help? Is there somethong wrong with my understanding? Any help will be greatly appreciated. If my probem is not stated clearly, please tell me! Thank you for your time!