This project demonstrates the design and implementation of a 22-bit CPU using Logisim, a graphical logic circuit simulator. The CPU features modular components, including an Arithmetic Logic Unit (ALU), a Control Unit, and memory modules (ROM and RAM). It supports:
- ✅ Arithmetic calculations
- ✅ Bitwise logic operations
- ✅ Memory management
- Performs:
- ➕ Addition
- ➖ Subtraction
- 🔗 Bitwise Operations:
AND,OR,NAND,NOR.
- Includes universal gates for logical computations.
- Decodes and executes instructions from ROM.
- Controls data flow between CPU components.
- Custom opcodes for various operations:
- Bitwise AND:
0 - Addition:
1 - Subtraction:
4 - NAND:
7 - Halt:
9
- Bitwise AND:
- RAM: Temporarily stores data during execution.
- ROM: Preloaded with instruction codes.
- Opcode (4 bits): Specifies the operation.
- Data Bits (Remaining bits): Encodes operand and address.
| 🔧 Operation | 📜 Machine Code |
|---|---|
| Load | 18000f |
| Add | 04000c |
| Store | 08000a |
| Halt | 240000 |
- Instruction Execution:
- Fetch instructions from ROM.
- Decode opcode and execute with the ALU or memory.
- Data Flow:
- Seamless data flow between components.
- Simulation:
- Built and tested using Logisim with real-time clock control.
- Logisim: Circuit design and simulation.
- Multiplexers: Operation selection.
- Logic Gates: Logical and arithmetic operations.
- ROM/RAM: Instruction and data storage.