What is the trick to engineering HP calculator keys? Nobody gets keys right like the old HP calculators.
In this age of 3D printing and fast prototypes, we really ought to be able to crack this.
They showed us how they computed the key dimensions and typography with an (HP) minicomputer, then had it print out the commands for some kind of numerically controlled cutting machine on paper tapes using an old ASR33 teletype.
The cutting machine generated moulds for the injection moulding machines making the keys.
The keys are in two parts: light coloured digits and symbols and darker plastic forming the shape of the key itself and surrounding the lighter symbol plastic. As a result, they can be worn down but they can never wear out.
"Sure!" (hands over HP-25C)
<start counting seconds...>
"Hey, where's the equals key?"
Blog post 6 had an error where the picture of a HP-71B (I have one and used its Forth/Assembler ROM manual to write the first HP-48 ROM decoder) where the caption says it is a 48GX (both used a Saturn CPU).
https://baltazarstudios.com/files/calculator-d/Calculator.ht...
https://baltazarstudios.com/files/calculator/Calculator.html
This WebAsm code is compiled using Qt and Verilator so it runs the "hardware" and its microcode inside the simple UI shell that provides the calc interface. In the debug version you can list the ucode, set breakpoints, see regs etc.
Really hoping that ghidra can add support for non-byte aligned memory regions some day. So many cool 4-bit architectures out there and attempting to shoehorn them into ghidra produces not great results
This is why network RFCs talk of "octets", to avoid the ambiguity. Octets are always 8 bits.
are there videos available?
Creating the kind of quality video we're all used to seeing is beyond my skill level and ... motivation.
Also, let us all hate on denomals! :)
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 FAULT state for microcode debugging
- CORDIC for trig functions, verified to 14 significant digits
- Two-pass assembler in Python (~700 lines)
- Verilator + Qt framework: same Verilog source runs in simulation, as a desktop GUI debugger, as WebAssembly, and on real hardware
- Scripting language on top of the microcode for adding functions without touching hardware
- Custom PCB (EasyEDA/JLCPCB), battery, charging circuit
Write-up: https://baltazarstudios.com
Hackaday: https://hackaday.com/2026/05/13/build-the-cpu-then-build-the...
I'm holding in my hand a 4-bit Von Neumann Mostek MK50310N that my father and I used to use to build calculators long ago. Although Mostek made chips for HP (such as the HP-35), they weren't commercially available, but the 50310 was. We could only dream of a project such as yours. I was happy when the "open source" NumWorks was released, but this project aligns more with my interests.
Will definitely install the Qt simulator - would be even better to build one IRL!
The first book match I get for "nibble" near "byte" is in the 1964 "System 360 Assembler Language" by Don H. Stabley uses nibble. The earliest match I can find for "nybble" in relation to computers was the 1968 "Encyclopedia of library and information science". Nybble (and likely nibble) itself doesn't seem to have taken off until around the mid 1970s https://books.google.com/ngrams/graph?content=nybble&year_st...
References to the coining of the term in 1958 of course don't provide a textual source.
I have in my hand (I guess I like using that phase today), my father's original receipt for the HP-45 (it's with the box and manual). $299.00 in 1975, which is $1,850 today(!!!).
Relatively speaking, electronics are very, very cheap today compared to what they used to be. Still appreciate that my $30 CASIO does 90% of that the NumWorks can do, but I'm happy to support upstarts such as NumWorks.
(* technically, a 'foot' is not a standard unit of measure but that's due to the long history of 'foot' not being standardized until relatively recently)
Zilog Z80 improved this, so that on it DAA could also be used after a subtraction, when it would correctly adjust the result for implementing BCD subtraction.
This was one of the Z80 improvements that were considered important at the time of its launch.
While I have never considered worthwhile to do BCD arithmetic instead of converting the decimal numbers to binary numbers, the DAA instruction on all Intel 8080 successors, including on IBM PC compatible computers, was very convenient for converting binary numbers to their ASCII character string hexadecimal representation, for printing or display purposes (because the decimal adjusting happens to add the correct ASCII offset between '0' ... '9' and 'A' ... 'F', so the conversion to ASCII can be done branchless).
On the Z80 and 8086, the code can be made one byte shorter by taking advantage of adjust-after-subtraction, which the 8080 didn't have (and on 6502 worked differently):
CP 10 / CMP AL,10 ;set carry if valid decimal digit
SBC A,69H / SBB AL,69H ;0..9 => 96h..9Fh (auxC=1), 10..15 => A1h..A6h (auxC=0)
DAA / DAS ;subtract 66h if auxC set, 60h if clear 12'b0000_0000_001?: begin : instr_daas // DAA, DAS
if (flags[BF_BIT])
rx[0] <= rx[0] + (op_is_daa ? 4'd6 : 4'd10);
flags[CF_BIT] <= flags[BF_BIT];
state <= FETCH;
end : instr_daas