For this, the processor will also need memory.
Building on using flip flops for storing data for registers, I decided that if I could create an enable flag that could be AND’d with the value in the flip flop, I could create a logic gate sequence for each address as to whether the input address is valid for that block.
All other addresses won’t accept the address and so won’t output anything.
In the image is a basic design for reading two bits from memory. There are a total of four bits worth of memory, two bits on address 0x00, and two bits on address 0x01.
I’ve hardcoded the values contained within that memory into the flip flops. Using a series of logic gates, each address of memory enables the transistor to return the value from the flip flops.
As you can see in the image to the right, changing the memory address to be 0x01 returns the data from the other flip flops.
I still need to add another input so I can write to memory as well, I could probably use the same data lines as the output and AND it with the write input flag.
How much RAM I haven’t decided yet, I think maybe 4 addresses worth might be enough for such a basic system. The nice thing about this system is that more can be added at any time.
Removable Storage Media
I was thinking about making a version of removable storage as well, the idea is based on reading data from CDs, a piece of memory with black and white markers that can be read by LDRs.
I could also add some kind of paper feed system, then it could random access previous pages.. heh pages.