Little Eight

Ready
  1. Fetch
  2. Decode
  3. Execute

step 0 of 0

Program

Instruction set
CopyMOV A, B MOV A, 5
MemoryLD A, [0x20] LD A, [B] ST [0x20], A ST [B], A
MathsADD SUB AND OR XOR CMP with a register or a number
One byteINC DEC SHL SHR ROL ROR NOT
JumpJMP JZ JNZ JC JNC JN CALL RET
StackPUSH POP
OtherOUT A NOP HLT
Assemblerlabel: .equ NAME, 5 .org 0x40 .byte 1, 2 ; note
DisplayBytes 0xF0 to 0xF7 are its rows
RegisterHexDecBits

Memory

Output tape

Keyboard

Space
Run or pause
→ ←
Step forward, step back
Shift + → ←
A whole instruction
R
Reset the machine
T
Take apart, or put back
[ ]
Turn the machine
- =
Zoom out, zoom in
E
Go to the program
Esc
Leave the program, or close a part
Ctrl + Enter
Run from the program

Little Eight is a tiny computer you can watch think

It is a made-up 8-bit machine, drawn as the circuit board it would be. Its program is a list of simple instructions: load a number, add it, jump somewhere else. Every byte it moves is shown on the lines between the parts.

  1. Press Run to watch the program go, or Step to go one move at a time.
  2. Step back at any point. The machine rewinds exactly, so you can check what happened.
  3. Change the program on the left, then press Ctrl+Enter to run your version. Copy link sends your program to someone else.

Click any part on the board to see what it does. Press ? for the keyboard.