CPUs and architecture

What is the role of the ALU (arithmetic logic unit) in a CPU?

  1. AStoring instructions and data long term
  2. BDisplaying images on the screen
  3. CPerforming calculations such as addition and logical operations
Show answer and explanation

Answer: C. Performing calculations such as addition and logical operations

An ALU (arithmetic logic unit) performs arithmetic such as addition and subtraction and logic operations such as AND, OR, comparison and shifts, with an adder at its core. Following the decoded instruction, it takes data from registers and returns the result; in x86, Arm and similar architectures it also returns flags—zero, negative, overflow and so on—used for branch decisions. High-performance CPUs have several ALUs plus separate multipliers and floating-point units.

  • A. Long-term storage is the role of storage devices.
  • B. Displaying images is the role of the GPU and display circuitry.
  • C. Correct. It performs arithmetic and logical operations.