Practice question · Put in order
Order the stages of the task 'read a number from the keyboard, add one, and store the result' as the information flows through the machine.
- The result is stored back to main memory
- A keypress arrives as an I/O event and raises an interrupt
- The ALU performs the addition inside the data path
- The character is encoded as bits and placed in main memory
- The CPU fetches the add instruction, checking the cache first
Hints
- Nothing can be computed until the value exists somewhere the CPU can reach.
- The instruction that performs the addition must itself be fetched before it can run.
Show the answer
- A keypress arrives as an I/O event and raises an interrupt
- The character is encoded as bits and placed in main memory
- The CPU fetches the add instruction, checking the cache first
- The ALU performs the addition inside the data path
- The result is stored back to main memory
Why
Every layer of the course appears once, in order: I/O, encoding, the memory hierarchy, the data path and ALU, then memory again. Expecting the addition before the fetch skips the fact that the add instruction is itself data that has to be brought in.
Practise Integrated Computer-System Reasoning
The app has 6 more questions on this lesson, and keeps your place in the course. Computer Science I is free to start.
More questions on Integrated Computer-System Reasoning
- Match each layer or idea to its role in the whole machine.
- Select every statement that the bottleneck principle actually supports.
- A Python programmer never thinks about voltage, and a chip designer never thinks about dictionaries. What…
- A high-level language statement becomes machine instructions, which become voltage changes in transistors.…