The Little Man Computer





- The program counter is currently at 0. So the instruction at address 0 is fetched and the program counter incremented.

- By decoding the instruction 560, the computer now knows to fetch the value at address 60. This is placed in the accumulator.

- It now fetches the next instruction and the program counter is incremented again, so the instruction 161 needs to be decoded.

- That means fetching the number at 61, placing it into the accumulator, and then sending both numbers to the ALU which adds them together. The result is 8, which is stored in the accumulator.

- The instruction at address 2 is now fetched, which is 362.

- This is decoded as a store instruction, so the number from the accumulator is taken and stored in address 62.

- Finally, the computer goes to the instruction at address 3, which is 000. This is the machine code for ‘halt’, so the program stops. It has successfully added two numbers and stored the result.




How Computers Work: Demystifying Computation

Our purpose is to transform access to education.
We offer a diverse selection of courses from leading universities and cultural institutions from around the world. These are delivered one step at a time, and are accessible on mobile, tablet and desktop, so you can fit learning around your life.
We believe learning should be an enjoyable, social experience, so our courses offer the opportunity to discuss what you’re learning with others as you go, helping you make fresh discoveries and form new ideas.
You can unlock new opportunities with unlimited access to hundreds of online short courses for a year by subscribing to our Unlimited package. Build your knowledge with top universities and organisations.
Learn more about how FutureLearn is transforming access to education