Skip to the content
2 layers86 × 115 mmLogic gate calculator, the printed circuit board in 3D

A basic calculator made entirely from scratch using logic gates.

Size
86 × 115 mm
Copper layers
2
Thickness
1.6 mm
Parts
77
Nets
110
Pads
275
Tracks, vias
1,065, 218
Pours
1
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
17 Mar 2026
Updated
30 Oct 2026

Overview

Logic gate calculator is an open-source printed circuit board by jaydenaleung, from the jaydenaleung/logic-gate-calculator repository on GitHub. It is a 2-layer board of 86 × 115 mm with 77 parts on 110 nets, routed with 1,065 tracks and 218 vias.

It is built around the L7805. Its parts include 30 resistors, 20 switches, 10 diodes, 9 capacitors and 7 ICs.

Main components

1

README

README.md

Logic Gate Calculator

A custom calculator on a printed circuit board (PCB), made entirely from logic gates. The calculator takes in any number of inputs from 0-9 and can output their sum (up to 9).

Hours Spent: 20

Overview

Logic Gate Calculator (LGC) is a PCB that employs multiple buttons, each mapped to a digit 0-9, and sums them when pressed. This sum is shown by lighting up an LED mapped to a specific output 0-9. The PCB is powered by a 5-12V and a ground pin, regulated to 5V. I hand-soldered all the through-hole components myself!

Photo0_LogicGateCalculator Photo1_LogicGateCalculator

Why I Did This Project

This project began as an assignment for the prerequisite course to the 2026 MIT BeaverWorks Basics of ASICs program. Since I did also that course the year before, I wanted to go further with the assignments. I took our material on logic gates to the max and decided to build a simple calculator from scratch, for which I did some extra research on adders/half-adders. This was just a fun little project! I really learned a lot about the fine complexities of computing.

Background

To lock in the theory, I first built every logic gate from bare transistors. I used those logic gates to build the adders and the binary/decimal encoders/decoders for the calculator.

Screenshot_2026-03-28_at_6 36 09_PM Screenshot_2026-03-28_at_6 36 26_PM

In the end, I came up with a pipeline that:

  1. Takes in inputs from push-buttons (corresponding to digits 0-9)
  2. Encodes them into binary using the Texas Instruments 74HC147 denary to binary IC
  3. Inverts the numbers (0 -> 1, 1 -> 0) due to the encoder's active-low nature, using the TI 74HC04 inverter IC
  4. Adds the binary values using the TI 74HC283 adder 4-bit adder
  5. Decodes the binary values into decimal outputs (up to 9) using the TI 74HC42 binary to denary IC
  6. Activates LEDs corresponding to the output digit (0-9)
Screenshot_2026-03-28_at_6 36 48_PM Screenshot_2026-03-28_at_6 37 48_PM Screenshot_2026-03-28_at_6 24 48_PM

Key Lessons

Initially, after soldering the components onto the entire PCB, I could not figure out why the voltage fluctuated randomly where it was supposed to be 5V. I suspected that an unconnected ground was picking up electrical noise or the voltage regulator was fried from an accidental short, I resoldered the entire board - only to find out that the issue was electrostatic discharge (ESD). (This is why I am wearing rubber gloves in the demo.) I learned that the L7805 linear regulator and other widely-used ICs can be generally resilient to low-voltage, quick shorts and that ESD is a larger issue when handling PCBs.

Parts

77
QtyValueFootprintReferences
2010kΩResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR31, R32, R33, R34, R35, R36, R37, R38, R39, R40, R41, R42, R43, R44, R45, R46 +4
10220ΩResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR51, R52, R53, R54, R55, R56, R57, R58, R59, R60
10LEDLED_THT:LED_D3.0mmD58, D59, D60, D61, D62, D63, D64, D65, D66, D67
70.1µFCapacitor_THT:C_Disc_D5.0mm_W2.5mm_P2.50mmC2, C3, C4, C5, C6, C7, C8
22.2µFCapacitor_THT:C_Disc_D6.0mm_W2.5mm_P5.00mmC1, C9
2N14SN74HC04N:SN74HC04NU34, U39
2N16CD74HC147E:CD74HC147EU36, U38
1L7805L7805CV:L7805CVU40
1N16CD74HC283E:CD74HC283EU37
1N16SN74HC42N:SN74HC42NU35
1Power_Dupont_Socket_ConnectorConnector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalJ1
1SW_0_in_AButton_Switch_THT:SW_PUSH_6mmSW21
1SW_0_in_BButton_Switch_THT:SW_PUSH_6mmSW31
1SW_1_in_AButton_Switch_THT:SW_PUSH_6mmSW22
1SW_1_in_BButton_Switch_THT:SW_PUSH_6mmSW32
1SW_2_in_AButton_Switch_THT:SW_PUSH_6mmSW23
1SW_2_in_BButton_Switch_THT:SW_PUSH_6mmSW33
1SW_3_in_AButton_Switch_THT:SW_PUSH_6mmSW24
1SW_3_in_BButton_Switch_THT:SW_PUSH_6mmSW34
1SW_4_in_AButton_Switch_THT:SW_PUSH_6mmSW25
1SW_4_in_BButton_Switch_THT:SW_PUSH_6mmSW35
1SW_5_in_AButton_Switch_THT:SW_PUSH_6mmSW26
1SW_5_in_BButton_Switch_THT:SW_PUSH_6mmSW36
1SW_6_in_AButton_Switch_THT:SW_PUSH_6mmSW27
1SW_6_in_BButton_Switch_THT:SW_PUSH_6mmSW37
1SW_7_in_AButton_Switch_THT:SW_PUSH_6mmSW28
1SW_7_in_BButton_Switch_THT:SW_PUSH_6mmSW38
1SW_8_in_AButton_Switch_THT:SW_PUSH_6mmSW29
1SW_8_in_BButton_Switch_THT:SW_PUSH_6mmSW39
1SW_9_in_AButton_Switch_THT:SW_PUSH_6mmSW30
1SW_9_in_BButton_Switch_THT:SW_PUSH_6mmSW40

Similar boards

  • 2 layers40.6 × 110 mmEuropi surface mount, the printed circuit board in 3D

    Europi surface mount

    Allen-Synthesis/EuroPi

    EuroPi: A reprogrammable Eurorack module based on the Raspberry Pi Pico

    92 parts584CC0-1.0
  • 2 layers132.1 × 45.7 mmIPoS, the printed circuit board in 3D

    IPoS

    peterheinrich/InternetOverSpaghetti

    Transmitting IP packages over a pair of spaghetti thus demonstrating how media independent IP really is.

    42 parts342
  • 2 layers59.7 × 57.5 mmFunBox, the printed circuit board in 3D

    FunBox

    GuitarML/FunBox

    Stereo guitar pedal platform using Daisy Seed.

    61 parts289MIT
  • 2 layers90.8 × 35.6 mmERCF easy brd, the printed circuit board in 3D

    ERCF easy brd

    Tircown/ERCF-easy-brd

    More informations on how to reset for flashing:\ https://wiki.seeedstudio.com/Seeeduino-XIAO/#enter-bootloader-mode

    28 parts195GPL-3.0
  • 2 layers111.3 × 106.4 mmSuper Sixteen v1, the printed circuit board in 3D

    Super Sixteen v1

    matthewcieplak/super-sixteen

    Code and schematics for the Super Sixteen Eurorack sequencer

    141 parts171
  • 2 layers91.4 × 71.1 mmPico w rover, the printed circuit board in 3D

    Pico w rover

    NikodemBartnik/Mini-Mars-Rover

    Educational robotic platform made to look like a mini mars rover

    20 parts143MIT
  • 2 layers144.1 × 182.2 mmSHVC CPU-01, the printed circuit board in 3D

    SHVC CPU-01

    starlightk7/OpenSFC

    OSHW Reproduction Parts related to the Super Famicom / Super Nintendo game console

    498 parts114CERN-OHL-S-2.0
  • 2 layers106.1 × 155 mmMotherboard, the printed circuit board in 3D

    Motherboard

    Redherring32/OpenTendo-TopLoader

    An Open Source HardWare (OSHW) recreation of the 1993 toploading NES motherboard (Also known as NES-101)

    84 parts94

Questions

How big is the Logic gate calculator PCB?

It measures 86 × 115 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Logic gate calculator use?

77 parts, built around the L7805. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Logic gate calculator KiCad files?

From the jaydenaleung/logic-gate-calculator repository on GitHub, at the commit this page was made from: the board is pcb/logic-gate-calculator.kicad_pcb and its schematic pcb/logic-gate-calculator.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Logic gate calculator design in my own project?

Its repository states no licence, so its author keeps all rights: ask jaydenaleung before reusing the design.