Arithmetic logic unit

An arithmetic logic unit (ALU) is a component of a processor that performs arithmetic and logical operations on data - that is, things involving maths and logical operations, like AND, OR, XOR, their bitwise variants, etc.

The control unit will send the ALU what’s called an opcode and operands:

The ALU will then perform that calculation, and then store the result in the accumulator. The control unit can then retrieve the result from the accumulator and use it in whatever it needs to.

What does the ALU do?

Some examples of things the ALU can do are: