TOY Programming
Find a partner or group; discuss:
TOY Programming
Find a partner or group; discuss:
TOY Programming
Find a partner or group; discuss:
First digit. The op code tells you which of the 16 operations a given instruction is executing.
TOY Programming
Find a partner or group; discuss:
TOY Programming
Find a partner or group; discuss:
There are 16 of these, numbered 0 through F.
TOY Programming
Find a partner or group; discuss:
There are 256 of these, numbered 00 through FF.
There are 16 of these, numbered 0 through F.
TOY Programming
Find a partner or group; discuss:
TOY Programming
Find a partner or group; discuss:
We use registers to store intermediate values; we use memory to store longer-term data.
TOY Programming
ALU
_ _
_ _ _ _
0 0 0 0
0
_ _ _ _
1
_ _ _ _
F
_ _ _ _
STDIN & STDOUT
IR
16 bits
REGISTERS
MEMORY
_ _ _ _
00
_ _ _ _
01
_ _ _ _
_ _ _ _
0F
_ _ _ _
10
_ _ _ _
11
_ _ _ _
_ _ _ _
1F
_ _ _ _
F0
_ _ _ _
F1
_ _ _ _
_ _ _ _
FF
2
F2
12
02
PC
8 bits
load
store
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. . .
8 bit
memory
address
16 bit
memory
word
16 bit
register
Ready to dive in?
No code today either! Let's review the 16 operations in TOY and write our first few TOY programs!
No need for laptops today, unless you want to take notes on your computer.