Computing / Knowledge quiz

CPU Quiz: Instructions, Registers and Branches

What happens between fetching an instruction and executing it? Try 10 questions on the parts and operations of a simple processor.

10 questionsAnswers and score at the end
Practice quiz

Test your knowledge.

Question 1 of 100 answered

Adding up your answers

Your score is next.

Question 1

What is the ALU responsible for?

The ALU performs calculations and logic.

Source excerpt
This component is the Arithmetic Logic Unit, or ALU for short. It is the part of the processor that does the actual 'thinking' and 'calculating'.

From the Knowverse course text.

Question 2

What does the zero flag indicate in this processor model?

The zero flag reports a zero-valued result.

Source excerpt
The most common signal is the Zero Flag. It turns 'on' if the result of an operation is exactly zero.

From the Knowverse course text.

Question 3

What does an opcode identify?

The opcode encodes an instruction's operation.

Source excerpt
The specific part of an instruction that identifies the operation to be performed is called the Opcode.

From the Knowverse course text.

Question 4

What is an instruction set?

An instruction set specifies supported commands.

Source excerpt
This complete collection of every possible command a specific CPU can execute is known as the Instruction Set.

From the Knowverse course text.

Question 5

What does the control unit do?

It coordinates transfers and operations.

Source excerpt
The Control Unit acts as the central coordinator that manages every other part of the processor.

From the Knowverse course text.

Question 6

What does the program counter hold?

The program counter tracks an instruction address.

Source excerpt
The Program Counter is a high-speed storage location that holds the memory address of the next instruction to be executed.

From the Knowverse course text.

Question 7

What does fetching do?

Fetching brings the next instruction into the processor.

Source excerpt
Knowing the address is only the first part; the CPU must then actually get the data. This retrieval process is called Fetching.

From the Knowverse course text.

Question 8

What happens during decoding?

Decoding determines which operation the encoded instruction requests.

Source excerpt
Decoding is the specific process where the Control Unit looks at the binary pattern to determine which action to take.

From the Knowverse course text.

Question 9

What can a jump instruction change?

A jump redirects instruction flow by changing the instruction address.

Source excerpt
To break the straight-line flow, we use a Jump instruction, which manually overrides the Program Counter.

From the Knowverse course text.

Question 10

What makes a branch conditional?

Conditional branching chooses a path according to a result or condition.

Source excerpt
This is called Conditional Branching. It allows the computer to take one path or another based on the result of a calculation.

From the Knowverse course text.

YOUR SCOREcorrect answers
Quiz complete

Here's how you did.

See the answer and explanation for each question below.

Knowverse app icon
KNOWVERSE FOR IPHONE

Get the Knowverse app.

Find more quizzes and full courses in the free iOS app.

Get KnowverseDownload on iOS

Parts that store, direct and calculate

A processor contains parts with different roles. Registers hold values close to the working circuits. The arithmetic logic unit, or ALU, performs arithmetic and logical operations. The control unit coordinates transfers and selects the required operation. These roles explain how stored bits become the inputs and results of a computation.

An instruction tells the processor which action to perform. Its opcode identifies that action, while other parts may identify data or locations. The instruction set is the collection of commands a processor supports. In a stored-program design, instructions are represented as data that can be loaded into memory.

Source excerpt
The specific part of an instruction that identifies the operation to be performed is called the Opcode.

From the Knowverse course text.

Early Instruction Management — image from Wikimedia Commons
IBM 701console · Dan · CC BY 2.0

Following a program

The program counter holds the address used to find the next instruction. Fetching retrieves an instruction from memory, and an instruction register holds it for processing. During decoding, the control unit interprets the instruction. Execution then activates the circuitry needed to carry out the requested operation on its inputs.

A program need not follow addresses in a simple straight sequence. A jump changes the next instruction address. A conditional branch selects a path based on a condition, such as an ALU result flag. In the model described here, a zero flag indicates that an operation produced zero, helping programs make decisions and repeat work.

Source excerpt
The Program Counter is a high-speed storage location that holds the memory address of the next instruction to be executed.

From the Knowverse course text.

Sources

Sources: The Heart of the Machine. Each question or step includes an excerpt from the course.