ANITA
The ANITA Mark VIII (also sold as the ANITA 1011), made by the Bell Punch company under the Sumlock / Anita brand in 1961, was the world's first all-electronic desktop calculator. It had no microprocessor — none existed — and no relays or motors: it was pure decimal cold-cathode-tube logic. This is a faithful authored model of it in pure JavaScript, with the parts that defined it: a full comptometer keyboard (a digit key per decimal column), a decimal arithmetic unit (add and subtract directly, multiply and divide by repeated addition and subtraction), and a Nixie / Numicator tube display. It boots showing the tubes at 0; the whole machine is drawn to the screen, and every part is exposed to the debugger so you can single-step the operation tape one op at a time.
The ANITA calculator history archive ↗
Runs on: Web browser
ANITA Online Emulator
Play ANITA using JavaScript directly in your browser.
Controls
Configurations
| Configuration | Emulator | Machine | OS | Legal | |
|---|---|---|---|---|---|
| ANITA 1011 (full keyboard) | ANITA | ANITA | open | Open ⛶ | |
| Add (123 + 456 = 579) | ANITA | ANITA | open | Open ⛶ | |
| Subtract (900 − 321 = 579) | ANITA | ANITA | open | Open ⛶ | |
| Multiply (123 × 9 = 1107) | ANITA | ANITA | open | Open ⛶ | |
| Divide (575 ÷ 5 = 115) | ANITA | ANITA | open | Open ⛶ |
Notes
Embedding
The ANITA here is authored from scratch in one small file, anita.js. It is a plain global — ANITA.create(canvas) returns a machine object whose whole state (the full keyboard, the accumulator and the operation tape) is ordinary JavaScript, so the debugger reaches straight into it with no wasm heap and no hidden loop.
Boot. Create the machine on a <canvas>, optionally load an operation tape, then run your own loop built on m.step() (consume exactly one tape op):
var m = ANITA.create(canvas);
var OP = ANITA.OP;
m.load([ // 123 + 456 =
{k:OP.KEY,shift:true,digit:1}, {k:OP.KEY,shift:true,digit:2}, {k:OP.KEY,shift:true,digit:3},
{k:OP.ADD}, {k:OP.KEY,shift:true,digit:4}, {k:OP.KEY,shift:true,digit:5}, {k:OP.KEY,shift:true,digit:6},
{k:OP.TOTAL}, {k:OP.HALT}
]);
(function turn(){
var r = m.step(); // 'ok' | 'idle' | 'halt' — one op
m.render();
if (r === 'ok') requestAnimationFrame(turn);
})();
The machine is plain fields. Everything the debugger needs is live on the object:
| Member | Kind | What it does |
|---|---|---|
m.step() | method | Consume exactly one operation-tape op; returns 'ok' / 'idle' / 'halt'. The single-step primitive. |
m.acc · m.entry | fields | The accumulator (shown on the tubes) and the full-keyboard ENTRY register (signed BigInt). |
m.pending · m.entering · m.error | fields | The pending operation, the "keying a number" flag, and the overflow lamp. |
m.opIndex | field | The tape reader's position (the program counter). |
m.enqueue(op) | method | Append one op to the tape — how the on-screen keypad and the physical keyboard inject presses. |
m.peekAcc() · m.peekEntry() · m.peekOp(a) | methods | Side-effect-free reads used by the debugger's registers and memory views. |
m.onWrite(reg,v) | hook | Called on every accumulator/entry write; the boot uses it for watchpoints. |
Because the whole machine is ordinary JavaScript, breakpoints are a host-side Set of op indices checked before each step(), and watchpoints are checked inside onWrite — no changes to the core.
Debugger integration
The plug-in (anita-debug.js) describes the machine to the shared debugger, and a new decoder (debugger/src/cpus/anita.js) makes the operation tape readable. The ANITA has no microprocessor, no bytes and no opcodes, so this is an unusual but faithful mapping:
- The operation tape is the program. The "disassembly" view decodes one operation per address instead of one byte:
KEY(a full-keyboard digit / column),ADDSUBMULDIV,TOTAL(the = key),CLEARandCLRALL. Anything unrecognised decodes to.op. - Registers are the arithmetic unit: the
ENTRYkeyboard register, theACCaccumulator, the tape readerOPIDX, thePENDpending-operation code, and theENTER/ERRORflags — read live and written back each refresh. (The numeric inputs show the low 32 bits; the tubes show the full value.) - Memory chips are the
tape(the operation tape, disassembled and side-effect-free) and thetubes(the live Nixie display, one digit per tube, read-only). - Single step is one
m.step()— the tape reader advances by one op. Breakpoints are host-side checks on the op index (click an op in the disassembly gutter); watchpoints fire insideonWritewhen the accumulator or entry register is written. - Like
cpus/analytical.jsandcpus/mix.js, the decoder cannot express a structured op through the byte-masked reader the view provides, so it reads the real op off the live core (window.EMU_BOOT.anita.tape) and falls back to a one-byte kind code only when the core is absent.
Architecture
The ANITA Mark VIII (also sold as the ANITA 1011), made by the Bell Punch company under the Sumlock / Anita brand in 1961, was the world's first all-electronic desktop calculator. It had no microprocessor — none existed — and no relays or motors: it was pure decimal cold-cathode-tube logic.
- The full keyboard — a comptometer-style grid: one column of digit keys (1–9) for each decimal place, so a whole number is set up at once by depressing one key per column. The keyed value is the machine's ENTRY register. This model exposes a column of keys per place plus the function keys.
- The counting tubes — the arithmetic unit was built from gas-discharge counting tubes (Dekatron-family) and cold-cathode gating tubes. Numbers were counted decimally, so addition and subtraction were direct, and multiplication and division were done by repeated addition and subtraction with decimal column shifting. This core multiplies and divides exactly that way and tallies the add/subtract cycles the tubes would have made.
- The display — a row of Nixie / "Numicator" cold-cathode indicator tubes, each glowing one decimal digit in orange neon, with leading zeros blanked, a sign indication and an overflow lamp.
There is no stored program: the "program" is the operator's own stream of keystrokes and function keys — modelled here as an operation tape so it can be single-stepped and disassembled. The ANITA proved electronic desk calculation was possible and quickly displaced mechanical comptometers.