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.
Coming soon: GitHub Pages deployment
- 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
The simulator allows users to select a logic gate, provide binary inputs, and see the resulting output.
The six gates included are:
- AND
- OR
- NOT
- XOR
- NAND
- NOR
LogicForge can generate the complete truth table for each logic gate.
Truth tables show how every possible combination of binary inputs affects the output of a gate.
After building the individual logic gates, I used them to create larger digital circuits.
A Half Adder adds two one-bit binary numbers.
It produces:
- SUM using an XOR gate
- CARRY using an AND gate
A Full Adder adds:
- Input A
- Input B
- Carry In
It uses multiple logic gates to calculate the final SUM and CARRY OUT.
The Binary Calculator extends the Full Adder concept to perform 4-bit binary addition.
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.
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.
- HTML
- CSS
- JavaScript
- Git
- GitHub
Possible future improvements include:
- Visual circuit diagrams
- A larger multi-bit adder
- Interactive circuit building
- More digital logic components
- Additional computer architecture concepts
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.
Mouhamed Diaby
High school student interested in Electrical and Computer Engineering.



