# Bull Gamma 3

The Gamma 3 was an early electronic vacuum-tube computer. It was designed by Compagnie des Machines Bull in Paris, France and released in 1952.
Originally designed as an electronic accelerator for electromechanical tabulating machines, similar to the IBM 604, it was gradually enhanced with new features and evolved into a first-generation stored program computer (Gamma AET, 1955, then ET, 1957). In its stored-program configurations, the Gamma 3 mostly competed with the IBM 650.
Over the course of its ten-year availability, this machine facilitated the transition from electromechanical unit records equipment to computers. The Gamma 3 was a commercial success, eventually selling more than 1200 units and prompting IBM to release the 1401 as a competitor.
The Gamma 3 was succeeded by the lower-end Gamma 10, the mid-range Gamma 30, and the large, high-end Gamma 60 mainframe.

## History

Until the 1950s, Compagnie des Machines Bull, like its rival IBM, primarily marketed punched card tabulators for inventory management, payroll, and accounting.
These tabulators performed arithmetic operations through a series of digit wheels driven by an electro-mechanical device. Only incrementation, and thus addition, was supported, making subtractions and multiplications particularly slow.
In order to increase the calculation speed and avoid delaying the reading of punched cards during more complex operations, an accelerator capable of overcoming electro-mechanical limitations became a necessity.
Starting in 1949, the Bull Company became interested in vacuum tubes for their switching speed compared to adding wheels and electromechanical relays. The computer was designed using logical circuits comprising around 400 vacuum tubes, 8000 germanium diodes and 48-bit registers made of electric delay lines to further reduce the dependency on vacuum tubes.
The machine has a clock speed of 281 kHz, higher than the 50 kHz of the IBM 604, and more importantly, several orders of magnitude faster than electromechanical devices. The execution time for adding two numbers was 680 μs, while multiplications took 5.7ms. The duration of instructions execution varied from 0.6 ms to 10 ms, with a mean time 2 ms. The Gamma 3 was connected to the tabulator through a cable plugged in place of its connection panel (where the program instructions were coded); thus, the program would now reside and run on the Gamma 3 computer rather than the tabulator.
Nevertheless, while the Gamma 3 was programmable through a removable connection panel similar to those of tabulators, it remained a peripheral device of the tabulator rather than the other way around. Furthermore, despite being electronic, binary, and having a Turing-complete instructions set, the Gamma 3 still lacked the ability to store programs in memory.
A first step towards a stored program configuration occurred with the Card Program (Programme Par Carte, PPC), introducing the capability to execute a program loaded from punched cards rather than hard wired onto a connection panel. IBM also experimented with a similar concept with the CPC (Card Programmed Calculator) extension added to the 604. However, while this would lift the limititation of 64 programming steps and allow arbitrary-sized programs to run, the programs were still not executed in main memory, so their execution speed depended on the reading speed of the punched cards containing the program.
The computer underwent a new upgrade in 1955 with the inclusion of a magnetic drum, adding 8192 words of memory, equivalent to 49 kB (64 tracks of 8 blocks of 16 words of 48 bits), a fairly generous amount for that time. Up to three instructions could be stored per word on the drum, allowing up to 25,000 instructions to fit. This new version was called Gamma 3 A.E.T (Armoire Extension Tambour, or Drum Extension Cabinet).
The programs were stored in the A.E.T.'s memory in groups of 48 instructions, referred to as "series". When needed, a series was moved from the drum to an intermediate memory group acting as an instruction cache, which allowed the computer to fetch each instruction one by one and transfer them into its instruction register. Interestingly, the instructions, particularly the addresses, could be altered within the computer's arithmetic unit, just like any other data. This capability paved the way for indirect or indexed addressing. The instruction cache also alleviated the issue found with the IBM 650, which required optimizing the arrangement of instructions on the drum to prevent its latency from slowing the program down.
As a last upgrade, the magnetic drum was doubled in height in 1957, reaching 16,384 words (98 kB) or 50,000 instructions, and a standalone operator console was included, featuring an oscilloscope CRT display and push buttons to examine memory and single step the code. This new configuration was called Gamma 3 ET, for Extension Tambour.
With its capability to load and execute programs in memory, the Gamma 3 in its AET and ET configurations became the first French commercial stored program computer (although SEA had built stored program computers earlier). The tabulator now served as an input/output device, while the Gamma 3 became a central processing unit with a Von-Neumann architecture. Gradually, the electromechanical unit record equipment gave way to electronic computers. The Gamma 3 ET positioned itself as a competitor to the IBM 650 computer, which had a very similar design.
The first client to receive a Gamma 3 was Crédit Lyonnais in Saint-Étienne in March 1953. The Gamma 3 and 3 ET were subsequently used both in business data processing within large companies and for scientific calculations, notably at the then-emerging CERN and CNRS or Air Liquide.
Bull never sold the Gamma 3 in America despite its partnership with Remington Rand - Univac and having a custom version with a 60 Hz power supply.
The Gamma 3 was a commercial success in Europe, with approximately 1200 units sold, outselling the IBM 650. The expanded Gamma 3 compared very favorably to its competitor: the memory space was four times larger and could store twelve times more instructions in memory, while the processing speed was generally higher. This success prompted IBM to design the 1401 in response.

## Memory organization

The Gamma 3 implements three kind of memories, which all are based on 48-bit words or 12 BCD characters.
The first kind are a group of seven registers at the heart of the CPU. M1, also called Operator Memory is the accumulator and has the adder-subtractor wired to it, with M2 the auxiliary accumulator for double-precision, 96 bits arithmetic. M3 to M7 are general purpose registers called Common Memories (Mémoires Banales). Transfers between them pass through M1. M0 is a special register linked to M1 and not available to the programmer.
Besides those generic registers, the Gamma 3 also uses six internal registers:
* MC: Comparison Memory. This register holds the result of a comparison instruction.
* MD: Shift Memory. This shift register is used for both BCD and arithmetic operations.
* MS1: Sign Memory. Stores the current arithmetic sign. MC, MD and MS1 all are linked to the accumulator and part of Operator Memory.
* NL: Line Number, which would now be called the Program Counter .
* RNL1 / RNL2 : Line Number Register, which acts as stack registers.
In order to reduce the number of electronic tubes, a common source of failures, the registers (common memories) use electric delay lines instead of flip-flops.
A second type of memory is known as Circulating Memories, which act as buffers, as their content is meant to be swapped from and to the drum memory. The circulating memories, denoted from M8 to M15, are implemented using magnetorestrictive delay lines in a separate, dedicated cabinet (ET). These eight memories are grouped in pairs to form four "groups". Groups 0, 1, and 2 are executable and referred to as "series", with each series serving as an instruction cache holding 48 instructions. The plugboard, when used, constitutes series 3. This would later be used for specific extensions shipped as wired subroutines.
Group 3 acts as an I/O buffer. An "Ordonnateur" (ORD) memory cabinet can also be added, providing an extra four groups (4 to 7), each one holding data, none of them executable.
Finally, the drum memory serves as a large swapping device hosting both code and data, and fed from punch cards. On the Gamma 3, code isn't executed from the drum but from the first three groups of the circulating memories. While this increases the execution speed, it also makes far jumps more costly, as a page must first be swapped from the drum to the MC memories with a dedicated instruction ("TB").
The drum consists of a Duralumin cylinder, 15 or 30 cm long, rotating at about 2,750 rpm. It hosts 64 or 128 tracks of 8 blocks, with each block containing a group, therefore the drum can store up to 1024 series, or 49,152 instructions. The recording density approached 300 bits per inch, using phase modulation, which was a record at that time.

## Instruction set

A Gamma 3 instruction consists of a 16-bit word composed of four hexadecimal numbers: an operation code (TO, Type d'Opération), an address (AD), a start order (OD, Ordre Début) and an end order (OF, Ordre Fin). The TO field specifies the general instruction type, while the three other fields acts as parameters. OD and OF sets positions, which can either be digits in binary mode or characters in BCD mode. A total of 29 mnemonics are provided in the instruction set.
No assembler, often called autocoder in those days, was initially provided, nor high-level languages like Fortran which were yet to be invented. Instead, the programmer would first create a flowgraph of the program, complete it with mnemonics, manually convert the mnemonics to machine code using a table, then write down the resulting code on a coding sheet for review before punching it onto cards. After loading the program into the drum memory, the operator panel would allow the programmer to examine and deposit data in memory, as well as control the program flow for debugging purposes.
Instructions reside in a series hosted in the circulating memories of the ET cabinet, where the code is fetched and decoded by the processor (the Gamma 3 cabinet). Short programs can be wired on the plug board, although most commonly they would be punched on cards and fed to the drum memory to be executed as a stored program.
The following table describes the instructions with their mnemonics and related machine code:
| Mnemonics | TO | AD | Description |
| V (Variante) | 0 | 0 | No operation (NOP) if OD and OF are also null |
| VS (Variante Systématique) | 0 | 0 | Jumps to OD + OF |
| VC (Variante Comparaison) | 0 | 1 | Jumps to OD + OF if MD <= 0 |
| | 0 | 2 | Jumps to OD + OF if MD != 0 |
| | 0 | 3 | Jumps to OD + OF if MD < 0 |
| | 0 | 4 | Jumps to OD + NF if MS1 is positive |
| VCS (Variante Changement de Série) | 1 | 0 | Jumps to address OD of Series OF Series must be 0, 1 or 2 |
| | 1 | 1 | VCS, then stores jump address + 1 to RNL1 |
| | 1 | 2 | VCS, then OD + 1 -> RNL2 |
| VRS (Variante Retour Serie) | 1 | 5 | RNL1 -> NL (jumps back to the address stored in RNL1) |
| | 1 | 6 | RNL2 -> NL |
| ES1 (Extraction Statique) | 1 | 8 | Sends data to Group 3 (IO register) |
| ES2 (Extraction Statique) | 1 | 9 | Sends data to Group 3 (IO register) |
| CD (Calcul Decimal) | 1 | 0xA | Sets the ALU to BCD mode |
| CO (Commutation d'Octade) | 1 | 0xC | Selects the "octade" (8 words) set in OF |
| CSZ (Commutation de Seizaine) | 1 | 0xD | Selects the "seizaine" (16 words) set in OF |
| CB (Calcul binaire) | 1 | 0xF | Switches the ALU to binary (scientific) mode |
| BT (Banale->Tambour) TB (Tambour->Banale) | 2 | | Transfers Group AD to/from block OF of track OD of the drum. Last position of OF sets T->B or B->T |
| ZB (Zéro Banale) | 3 | | Resets register AD between positions OD and OF |
| KB (Constante Banale) | 4 | | Writes the value OF at position OD of register AD |
| GG (Groupe -> Groupe) | 5 | 0 | Copies Group OD to Group OF |
| IS (Introduction Statique) | 5 | | Receives data from peripheral (usually a punch card reader) mapped to channel AD |
| BO (Banale -> Operative) | 6 | 0 | Resets M1, then sets position 0 to 1. Resets MD (shift register). |
| | 6 | | Resets M1, then transfer register AD to M1 between positions OD and OF. Resets MD. |
| AMD (Alteration Mémoire Décalage) | 7 | 0 | Sets MD to 1 |
| BD (Banale -> Décalage) | 7 | 2 | Sets MD with position OD of M2 |
| IL (Intersection Logique) | 7 | 0xA | Logical AND between 1 and each position in M1 |
| | 7 | 0xC | Logical AND between M1 and M2 |
| OB (Opérateur -> Banale) | 8 | 1 | Sets M1 to zero between positions OD and OF |
| | 8 | | Shifts M1, then copy positions OD to OF to register AD between the same positions |
| CN (Comparaison Normale) | 9 | 0 | Shifts M1, then compares position OD to 1 and sets the result to the Comparison Register (MC) |
| | 9 | | Shifts M1, then compare its content to register AD between positions OD and OF. Sets the result to MC |
| AN (Addition Normale) | 0xA | 0 | Shifts M1, adds 1 to position 0 |
| | 0xA | | Shifts M1, adds M1 to the value of register AD between positions OD and OF, writes the result to M1 |
| SN (Soustraction Normale) | 0xB | 0 | Shifts M1, subtracts 1 to M1 from position 0 |
| | 0xB | | Shifts M1, subtract M1 from register AD from position OD to OF, writes the result to M1 |
| MR (Multiplication Réduite) | 0xC | | Multiplies the number in M1 by register AD between positions OD and OF, puts the result in M1 |
| DR (Division Réduite) | 0xD | | Divides the number in M1 by register AD between positions OD and OF, puts the result in M1 |
| MC (Multiplication Complète) | 0xE | | Double precision multiplication. Multiply M1 by the value of register AD between positions OD and OF, sets the results in M1-M2 |
| DC (Division Complète) | 0xF | | Double precision division. Divides the number in M1-M2 by the value of register AD between positions OD and OF. Quotient is written to a part of M2 and the remainder in M1-M2 |
Since the plugboard was mapped to series 3, some extensions and subroutines eventually became shipped as pre-wired plugboard programs. One such example was the 'PDF' extension (Point Decimal Flottant, or Floating Point Decimal), which added two extra instructions: BD and DCC to facilitate the use of floating-point numbers.
The complete descriptions of the instruction set, along with programming examples, can still be found nowadays in some programming courses from the 1950s.
In the later days of the Gamma 3, a high-level language was implemented by a team of students led by professor Pierre Bacchus from University of Lille. This language, Auto-Programmation Bull (APB) mixed elements of the Gamma 3 assembly language with structured elements of what would become ALGOL 60. It eventually proved fairly popular in the Gamma 3 user group and was later ported to the IBM 1620.

## Historical and technical particularities

The Gamma 3 features a dual-mode ALU, capable of operating both in decimal mode (12-character BCD words) for business data processing, or in binary mode (48-bit words) for industrial and scientific computing. Some dedicated instructions, CD and CB, allow the switching between the two modes.
As an uncommon feature for the 1950s, the Gamma 3 was optionally equipped with a hardwired floating-point library. This model, known as the Gamma 3M, was intended for scientific calculations. Eventually, this capability became built into the Gamma 3 ET.
Floating-point numbers are represented by 48 bits. The first bit is used for the sign, the next eight bits are used for the exponent, and the next 39 bits are used for the significand (also commonly called mantissa).
In the late 1950s, Professor Louis Bolliet conducted the first university programming courses in France using Gamma 3 ET machines, marking a shift from manufacturer-provided courses to an academic framework. These courses are now available online and have been instrumental in the creation of Gamma 3 simulators.
The Gamma 3 was the first computer produced in more than a thousand units.

## Preservation

Four examples of the Gamma 3 still exist. One is exhibited at Technikum museum near Frankfurt, another at the Fédération des Équipes Bull in Angers, France, where it was manufactured, and another one in Museo degli Strumenti per il Calcolo in Pisa, Italy. Lastly, the ACONIT museum in Grenoble, France, houses a unique specimen of the Gamma 3 ET.

## Gallery

* Another view of the CPU cabinet
* Details of the CPU racks
* Interior view of the Bull Gamma 3
* Close-up view of the Gamma 3 vacuum tube electronic circuits
* A memory extension cabinet
* Gamma 3 plug board. In stored program configuration, programs are loaded from punch cards instead.
* Power supplies