CPU Architecture and the Fetch–Decode–Execute Cycle: Question 8
Syllabus 3.1
A simple electronic scoreboard for a table-tennis match contains a microprocessor. During the match, it repeatedly carries out two operations: adding one point to a player's score, and comparing the two players' current scores to check whether either player has reached 11 points.
(a) Name the CPU component that carries out both of these operations. [1]
(b) State whether each of the following operations is an arithmetic operation or a logical (comparison) operation, and give a brief reason for your answer: (i) adding one point to a player's score [2] (ii) checking whether a player's score is greater than or equal to 11 [2]
(c) State which register normally holds the result immediately after this component completes an operation. [1]
Show worked solution Hide worked solution
Worked solution
Part (a): Identifying the component
Both adding a point and comparing scores involve the CPU processing numeric values, and this is the job of the arithmetic logic unit (ALU). The control unit coordinates when these operations happen, but it is the ALU itself that carries them out.
Part (b): Arithmetic versus logical (comparison) operations
The ALU performs two broad categories of operation, and the scoreboard uses one example of each:
- (i) Adding one point to a score. An arithmetic operation. This takes two numeric values (the existing score and the value 1) and combines them using addition to produce a new numeric result. Arithmetic operations always produce a calculated value like this. [2]
- (ii) Checking whether a score is greater than or equal to 11. A logical (comparison) operation. This does not calculate a new numeric value at all. Instead, it compares two values against each other and produces a true or false outcome (in this case, whether the win-condition threshold has been reached). [2]
Part (c): Where the result is stored
Immediately after the ALU finishes either type of operation, its result is normally placed in the accumulator (ACC), the register dedicated to holding the outcome of the CPU’s most recent calculation or comparison, ready to be used by the next step of the program.
Final answers
- (a) The arithmetic logic unit (ALU).
- (b) (i) Arithmetic operation, it calculates a new score by adding two numeric values. (ii) Logical (comparison) operation. It compares two scores and produces a true/false result.
- (c) The accumulator (ACC).