Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CPU Components in MATLAB

This repository contains MATLAB implementations of fundamental digital logic components used in the design of CPUs. These components are based on principles from digital logic design and the book The Elements of Computing Systems (also known as Nand2Tetris).

📁 Contents

The following digital logic modules are implemented:

🔸 Logic Gates

  • Nand.m - NAND gate
  • Nor.m - NOR gate
  • Not.m - NOT gate
  • Xor.m - XOR gate
  • Xnor.m - XNOR gate

🔸 Multiplexers

  • Mux2.m - 2-to-1 Multiplexer
  • Mux4.m - 4-to-1 Multiplexer
  • Mux8.m - 8-to-1 Multiplexer

🔸 Demultiplexers

  • Demux2.m - 1-to-2 Demultiplexer
  • Demux4.m - 1-to-4 Demultiplexer
  • Demux8.m - 1-to-8 Demultiplexer

🔸 Arithmetic Circuits

  • HalfAdder.m - Half Adder
  • FullAdder.m - Full Adder

🧠 Purpose

This project was developed as an academic assignment to understand the inner workings of CPU components using MATLAB. The goal is to simulate and visualize basic hardware-level computations in a high-level programming environment.

▶️ How to Run

  1. Open MATLAB.
  2. Clone or download this repository.
  3. Navigate to the folder in MATLAB's working directory.
  4. Run any script using the command window. For example:
    output = Mux4([1; 0; 1; 0], [1; 0])

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages