The final post tallies everything: a working scientific calculator in 1,593 logic cells: 35% of a small, cheap FPGA with honest reflections on what the project taught and what it didn't quite nail. The keypad still isn't as satisfying as a vintage HP's, the TQFP-144 soldering was nerve-wracking, and the jump from "works on the bench" to "fits in a bag" was larger than expected. The joy, as always,…
The 2021 implementation worked, but "most results correct to around 12 digits" is not the same as what a 16-digit BCD machine should deliver. This post covers the 2025 rewrite: a ground-up redo of the arithmetic engine with proper guard digit and sticky bit tracking, banker's rounding, a full trig suite, ten STO/RCL memory registers, and a hardware LFSR random number generator validated throughout…
This post covers the hardware journey from a $5 EP2C5 dev board tethered to a ribbon cable to a single custom PCB with the FPGA soldered directly, a 3D-printed enclosure, and keycaps color-coded in HP's own yellow-and-red convention. Two programming connectors: JTAG for fast iteration during development, Active Serial for persistent flash, meant the edit-synthesize-test loop stayed quick right…
The C++ prototypes from earlier posts now pay off: each assembly file is a direct port of a verified reference implementation, tested against thousands of known-good vectors. This post covers writing the full calculator microcode — number input, display formatting, and the arithmetic functions — plus a small scripting interpreter that sits on top, letting complex operations like y^x collapse to…
No general-purpose CPU has nibble-addressable memory and addressing modes designed to walk a 16-digit BCD mantissa — so this post designs one. It covers the full instruction set architecture: 12-bit fixed-length instructions, a Harvard memory model, 14 ALU operations including BCD-adjust instructions borrowed from the 8086, and the iterative process of adding one instruction at a time, testing it…
Everything up to this point lived in software. This post covers the first PCB order — a keypad matrix and OLED display board connected to the EP2C5 dev board by a ribbon cable — and what it takes to go from a schematic in a browser-based editor to a board you can actually type on. Simulation tells you the logic is correct; hardware tells you whether the timing works and the parts behave as the…
Before writing a single line of calculator code, there is a question worth asking: how do you test hardware that does not exist yet? In this installment, I describe the framework I set up to run a single Verilog source unmodified across four very different environments: ModelSim for signal-level simulation, Verilator for cycle-accurate C++ modeling, Qt for a desktop prototype with a debugger…
Post 2 answered the feasibility question: yes, tan, ln, exp, and sqrt can all be computed from add, subtract, and The post A Calculator (3): Practical Numerical Methods appeared first on Baltazar Studios .
Every serious project has a phase that nobody talks or writes about much. It comes before you have a design, The post A Calculator (2): Pathfinding appeared first on Baltazar Studios .
The idea for this project came about during a week in February 2021 when the power grid failed here in The post A Calculator (1): Introduction appeared first on Baltazar Studios .