| Command |
3-bit Instruction |
5-bit Data |
Description |
| 1. Init |
000 |
XXXXX |
Initialize all registers, ie R1=R2=R3=(0,0,0,0,0) |
| 2. Move1 |
001 |
aaaaa |
Put aaaaa value into register R1 |
| 3. Move2 |
010 |
bbbbb |
Put bbbbb value into register R2 |
| 4. Store |
011 |
XXXXX |
take the previous result in R3 and store into register R2 |
| 5. Add |
100 |
XXXXX |
Add contents in R1 and R2. Present the result at R3 and output overflow flag |
| 6. Shift |
101 |
aaXXX |
Take the content in R2 and left shift by aa bits, then store the result in R3 |
| 7. Comp |
110 |
XXXXX |
Compare the contents of R1 and R2. The flag bit is true if R1 is greater than or equal to R2. Otherwise it is false |
| 8. Mask |
111 |
XXXXX |
Mask (AND-ing) R1 and R2. Present the result in R3 |
* For 5-bit data, X is Don't Care.