Nibble-wide CPU · Verilog

A scientific
calculator, four bits at a time.

A documented stack machine. The testbench feeds 3.1416 ENTER 2 ÷ and checks the rounded result against the fixture.

t=12 PUSH 31416
t=18 PUSH 2
t=24 DIV
t=31 DISP 1.5708
rounding half-even, 5 digits
Y 3.1416
X 2
1.5708