Search › A-Z › W › Harwell Dekatron Computer (WITCH)
Harwell Dekatron Computer (WITCH)
The Harwell Dekatron Computer, later the WITCH, is a 1951 decimal computer whose memory is a wall of glowing dekatron gas-discharge tubes — each tube stores one decimal digit 0-9 as a neon glow sitting on one of ten cathodes. This is an original, from-scratch simulation of it in the browser: the dekatron store, decimal addition with carries rippling tube to tube, multiplication by repeated addition and division by repeated subtraction (the real machine had no multiplier), and a paper-tape program stepped about once a second — so slow you can watch every carry. There is no binary processor and no stored-program ROM, so in place of a CPU debugger it exposes a dekatron-store and paper-tape inspector.
Runs on: Web browser
Harwell Dekatron Computer (WITCH) Online Emulator
Play the Harwell Dekatron Computer using JavaScript directly in your browser.
Controls
Configurations
| Configuration | Emulator | Machine | OS | Legal | |
|---|---|---|---|---|---|
| Running sum — the dekatrons count | Harwell Dekatron Computer (WITCH) | Harwell Dekatron Computer (WITCH) | open | Open ⛶ | |
| Factorial — multiply by repeated addition | Harwell Dekatron Computer (WITCH) | Harwell Dekatron Computer (WITCH) | open | Open ⛶ | |
| Fibonacci — numbers passed tube to tube | Harwell Dekatron Computer (WITCH) | Harwell Dekatron Computer (WITCH) | open | Open ⛶ |
Notes
Embedding
The machine is modelled from scratch in plain JavaScript. There is no binary CPU and no ROM: every number is held as an explicit column of dekatrons — a dekatron is a cold-cathode neon decade counter with ten main cathode positions round a ring, and a single glowing discharge marks the current decimal digit. Pulsing the guide cathodes walks the glow one step, so it counts 0→1→…→9→0 and carries on the roll-over. A bank of dekatrons is a decimal register; the "program" is a paper tape of decimal instruction frames stepped by a reader.
The tape reader is the loop. The host owns the run loop: it calls machine.stepOp() about once a second (authentically slow) so you can follow each carry; the renderer eases every glow toward its target so the transfer discharge is visible.
var w = new Witch('runsum'); // load a paper tape
w.stepOp(); // execute one tape operation (one add, one transfer…)
var acc = w.accValue(); // the accumulator's decimal value
var r0 = w.regValue(0); // store register R0
| Member | Kind | What it does |
|---|---|---|
w.store[i] / w.acc | field | A register = a bank of NDIG dekatrons (reg.dek[j], units at index 0) plus a sign lamp. Each dekatron carries its digit d and a live glow position. |
w.tape / w.pos | state | The paper tape (decimal [op, addr] frames) and the reader position — the "PC" the debugger breakpoints. |
w.stepOp() | method | Execute exactly one tape operation and advance the reader. |
w.writeReg(i, v) | method | Write a register (i = 0..7, or 8 for ACC); every changed dekatron steps to its new digit and the watchpoint hook fires. |
w.frameText(i) | method | The decoded mnemonic for tape frame i (used by the listing and the witch decoder). |
Debugger integration
witch-debug.js reads window.EMU_BOOT and hands the shared debugger a machine whose "CPU" is the dekatron store and whose "code" is the paper tape. Every debugger feature maps onto the real hardware.
- Registers = the dekatron banks.
ACCandR0…R7show the live decimal value of each bank of tubes and are editable — type a number and the dekatrons step to it.TAPEis the reader position andHALTthe stop latch. - Single-step = one operation. The Step control calls
transport.stepInsn, which runs exactly one paper-tape instruction (one add, transfer, multiply…) so you can watch a single carry ripple through the tubes. - Breakpoints on the tape. Execution breakpoints match the tape frame under the reader; the run loop stops when it reaches a marked frame.
- Write watchpoints on registers. A watchpoint fires when its dekatron register is written — a real "break when this number changes".
- Disassembly = the paper tape. A new
witchdecoder (debugger/src/cpus/witch.js) renders one row per tape frame — the raw decimalOO AApunch and its decoded mnemonic — so the code window literally lists the tape, advancing as the reader steps. - Memory. Two chips: the paper tape (one frame per address, witch-disasm) and the dekatron digit store (one decimal digit 0-9 per tube), both read side-effect free.
- Controls. The Controls window carries a keypad — Run, Stop, Step, Rewind, Reset and slower/faster — the same handlers as the page's keys.
Architecture
The Harwell Dekatron Computer was built between 1949 and 1951 at the Atomic Energy Research Establishment, Harwell, by a team including Ted Cooke-Yarborough, Dick Barnes, Ken Hird and Gurney Thomas. It was designed to be cheap and reliable rather than fast — to take over routine calculation from human "computers" — and it succeeded: it ran for years, often overnight and unattended. In 1957 it was given to Wolverhampton and Staffordshire Technical College for teaching and renamed the WITCH (Wolverhampton Instrument for Teaching Computation from Harwell). Restored at The National Museum of Computing in 2012, it holds the record as the oldest surviving working digital computer.
How dekatrons store decimal. A dekatron is a cold-cathode gas-discharge tube: a central anode surrounded by a ring of ten main cathodes (with guide cathodes between them). A neon glow discharge sits on exactly one main cathode, and applying pulses to the guide cathodes walks the glow one position round the ring — a decade counter that counts 0-9 and emits a carry pulse when it rolls over from 9 back to 0. So one dekatron holds one decimal digit, visibly, and a column of them is a decimal register. The machine had roughly ninety dekatrons for its fast store, holding numbers of eight decimal digits and a sign. Because the store is the display, you could literally watch a number being built up.
Decimal arithmetic, by counting. Control was relay logic and arithmetic was serial and decimal. Addition pulsed the units dekatron and let carries ripple up the column, tube by tube. There was no multiplier: multiplication was done by repeated addition and division by repeated subtraction, which is why a multiply took several seconds while an add took about one. That deliberate slowness — around one operation per second — is the whole character of the machine, and this model keeps it: the reader steps once a second and the dekatron glows sweep so you can follow every carry.
What this model does and does not claim. The dekatron store, the visible stepping and carries, the decimal add/subtract/multiply-by-addition/divide-by-subtraction scheme, the paper-tape reader and the teleprinter listing are modelled. The exact relay control matrix, the original tape character encoding and the precise store size and instruction format are represented by a clean, decimal, accumulator-plus-store scheme in the spirit of the real machine rather than reproduced gate for gate — the WITCH's control was relays, not a documented micro-order ROM. The demonstration tapes (running sum, factorial, Fibonacci) are original CC0 programs, chosen so the dekatrons visibly compute. Silent: the real machine clicked with relays; that audio is not modelled, so there is no Sound button.