What makes registers so much faster than RAM?
Follow up: so why isn't RAM inside CPU?
You should check out this: https://electronics.stackexchange.com/questions/175615/why-is-ram-not-put-on-the-cpu-chip
Want your data to be shifted
Several modes, we can have SISO Also SIPO Also PIPO
If you don’t want your data to shift, just be stored there
Hardware registers are circuits typically composed of flip flops, often with many characteristics similar to memory, such as:
- The ability to read or write multiple bits at a time, and
- Using an address to select a particular register in a manner similar to a memory address.
Their distinguishing characteristic, however, is that they also have special hardware-related functions beyond those of ordinary memory. So, depending on the point of view, hardware registers are like memory with additional hardware-related functions; or, memory circuits are like hardware registers that just store data.
#gap-in-knowledge still register? what about pins? Are pins connected to register
Learning from Ben Eater
It’s still not super clear how registers work to me.
To understand the functions of registers, you need to understand how a Bus works.
Most computers are organized around a bus.
He loads it into the bus
Then, in the next clock cycle, the register stores that data! That is so FUCK-NG COOL!! I think I learned that in ECE124, but I totally forgot how that actually works.
You use the bus to transfer data. Anything to anything.
- The timing of that is done thanks to the clock input, so you can coordinate reading and loading
If both are outputting the same time, we’re going to have an issue.
We need Tri-State Gates so that the pins connected to the bus that don’t care about the stuff are disabled.
This video actually shows how to build a register!!