nowfound

Commerce · May 15, 2026

A nibble-oriented CPU in Verilog to build a scientific calculator

The core question: how did HP's scientific calculators actually work at the gate level? That rabbit hole led to building one from scratch. The architectural decision everything else follows from: a decimal calculator should store numbers as BCD — one decimal digit per 4-bit nibble. A standard byte-oriented CPU (Z80, 6502) fights that layout constantly. So I designed a small custom CPU in Verilog where 4 bits is the natural data width and memory is nibble addressable. What the project covers: - Custom CPU: Harvard architecture, 12-bit ISA, 8-state execution FSM, hardware stack guard with a…

A nibble-oriented CPU in Verilog to build a scientific calculator launched on May 15, 2026 with 119 votes, #238 of 20,538 launches that month and more than 95% of that year's launches.

Visit github.com ↗Alternativestop 1% of May 2026

In plain words

This project is a custom CPU designed in Verilog specifically for building scientific calculators, inspired by how HP calculators operated at the hardware level. The CPU uses a nibble-oriented architecture (4-bit data width) with BCD number storage, making it naturally suited for decimal calculations rather than forcing them through byte-oriented processors. It includes a Harvard architecture, custom instruction set, hardware stack protection, and CORDIC algorithms for trigonometric functions. The project provides a two-pass assembler, simulation framework compatible with multiple platforms including WebAssembly, and supporting documentation for understanding calculator design fundamentals.

written from the facts on this page · September 2026

From the sources

From FPGA Gates to Scientific Calculator. Contribute to gdevic/FPGA-Calculator development by creating an account on GitHub.

This project implements a fully functional scientific calculator in hardware using an FPGA. It includes a custom soft CPU, microcode firmware, and supporting tools. # From WSL2 cd /mnt/c/Projects/FPGA-Calculator/verilog make qt Then open Qt/Calculator.pro in Qt Creator and build for "Desktop Qt MSVC2022 64 Bit". Verilator runs in WSL2 (Windows Subsystem for Linux). The project source files reside on a Windows partition and are accessed from WSL2. # Install prerequisites sudo apt-get install build-essential autoconf flex libfl-dev bison # Clone and build Verilator git clone https://github.com/verilator/verilator cd verilator git checkout v5.042 # For Desktop, or v4.228 for WebAssembly…from github.com

In the maker’s words, at launch

The core question: how did HP's scientific calculators actually work at the gate level? That rabbit hole led to building one from scratch. The architectural decision everything else follows from: a decimal calculator should store numbers as BCD — one decimal digit per 4-bit nibble. A standard byte-oriented CPU (Z80…

Does a similar job

all alternatives →
  • Open-source engine running Gemma 4 26B in 2 GB RAM on any M-series MacJul 2026 · github.com · ▲919

    Hi HN, I built a specialized inference engine for running 4-bit Gemma 4 26B-A4B-IT on any M-series Mac using about 2 GB of RAM. It is called TurboFieldfare and is written in Swift and Metal. I have always adored on-device AI. It feels like magic that you can run a powerful NN on your Mac or iPhone. So I wanted to push the limits a bit and run a model whose weights don’t fit in memory. The model’s 4-bit quantized weights occupy roughly 14 GB, which makes running it with conventional inference tools almost impossible on an 8 GB or even 16 GB Mac once the OS, applications, and KV cache are…

  • We built an 8-bit CPU as 2nd year EE studentsJun 2026 · github.com · ▲108

    Hi! 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…

  • I made a web-based notepad with a built in unit calculator2022 · numpad.io · ▲488

    I launched NumPad v1 on here a few years ago, and back then it wasn't much more than a thin CodeMirror wrapper around the calculator engine I'd written. Now I've rewritten it as a PWA that supports multiple documents, persists them to IndexedDB, and has a syncing service for paying customers. Syncing is handled by Automerge[1] under the hood, which should make it relatively easy to get document sharing working too. [1] https://automerge.org/

  • H1
    Homebrew 16bit CPU from 74HC logic with C compiler and Unix-like OS2023 · sol-1.org · ▲192

    This is a 16bit CPU+Minicomputer from pure 74 series logic. It has user/kernel modes, virtual memory, prioritized IRQ's and DMA. It has a full C compiler and a unix-like OS. It's still in development.

  • KnightOS2016 · ▲136

    An open-source OS for calculators

  • AD
    All desktop software calculators are wrong, so I had to build my own2022 · ▲286

    A new calculator software cannot really bring attention (https://chachatelier.fr/chalk/) However, I wrote a full article explaining why I had to build something "new" that does not behave like usual desktop calculator softwares : TL;DR All "small" calculator softwares I know share the same design flaws. And the GUI is not the only stumbling block in their poor efficiency. Handling correctly numerical approximations - expected or not - is crucial to trust the results. It is usually not done in lightweight tools. It should. So I prove that if I could do it, OS manufacturers…

Source: Show HN post ↗ · launch text quoted in part

Launched alongside, May 2026

the whole month →
  • Brew ▲900

    Like Claude design for email marketing

    AI · May 2026 · brew.new

  • Parallel agents, diff reviewer, and multi-model comparisons

    Dev tools · May 2026 · kilo.ai

  • StoreClaw▲806

    Grow your store profits with agents that know how to sell

    AI · May 2026 · storeclaw.ai

  • Give your agent a real number and voice to make calls.

    AI · May 2026 · pollyreach.ai

  • Hey HN, Henry here from Cactus. We open-sourced Needle, a 26M parameter function-calling (tool use) model. It runs at 6000 tok/s prefill and 1200 tok/s decode on consumer devices. We were always frustrated by the little effort made towards building agentic models that run on budget phones, so we conducted investigations that led to an observation: agentic experiences are built upon tool calling, and massive models are overkill for it. Tool calling is fundamentally retrieval-and-assembly (match query to tool name, extract argument values, emit JSON), not reasoning. Cross-attention…

    Life & fun · May 2026 · github.com

  • 🌱 Private, quiet space for thinking. Simple app for .md files. - zakirullin/files.md

    Dev tools · May 2026 · github.com