Our instruction processor is a toolbox containing all the operations our computer can execute (e.g. ADD, XOR, etc)
The processor’s job:
- Receive an instruction
- Interpret the instruction
- Send the instruction to the appropriate device
- Collect the output and send it on
This may sound daunting, but we’ve done most of it before. Remember how we gave our calculator the ability to select functions? This is the same thing.
Each type of instruction is performed by a dedicated device — e.g. an adder for ADD
, a register for SAVE
, and so on. Just like before, we need a way for our processor to select which device to use, based on binary stream.
We have three options:
- Use a series of selectors to control which device output we use
- Put all device outputs into a looped register and use a timer to read out the right one
- … something else?
We know 1 and 2 will work, but they were already bulky with our simple calculator. Our processor will have many more instructions, so these approaches — while possible — are going to end up very messy. Is there a better way?
Yes! There are multiple better ways. When we put our processor together, we’re going to install a router. This is a dedicated device that uses a new roon — the transistor — to take in a binary address, and create a dynamic path to steer the data where we need it.
We’ll look at how to assemble our router later. For now, we’re going to design the instruction devices that will go in our processor’s toolbox, starting with an instruction that will let us creating branching programs.
continue