Life & fun · December 30, 2024
WIP NandToTetris Emulator in pure C – logic gates to ALU to CPU to PC
* OPEN TO CONTRIBUTIONS * NandToTetris is a course which has you build a full computer from: Logic gates -> Chips -> RAM -> CPU -> Computer -> Assembler -> Compiler -> OS -> Tetris All this is done via software defined hardware emulation. I'm building an emulator for this entire stack in C. How is my approach different to other projects that build emulators? - No external dependencies (so far) - Start with a single software defined NAND gate in C - EVERYTHING is built from this base chip - Don't use certain programming utilities: boolean logic operators, bitwise logic operators etc Instead…
WIP NandToTetris Emulator in pure C – logic gates to ALU to CPU to PC launched on December 30, 2024 with 43 votes, #524 of 5,365 launches that month and more than 90% of that year's launches. The site was still online in September 2026, 1 year on.
In plain words
This is a pure C emulator project for the Nand2Tetris course that builds a complete computer system from basic logic gates upward. Starting with a single software-defined NAND gate, the project constructs everything—chips, RAM, CPU, assembler, compiler, and operating system—without external dependencies. It's designed for educators and students learning computer architecture who want to understand how digital systems work from first principles, with the unusual constraint of avoiding built-in boolean and bitwise operators to force implementation from foundational gates.
written from the facts on this page · September 2026
From the sources
Partially emulated HACK PC from primitive logic gates (in C) - con-dog/hack-emulator-c
A really simple way to start contributing would be to write some truth table tests for the logic gates, then move up to more complex components. #include <stdio.h> #include "test-nand.h" #include "nand.h" #include "test-utils.h" void test_nand ( Test_Counter * counter ) { // Truth table for NAND: expected outputs const int expected [ 4 ] = { 1 , 1 , 1 , 0 }; // outputs for (0,0), (0,1), (1,0), (1,1) for ( int i = 0 ; i < 4 ; i ++ ) { Nand nand = { . input . a = ( i >> 1 ) & 1 , // Gets first bit (0011) . input . b = i & 1 , // Gets second bit (0101) }; nand_gate ( & nand ); test_assert ( nand . output . out == expected [ i ], counter , "NAND(%d,%d) should be %d" , nand . input . a , nand .…from github.com
In the maker’s words, at launch
* OPEN TO CONTRIBUTIONS * NandToTetris is a course which has you build a full computer from: Logic gates -> Chips -> RAM -> CPU -> Computer -> Assembler -> Compiler -> OS -> Tetris All this is done via software defined hardware emulation. I'm building an emulator for this entire stack in C. How is my approach…
Does a similar job
all alternatives →
I made a programmable computer from NAND gates2024 · github.com · ▲420I am proud to present my solo hobby project NAND. This year-long undertaking follows the completed Nand to Tetris course, but ported to the web with its own runtime, user interface, and IDE. Using the "Load example program" selector, you can try out some programs I wrote on NAND's emulated hardware such as 2048, a genetic algorithm, and a manual stack overflow to corrupt the screen. Check out NAND at https://nand.arhan.sh Additionally, I've authored an extensive writeup about the project. Read about it on the GitHub repository's readme.
My summer project - simulated CPU built from NAND gates2011 · github.com · ▲17A simulated CPU built using only NAND gates. Contribute to IsaacLewis/NAND-CPU development by creating an account on GitHub.
Using SQL's Turing completeness to build Tetris2024 · github.com · ▲338Using SQL's Turing Completeness to Build Tetris. Contribute to nuno-faria/tetris-sql development by creating an account on GitHub.
A new hobby OS from “scratch” in C#2017 · github.com · ▲310A multitasking monolithic Kernel based x86 targeting Operating System written in C# from scratch aiming for high-level implementation of drivers in managed environment. - amaneureka/AtomOS
We built an 8-bit CPU as 2nd year EE studentsJun 2026 · github.com · ▲108Hi! me and my friends together built an 8 bit CPU implemented in Logisim purely from scratch. The control unit of this system does not implement the generic microcode ROM or any kind of RAM. This was made purely from discrete logic gates and coded the system to run different programs. key features: Custom 16-instruction Harvard ISA, 8-bit fixed format, 4 general purpose registers Hardwired control unit built entirely from AND/OR gate logic matrix Dual-phase clocking to eliminate race conditions Bootstrap Control Unit that cold-boots via ROM-to-RAM transfer Early-exit conditional…
- TITetris Implemented in ClojureScript2019 · djblue.github.io · ▲135
More life & fun this month
the category →
A free city-building game in your browser. You are the mayor. You know what the city needs. Now get it past the zoning board, the neighbors, the appeals court and the next election.
Life & fun · 4d ago · permit.petercai.com
- IV
Life & fun · 16d ago · tanzaniaeducationproject.org

Turn a phone, tablet or TV into a sign. Type a message and it fills the screen: welcome signs, timers, Wi-Fi passwords and more. No app, no account, free.
Life & fun · 17d ago · bigwords.page

Play a free virtual guitar online with your keyboard or by touch. Slow songs down and see every chord, string and strum. Acoustic, classic, electric and bass.
Life & fun · 10d ago · guitoro.com

Carrier settings from iPhone, Pixel and Galaxy firmware, decoded and compared: APNs, VoLTE, 5G and Wi-Fi Calling per carrier, and what each build changed.
Life & fun · 15d ago · carrierexplode.com

Life & fun · 24d ago · space.bl2.net
Source: Show HN post ↗ · launch text quoted in part