Need clarification about the CPU

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Need clarification about the CPU

bool
Hello, I'm reading the book, and I'm stuck on the CPU. I have a few questions:

1. How can addressM be 15 bits wide when the largest RAM chip has a 14 bit address input?
2. Why is the output of the PC 15 bits wide when it uses a 16 bit register as storage?
Are we supposed to ignore the extra bits?  
Thanks in advance.
Reply | Threaded
Open this post in threaded view
|

Re: Need clarification about the CPU

ivant
bool wrote
1. How can addressM be 15 bits wide when the largest RAM chip has a 14 bit address input?
You are right, the largest RAM chip that we built has 16K words, which need 14 bit address. However, the computer needs to access the video memory as well, which is additional 8K and the keyboard memory (just 1 word). This means that the whole addressable space is from 0 to 24576. You need at least 15 bits to address it.

And yes, there are 15 bit addresses which lay outside this memory. Accessing this addresses is invalid.

bool wrote
2. Why is the output of the PC 15 bits wide when it uses a 16 bit register as storage?
Are we supposed to ignore the extra bits?  
We have 32K ROM, which contains the program. The program is addressed by the PC, so it should not go beyond the available ROM. So, yes, you need to just ignore the highest order bit of the PC output.

This makes sense it the CPU architecture, because @label commands work only for 15-bit addresses (the highest bit of command must be 0, otherwise it would be C command).