Overview
What Does the ALU Do
Arithmetic Operations
- Addition
- Subtraction
- Multiplication (sometimes delegated)
- Division (often handled separately)
Logical Operations
- AND
- OR
- NOT
- XOR
- Comparisons (greater than, less than, equal to)
How ALU Works (Basic Flow)
- CPU sends instructions to the ALU
- Operands are fetched from registers
- ALU processes the operation
- Result is stored back in registers
Internal Structure of ALU
1. Adders
- Half adder
- Full adder Used for binary addition.
2. Logic Gates
- AND, OR, NOT, XOR Used for logical operations.