HelpContactFor teachers and institutes
>_StemPy Lab
Mock TestsClasses

>_StemPy Lab

Learn. Solve. Code the solutions. Test yourself.

Live examsFree mock exams, timed and rankedEveryone starts together, and your score and rank come the moment it ends.See the exams →

Learn

  • Physics
  • Chemistry
  • Mathematics
  • Biology
  • Python Programming
  • Statistics & Data Science
  • Computer Science
  • Classes
  • Groups

Practice

  • Problems
  • Quizzes
  • Mock Tests
  • Prepare for an Exam
  • Question Sets
  • Exams
  • Certificates
  • Python Labs
  • AI Practice Generator
  • Student-Created Tests

Community

  • Discussions
  • Resources
  • Notes
  • Glossary
  • Blog

Account

  • Log in
© 2026 senLearn. All rights reserved.HelpFor SchoolsAboutContactPrivacy PolicyTerms of UseRefund Policy
  1. Problems
  2. /A small program is stored at addresses 10 to 14…
MediumComputer ScienceHigh School (9–10)Computer Science › Computer HardwareNumericalIGCSE

A small program is stored at addresses 10 to 14…

StemPy LabContributed by StemPy Lab

Try it on paper first. A hint, the key idea and the worked solution are here when you need them.

A small program is stored at addresses 10 to 14. Address 20 holds 14 and address 21 holds 9.

  • Address 10: LOAD 20 (copy the value at address 20 into the ACC)
  • Address 11: ADD 21 (add the value at address 21 to the ACC)
  • Address 12: ADD 21
  • Address 13: STORE 22 (copy the ACC into address 22)
  • Address 14: STOP

Find the value in the ACC after each of the first three instructions, and the value at address 22 when the program stops.

Check your answer

Work it out on paper, then type your number. The answer itself stays hidden.

Need a reminder? The key ideaShowHide

The CPU has two units. The ALU does calculations and logic, and the CU decodes instructions and sends control signals. There are five registers. The PC holds the address of the next instruction and the MAR holds the address being used. The MDR holds the data or instruction read or to be written. The CIR holds the instruction being decoded and executed, and the ACC holds the result from the ALU. The address bus goes one way, from the CPU to memory. The data bus and the control bus go both ways.

The worked solution

Have you tried it?

Work it out on paper first. It is fine to get stuck or make a mistake: that is how we learn. When you are ready, go through the solution one step at a time, and check each step against your own.

Step 1. LOAD 20. The ACC gets the value at address 20, so it holds 141414.

Step 2. The first ADD 21. The ALU adds 999: 14+9=2314 + 9 = 2314+9=23.

Step 3. The second ADD 21. It adds 999 again: 23+9=3223 + 9 = 3223+9=32.

Step 4. STORE 22. The ACC is copied to address 22, which now holds 323232. The ACC still holds 323232 too.

Check. The program works out 14+2×9=3214 + 2 \times 9 = 3214+2×9=32. Yes.

Answer: 14, 23 and 32, and address 22 holds 32.

Log in to save this for later
← All Problems
← A student's notes say: "The MAR and the MDR both hold data from memory." The student's teacher says…A CPU is about to write the value 12 into memory address 45… →
More onComputer Science › Computer Hardware

Discussion (0)

Log in to join the discussion.

Loading…

More on this topic

  1. A family's home network has a laptop, two phones, a games console and a printer…Hard
  2. A network tool shows the IPv4 address of a laptop in binary: 11000000.10101000.00000001.00101101…Medium
  3. A printer's network interface card has the MAC address 00:1A:2B:3C:4D:5E…Easy
  4. A small design company has five staff. Two of them often work from home…Hard
  5. A music shop sells old songs on CD and keeps its sales records on a hard disk drive…Medium
All problems on this topic →