Re: Are the Program Counter and Control Unit the same thing?

Posted by ivant on
URL: http://nand2tetris-questions-and-answers-forum.52.s1.nabble.com/Are-the-Program-Counter-and-Control-Unit-the-same-thing-tp4033625p4033630.html

ouverson wrote
Based on what you both are telling me, it looks like all the "c" bits represent the Control Unit abstraction.

Am I correct?
More or less, yes.

The Control Unit is not shown as a separate part in these slides and it doesn't have to be implemented as such, but it helps to imagine there's such part. Its inputs are the current instruction (16-bit word), and various flags (in this case, ng and zr from the ALU). Its outputs are the "c" bits. They are as many as needed to tell the rest of the CPU what to do. For example, there will be a "c" bit, which tells the whether the A register should load its input value or not. There will be another "c" bit, which will tell the PC whether to jump or not.