Skip to content

Latest commit

 

History

History
162 lines (103 loc) · 3.1 KB

File metadata and controls

162 lines (103 loc) · 3.1 KB

LogicForge

Interactive Digital Logic Simulator

LogicForge is a digital logic simulator I built to explore how computers use simple logical operations to perform more complex tasks.

The project starts with basic logic gates and builds toward binary addition using Half Adders, Full Adders, and a 4-bit Binary Calculator.

Live Demo

Coming soon: GitHub Pages deployment

Features

  • AND, OR, NOT, XOR, NAND, and NOR gates
  • Interactive inputs and outputs
  • LED output indicator
  • Truth table generator
  • Half Adder
  • Full Adder
  • 4-bit Binary Calculator
  • Explanations of how the circuits work

Logic Gate Simulator

The simulator allows users to select a logic gate, provide binary inputs, and see the resulting output.

Logic Gate Simulator

The six gates included are:

  • AND
  • OR
  • NOT
  • XOR
  • NAND
  • NOR

Truth Tables

LogicForge can generate the complete truth table for each logic gate.

Truth Table

Truth tables show how every possible combination of binary inputs affects the output of a gate.


Half Adder and Full Adder

After building the individual logic gates, I used them to create larger digital circuits.

Half Adder and Full Adder

Half Adder

A Half Adder adds two one-bit binary numbers.

It produces:

  • SUM using an XOR gate
  • CARRY using an AND gate

Full Adder

A Full Adder adds:

  • Input A
  • Input B
  • Carry In

It uses multiple logic gates to calculate the final SUM and CARRY OUT.


Binary Calculator

The Binary Calculator extends the Full Adder concept to perform 4-bit binary addition.

Binary Calculator

For example:

  0101
+ 0011
------
  1000

The calculator processes the numbers one bit at a time and carries values between positions, following the same basic idea used by Full Adders.


What I Learned

Building LogicForge helped me understand the connection between programming and digital hardware.

I learned how:

  • Boolean logic can be represented with code.
  • Logic gates can be combined to create larger circuits.
  • Half Adders and Full Adders perform binary addition.
  • Carry values move between binary positions.
  • JavaScript can be used to model digital logic.
  • Git and GitHub can be used to manage and publish a software project.

Technologies

  • HTML
  • CSS
  • JavaScript
  • Git
  • GitHub

Future Improvements

Possible future improvements include:

  • Visual circuit diagrams
  • A larger multi-bit adder
  • Interactive circuit building
  • More digital logic components
  • Additional computer architecture concepts

Project Goal

I built LogicForge as a way to learn digital logic by building the concepts myself instead of only studying them theoretically.

The project follows a progression:

Logic Gates
     ↓
Truth Tables
     ↓
Half Adder
     ↓
Full Adder
     ↓
Binary Addition

This progression helped me see how simple logical operations can be combined to perform more complex computation.


Author

Mouhamed Diaby

High school student interested in Electrical and Computer Engineering.