Download presentation
Presentation is loading. Please wait.
Published byMelvin Reeves Modified over 8 years ago
1
Instruction Memory value Description ADD1xx Add the value stored at memory address xx to the value in the accumulator register SUB2xx Subtract the value stored at memory address xx from the value in the accumulator register STA3xx Store the value from the accumulator register to the memory address xx LDA5xx Load the value from the memory address xx into the accumulator register BRA6xx Branch to xx (store xx in the program counter register so that the program will jump to xx on the next instruction cycle) BRZ7xx Branch if the accumulator register stores the value zero, otherwise carry on as normal BRP8xx Branch if the accumulator register stores zero or a positive number INP9x1 Read a value from the input device x and store it in the accumulator register OUT9x2 Send the contents of the accumulator register to the output device x HLT000Halt / Stop the processor DATxxxStores xxx in memory to be used as data Little Man Computer Instruction set
2
AddressValueDescription 0901Input from device 0 1308Store in memory address 8 2901Input from device 0 3309Store in memory address 9 4508Load memory address 8 into accumulator 5109Add memory address 9 to accumulator 6902Output to device 0 7000Halt 8000data: 0 9000data: 0 Little Man Computer Example Program
3
Program Counter register
4
Instruction register
5
Accumulator register
6
Address: 0 Value: 901
7
Address: 1 Value: 308
8
Address: 2 Value: 901
9
Address: 3 Value: 309
10
Address: 4 Value: 508
11
Address: 5 Value: 109
12
Address: 6 Value: 902
13
Address: 7 Value: 000
14
Address: 8 Value: 000
15
Address: 9 Value: 000
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.