Login  Register

Re: I'm working on my last chip in chapter/week 3: the PC chip

Posted by WBahn on Jul 16, 2019; 5:07pm
URL: http://nand2tetris-questions-and-answers-forum.52.s1.nabble.com/I-m-working-on-my-last-chip-in-chapter-week-3-the-PC-chip-tp4033386p4033392.html

You're making it much harder than it is.

Your PC only needs to store a single 16-bit value. That's it. One 16-bit value. So you need just one 16-bit register. Nothing more (in the way of storage).

You have to store one of four possible 16-bit values into that register on each clock cycle. So you need a way to select from among four possible 16-bit values. What device do you have that lets you do that? Let's call that device Bob. How many control input signals does it have?

The four possible values are zero, the value on the 'in' port, the value on the 'out' port, and the value on the 'out' port plus one. Can you get those four values to the data input ports of Bob?

Now you just have to come up with some logic to take your three control signals and generate the control signals for Bob.