Skip to the content
2 layers57.5 × 36 mmGate or 2in, the printed circuit board in 3D

Gate or 2in

tmarhguy/alu48

8-bit combinational ALU built from scratch with 3,488 CMOS transistors (KiCad + SPICE + Logisim + 1.24M tests

Size
57.5 × 36 mm
Copper layers
2
Thickness
1.6 mm
Parts
9
Nets
7
Pads
21
Tracks, vias
40, 3
Pours
2
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
21 Jul 2025
Updated
5 Jun 2026

Overview

Gate or 2in is an open-source printed circuit board by tmarhguy, from the tmarhguy/alu repository on GitHub, published under the MIT licence. It is a 2-layer board of 57.5 × 36 mm with 9 parts on 7 nets, routed with 40 tracks and 3 vias.

It belongs with the retro computing and games boards of this library.

README

schematics/kicad/boards/flags/README.md

Flags Generation Board

Comparison and status flag generation


Function

Generate 4 flags for ALU status and comparison:

  • LESS: A < B (magnitude comparison)
  • EQUAL: A == B (equality check)
  • POSITIVE: OUT > 0 (positive result)
  • COUT: Carry out (from adder)

Schematic

![Flags Schematic](../../../../media/schematics photos svg/flags.svg) Flags generation circuit


Flag Implementations

EQUAL Flag (~100T)

Function: Detect A == B

Logic:

text
EQUAL = ~((A[7] XOR B[7]) | (A[6] XOR B[6]) | ... | (A[0] XOR B[0]))

Implementation:

  • 8× XOR gates (96T)
  • 8-input NOR gate (16T)

LESS Flag (~120T)

Function: Detect A < B

Logic: Cascaded priority comparison (MSB first)

Implementation: ~120T comparator logic

POSITIVE Flag (~20T)

Function: Detect OUT > 0

Logic:

text
NOT_ZERO = OUT[7] | ... | OUT[0]
POSITIVE = ~OUT[7] & NOT_ZERO

COUT Flag (0T)

Function: Pass carry from adder

Implementation: Direct wire


Signals

Inputs:

  • A[7:0], B[7:0] - For comparison
  • OUT[7:0] - For POSITIVE detection
  • COUT_IN - From adder

Outputs:

  • LESS, EQUAL, POSITIVE, COUT

Last Updated: 2026-01-16

Parts

9
QtyValueFootprintReferences
3NMOSPackage_TO_SOT_THT:TO-92_Inline_WideQ3, Q4, Q6
3PMOSPackage_TO_SOT_THT:TO-92_Inline_WideQ1, Q2, Q5
1OR_IN_ATestPoint:TestPoint_Pad_D2.0mmTP1
1OR_IN_BTestPoint:TestPoint_Pad_D2.0mmTP2
1OR_OUTTestPoint:TestPoint_Pad_D2.0mmTP3

More from tmarhguy/alu

12
  • 2 layers110 × 117 mmAdd sub, the printed circuit board in 3D

    Add sub

    tmarhguy/alu

    8-bit combinational ALU built from scratch with 3,488 CMOS transistors (KiCad + SPICE + Logisim + 1.24M tests

    200 parts48MIT
  • 2 layers101 × 68 mmLed panel 1, the printed circuit board in 3D

    Led panel 1

    tmarhguy/alu

    8-bit combinational ALU built from scratch with 3,488 CMOS transistors (KiCad + SPICE + Logisim + 1.24M tests

    131 parts48MIT
  • 2 layers78.5 × 68.5 mmLed panel 2, the printed circuit board in 3D

    Led panel 2

    tmarhguy/alu

    8-bit combinational ALU built from scratch with 3,488 CMOS transistors (KiCad + SPICE + Logisim + 1.24M tests

    129 parts48MIT
  • 2 layers98.5 × 95.5 mmMain logic, the printed circuit board in 3D

    Main logic

    tmarhguy/alu

    8-bit combinational ALU built from scratch with 3,488 CMOS transistors (KiCad + SPICE + Logisim + 1.24M tests

    122 parts48MIT
  • 2 layers59 × 63 mmMain control, the printed circuit board in 3D

    Main control

    tmarhguy/alu

    8-bit combinational ALU built from scratch with 3,488 CMOS transistors (KiCad + SPICE + Logisim + 1.24M tests

    42 parts48MIT
  • 2 layers43.5 × 50.5 mmLed panel 3, the printed circuit board in 3D

    Led panel 3

    tmarhguy/alu

    8-bit combinational ALU built from scratch with 3,488 CMOS transistors (KiCad + SPICE + Logisim + 1.24M tests

    35 parts48MIT
  • 2 layers41 × 35.5 mmFlags, the printed circuit board in 3D

    Flags

    tmarhguy/alu

    8-bit combinational ALU built from scratch with 3,488 CMOS transistors (KiCad + SPICE + Logisim + 1.24M tests

    26 parts48MIT
  • 2 layers77.5 × 43 mmGate xnor 2in, the printed circuit board in 3D

    Gate xnor 2in

    tmarhguy/alu

    8-bit combinational ALU built from scratch with 3,488 CMOS transistors (KiCad + SPICE + Logisim + 1.24M tests

    19 parts48MIT
  • 2 layers72 × 42.5 mmGate xor 2in, the printed circuit board in 3D

    Gate xor 2in

    tmarhguy/alu

    8-bit combinational ALU built from scratch with 3,488 CMOS transistors (KiCad + SPICE + Logisim + 1.24M tests

    19 parts48MIT
  • 2 layersGate and 4in, the printed circuit board in 3D

    Gate and 4in

    tmarhguy/alu

    8-bit combinational ALU built from scratch with 3,488 CMOS transistors (KiCad + SPICE + Logisim + 1.24M tests

    10 parts48MIT
  • 2 layers42.5 × 32.5 mmGate and 2in, the printed circuit board in 3D

    Gate and 2in

    tmarhguy/alu

    8-bit combinational ALU built from scratch with 3,488 CMOS transistors (KiCad + SPICE + Logisim + 1.24M tests

    9 parts48MIT
  • 2 layers18.5 × 32.8 mmGate nand 2in, the printed circuit board in 3D

    Gate nand 2in

    tmarhguy/alu

    8-bit combinational ALU built from scratch with 3,488 CMOS transistors (KiCad + SPICE + Logisim + 1.24M tests

    7 parts48MIT

Similar boards

  • 2 layers103 × 30.5 mmTS Back Endcap, the printed circuit board in 3D

    TS Back Endcap

    EEVengers/ThunderScope

    ThunderScope GitHub Repo

    9 parts1.3kMIT
  • 2 layers31.8 × 47.6 mmNGC 38 connector, the printed circuit board in 3D

    NGC 38 connector

    rusefi/rusefi

    rusefi - GPL internal combustion engine control unit

    9 parts1.2k
  • 2 layers24 × 27.3 mmExpansion Card Retrofit, the printed circuit board in 3D

    Expansion Card Retrofit

    FrameworkComputer/ExpansionCards

    Reference designs and documentation to create Expansion Cards for the Framework Laptop

    9 parts1.1kCC-BY-4.0
  • 2 layers15.6 × 17.3 mmSKR Mini TFT Thermistor Board, the printed circuit board in 3D

    SKR Mini TFT Thermistor Board

    VoronDesign/Voron-Hardware

    Cool Hardware designed by the Voron Design group

    9 parts1.1kGPL-3.0
  • 2 layers39.1 × 49.5 mmLearnoliver, the printed circuit board in 3D

    Learnoliver

    hackclub/OnBoard

    💡 Join 1,000 teenagers and make your first PCB with a $100 grant!

    9 parts915
  • 2 layers17.4 × 16.9 mmToolhead, the printed circuit board in 3D

    Toolhead

    tanaes/whopping_Voron_mods

    9 parts787GPL-3.0
  • 2 layers9.8 × 108 mmExpander, the printed circuit board in 3D

    Expander

    wntrblm/Castor_and_Pollux

    A Juno-inspired dual oscillator

    9 parts587
  • 2 layersKeyboard after, the printed circuit board in 3D

    Keyboard after

    adamws/kicad-kbplacer

    KiCad plugin for automatic keyboard's key placement and routing

    9 parts547GPL-3.0

Questions

How big is the Gate or 2in PCB?

It measures 57.5 × 36 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Gate or 2in use?

9 parts. 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 Gate or 2in KiCad files?

From the tmarhguy/alu repository on GitHub, at the commit this page was made from: the board is schematics/kicad/modules/gates/gate_or/gate_or_2in/gate_or_2in.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.

Can I use the Gate or 2in design in my own project?

Its repository publishes it under the MIT licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).