Skip to the content
2 layers59 × 63 mmMain control, the printed circuit board in 3D

Main control

tmarhguy/alu48

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

Size
59 × 63 mm
Copper layers
2
Thickness
1.6 mm
Parts
42
Nets
162
Pads
348
Tracks, vias
0, 0
Routed
Not yet
KiCad
KiCad 9.0 (file 20241229)
Created
21 Jul 2025
Updated
5 Jun 2026

Overview

Main control 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 59 × 63 mm with 42 parts on 162 nets.

It is built around the 74HC157D. Its parts include 26 transistors, 14 ICs and 2 connectors. It belongs with the retro computing and games boards of this library.

Main components

1

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

42
QtyValueFootprintReferences
1474HC157Package_SO:SOIC-16_3.9x9.9mm_P1.27mmU201, U202, U203, U204, U205, U206, U301, U302, U303, U304, U305, U306, U1001, U1002
13NMOSPackage_TO_SOT_SMD:TSOT-23Q401, Q404, Q406, Q501, Q504, Q506, Q602, Q802, Q901, Q904, Q906, Q1002, Q1003
13PMOSPackage_TO_SOT_SMD:TSOT-23Q402, Q403, Q405, Q502, Q503, Q505, Q601, Q801, Q902, Q903, Q905, Q1001, Q1004
1Conn_01x12_SocketConnector_Harwin:Harwin_Gecko-G125-FVX1205L0X_2x06_P1.25mm_VerticalJ102
1Conn_01x34_PinConnector_Harwin:Harwin_Gecko-G125-FVX3405L0X_2x17_P1.25mm_VerticalJ101

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 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 layers57.5 × 36 mmGate or 2in, the printed circuit board in 3D

    Gate or 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 layers245.1 × 160 mm8-Bit CPU 32k, the printed circuit board in 3D

    8-Bit CPU 32k

    slu4coder/Minimal-64x4-Home-Computer

    My DIY TTL home computer with VGA and PS/2 and 4x the processing power of a Commodore C64 or Apple II.

    139 parts326
  • 2 layers229.9 × 111.8 mmAvr colorvideo, the printed circuit board in 3D

    Avr colorvideo

    74hc595/Amethyst

    8-bit ATmega1284 retro computer

    148 parts306BSD-3-Clause
  • 2 layers216 × 150 mmMotherboard-101, the printed circuit board in 3D

    Motherboard-101

    artemisamsx/artemisa

    Schematics, PCB designs and HDL simulations to build a 8-bits MSX computer

    124 parts67
  • 2 layers177.8 × 130.8 mmDurango, the printed circuit board in 3D

    Durango

    zuiko21/minimOS

    Scalable OS for 6502/65816

    159 parts23MIT
  • 2 layers152.9 × 74.9 mmClock, the printed circuit board in 3D

    Clock

    erikvanzijst/clock

    24H digital quartz clock from scratch

    82 parts21
  • 2 layers208 × 110 mm8 16 computer 2, the printed circuit board in 3D

    8 16 computer 2

    halfburnttoast/TCPU816-v1

    Version 1.1 of my 8-bit, TTL computer.

    120 parts21
  • 4 layers158.8 × 104.1 mm8-Bit CPU, the printed circuit board in 3D

    8-Bit CPU

    frenchie/8-Bit-Computer

    An 8-Bit Computer

    323 parts20
  • 2 layers69.8 × 31.8 mmGen to pce, the printed circuit board in 3D

    Gen to pce

    rattboi/gen-to-pce-controller-adapter

    Simple Genesis 3-button to PC-Engine adapter ============================================

    13 parts20

Questions

How big is the Main control PCB?

It measures 59 × 63 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Main control use?

42 parts, built around the 74HC157D. 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 Main control KiCad files?

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

Can I use the Main control 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).