Arithmetic Logic Shift Unit

The fundamental digital circuit that powers computation in modern computer systems. Discover how the ALU performs arithmetic, logic, and shift operations that make computing possible.

🔧What is an ALU?

The Arithmetic Logic Shift Unit (ALU) is a fundamental digital circuit within a computer system that performs a variety of microoperations.

Instead of having individual registers directly perform microoperations, computer systems utilize storage registers connected to this common operational unit.

The ALU executes arithmetic, logic, and shift microoperations, then transfers results to destination registers.

⚡Core Functions

Arithmetic Operations

Addition, subtraction, increment, decrement

Logic Operations

AND, OR, XOR, complement operations

Shift Operations

Left shift and right shift operations

🏗️Hardware Components

An ALU integrates multiple circuit stages into a single unit:

Arithmetic Circuit Stage
Logic Circuit Stage
4×1 Multiplexers
Control Selection Variables
Shift Operation Circuits
One stage of arithmetic circuit One stage of logic circuit Select 4 × 1 MUX S1 S0 Bi Ai S1 S0 Bi Ai Di Ei Ai-1 (shl) Ai+1 (shr) Fi S2 S3 Ci Ci+1

The output (Fi) is selected by multiplexers that choose between arithmetic results (Di), logic results (Ei), and shift operations (shr/shl).


🎛️ Complete Function Table

S3 S2 S1 S0 C_in Operation Function
00000Transfer AF = A
00001Increment AF = A + 1
00010AdditionF = A + B
00011Add with carryF = A + B + 1
00100Subtract with borrowF = A + B̄
00101SubtractionF = A + B̄ + 1
00110Decrement AF = A - 1
00111Transfer AF = A
0100xANDF = A ∧ B
0101xORF = A ∨ B
0110xXORF = A ⊕ B
0111xComplement AF = Ā
10xxxShift right AF = shr A
11xxxShift left AF = shl A

Note: 'x' indicates a "don't care" condition for the input

💡Why ALU Matters

The Arithmetic Logic Shift Unit is a critical component of a computer's central processing unit (CPU). Its ability to perform a wide array of data manipulation tasks—arithmetic, logical, and shifting—all within a single integrated unit, makes it highly efficient and a cornerstone of computer architecture.

Every calculation, every logical decision, and every data transformation in your computer passes through this remarkable circuit, making it one of the most important innovations in computing history.

Start Learning Basic Computer Design