We want to use some mechanism to select the specific register we want to see, right? Not just have them stored in memory. We can use the decoder that we learned from an earlier section to create those read and write lines. In our class examples, we use a 4 to 16 decoder (to signify our 16 registers).
Now, we can start to construct machine language! If we consider:
We can create 16-bit instructions! Note, our assembler could instead process a smaller instruction bit size, but we'll keep it at 16 for simplicity.
For example:
add 3 1 2 (r3 = r1 + r2) 1001 0011 0001 0010
For more on immediate instructions, refer to section 7.