Search › A-Z › I › IBM 650

IBM 650

1954 Open source · MIT Online

This is a from-scratch, in-browser emulator of the IBM 650 Magnetic Drum Data-Processing Machine, announced in 1953 and first delivered in 1954. It is a decimal machine with 2000 ten-digit words on a drum turning at 12,500 rpm. Every instruction holds the address of the next, because the next instruction can only be read when it comes round under the heads.

So where a program sits on the drum decides how fast it runs. The emulator is timed word by word from IBM's own sequence chart, and the page shows it: a map of the drum lights each word as it is used, and a bar shows the share of time spent waiting for the drum. By default it runs a demonstration written for this site, the same small loop placed three ways. Sequential placement takes about 2.3 seconds, optimum placement about 0.8 seconds, and placement that just misses each word about 3.9 seconds. All three punch the same answer.

The surface is the operator's console: bi-quinary display lights, storage entry and address switches, Control and Display switches, and the Start, Stop and reset keys, all live. The 533 read-punch takes card decks, typed or pasted. Other configurations run IBM's SOAP II assembler on an example from its manual, a short program from IBM's manual, and a blank drum for entering words by hand.

Because the entire machine is plain JavaScript, it plugs into the shared debugger: single-step the processor, watch the instruction address register advance twelve digits per instruction, disassemble the decimal op + P/Q addresses, set breakpoints and digit / flag watchpoints, and inspect every digit and flag of storage live.

Runs on: Web browser

IBM 650 Online Emulator

Play IBM 650 using JavaScript directly in your browser.

Configurations

ConfigurationEmulatorMachineOSLegal
Drum placement demonstration (written for this site)IBM 650IBM 650openOpen ⛶
SOAP II assembler (IBM, 1957)IBM 650IBM 650greyOpen ⛶
(A+B)xC/D, Figure 36 of IBM's manualIBM 650IBM 650greyOpen ⛶
Blank drum, console onlyIBM 650IBM 650openOpen ⛶

Machines emulated

Chips

Notes

Embedding

The core has no dependencies and no DOM, so it runs under Node as well as in a page. Load it, add the console if you want one, and own the loop:

<script src="ibm-650.js"></script>        // window.IBM650, the machine
<script src="ibm-650-render.js"></script> // window.Console650, the console on a canvas

var m = new IBM650();
m.loadDeck(cardText);          // 80-column cards into the read hopper
m.setSE(7019519999, 0);       // 70 1951 9999 in the storage entry switches
m.press('CRESET');             // Computer Reset puts 8000 in the address register
m.press('READSTART');
m.press('START');
m.advance(m.t + 10417);       // one second of drum: 10,417 word times
MemberWhat it does
m.advance(t)Runs half cycles up to word time t, or until something stops the machine. The drum keeps turning when it is stopped.
m.stepInsn()Exactly one instruction, ignoring the Half Cycle switch.
m.halfCycle()One half cycle.
m.press(id)A console key: START, STOP, TRANSFER, PRESET, CRESET, ARESET, ERESET, ESRESET, READSTART.
m.drum, m.drumSignThe 2000 words, magnitude and sign held apart so minus zero is a real value.
m.U, m.L, m.sign, m.dist, m.PR, m.ARUpper and lower accumulator, the accumulator sign, distributor, program register, address register. Address register is -1 when blank.
m.punchedEvery card punched, with its 80-column text and the word time it was punched.

The default deck is the machine's demonstration, written for this site. Load Cards takes any deck written in the same character set: 0-9, A-I for 12 over 1-9, J-R for 11 over 1-9, S-Z for 0 over 2-9, ? for 12 over 0 and ! for 11 over 0.

Debugger integration

The plug-in is ibm-650-debug.js. A new decoder, /debugger/src/cpus/ibm650.js, disassembles one word as operation, data address and instruction address. Because every instruction names its successor, the disassembly is a list of drum locations and not a program in order: follow the last field by hand, as a 650 programmer did.

Registers are decimal and the debugger's fields are hexadecimal, so decimal registers are shown as packed BCD: UPPER.H showing 00123 means digits 00123, and typing digits writes them back. Ten-digit registers are split into .H and .L. POS is the angular position under the heads and WORDTIME the running count in hexadecimal. The flags are A- and D- for the accumulator and distributor signs, OV for overflow, DH for the data half cycle.

Memory. The drum chip is word addressed, so the disassembler, the PC and breakpoints all follow the machine's word addresses, but the shared address column and address fields work in hexadecimal: location 0010 is 000A there. Each disassembly line starts with the real address, as in @0010. The hex column of this chip shows the two low digits of each word. drumbcd shows every digit, five bytes a word, and drumsign the signs. Reads go straight to the arrays and have no side effects. That is more than a real console can do: on the real machine a read-out goes through the distributor and destroys what was there, and the console keys here do that too.

Single step is m.stepInsn(), one whole instruction. The Half Cycle switch on the console steps half an instruction at a time. Execution breakpoints are checked before each instruction half cycle against the address register. Write watchpoints hook the one drum write path, m.poke, which stores and card reads both use. Pausing the debugger stops the emulator's clock and leaves the machine's own state alone.

Architecture

The IBM 650 Magnetic Drum Data-Processing Machine was announced in 1953 and first delivered in 1954. Close to 2,000 were built, which made it the first computer sold in any quantity. This is the basic machine: 2000 words of drum, no core, no index registers, no tape.

  • Decimal. A word is ten digits and a sign. The machine holds digits in bi-quinary, a two-state and a five-state part, and the ten display lights show exactly that: two lights over five. The arithmetic here is done on decimal digits; the two-out-of-seven checking is not modelled, so the validity lights never come on.
  • One-plus-one addressing. Each instruction is an operation code, a data address and the address of the next instruction. There is no program counter, so a program can sit anywhere on the drum.
  • Drum timing. The drum turns at 12,500 rpm with 50 words round each band, so a word goes by every 0.096 ms and a full turn takes 4.8 ms. An instruction must wait for its word to come round. The machine is timed word by word from the sequence chart in IBM's manual, including the two parallel branches of an arithmetic instruction and Interlock A, and the placement rule tables in the manual come out of it unchanged. Add an instruction and its data at the right places and the search is zero. Put them one word late and it takes nearly a whole turn.
  • The accumulator is 20 digits with one sign, upper half at 8003 and lower at 8002. The lower half can be read only on even word times and the upper only on odd ones, which the timing enforces. After a divide without reset, the upper half holds the remainder with its own sign until a reset. Minus zero is real and behaves as the manual describes.
  • The 44 operation codes of the basic machine are all here, including Table Lookup, Shift and Count and the Branch on 8 family. The storage entry switches are address 8000, so a machine can execute an instruction straight from the switches, and most card loaders do.
  • The console follows the manual: display, operation and address lights, operating and checking lights, storage entry, Programmed, Half Cycle, address selection, Control, Display, Overflow and Error switches, and the keys. A manual read-out or read-in goes through the distributor and destroys its contents, as the manual warns.
  • The 533 read-punch. A card read transfers the read buffer to the drum and then moves the next card into the buffer; 300 ms a card reading, 600 ms a card punching, with computing carrying on in between, held only by the R and P interlocks. Load cards bypass the control panel. The control panel itself is modelled as two fixed boards: an 8-word numeric board and SOAP II's alphabetic board. Column 2 is wired as the load-card selector, which is where SOAP II punches its own.

The software. The default demonstration was written for this site: one small loop that sums the squares from 1 to 50, placed three ways on the drum. Sequentially, as a beginner would, by the optimum rules in the manual, and one word late on purpose. It runs all three and punches a card for each with the same answer, 42925, and the time between cards shows the difference. SOAP II is IBM's own 1957 Symbolic Optimal Assembly Program, the condensed deck from its manual, assembling the manual's Example 1 with values of A, B and C added for this run. (A+B)xC/D is the program in Figure 36 of IBM's manual, with data cards written for this site.

Not modelled. Validity and clocking errors, because nothing here can fail, so the error switch, the error-sense light and those checking lights never act. Power sequencing and the master power switch. Plugging your own control panel. The End of File key: the last card reads without it. The feed's actuate delay is within the manual's range of 7 to 43 ms reading and 7 to 55.8 ms punching, but its phase is modelled, since the manual gives only the range. The 1000-word model, and the later 653 storage unit, index registers, floating point, tape and RAMAC. The drum map, the word-time counter and the speed switch are the emulator's own and are not on a real 650.