It is hard to believe that a whole computer could be needed just to generate some random numbers, but this was the first ERNIE's role in life and in 1957 it was a sophisticated giant.
Why would you need so many high quality random numbers back in 1957? Could it be for Monte Carlo simulations or something deeply scientific?
In this case the answer is a lottery.
In 1956 the UK government decided that a way to get people to save was to institute a lottery, but one that didn't look like a lottery. They called the "investment" Premium Bonds and there was no guaranteed rate of return. Instead, every month a draw was conducted to see who had won the various prizes on offer.
The big problem was that, unlike most lotteries with a small number of prizes, this had lots of small prizes and a few bigger prizes and lots of people to pick from. At the end of 1956 nearly 50 million bonds had been sold and the serial numbers in use could accommodate 100 million.This wasn't going to be a job for a few balls in a tumbler machine. This needed industrial strength - random numbers in industrial quantities.
ERNIE with engineers (NS&I Copyright)
The first thing to realize is that there are two types of random number - pseudo and real. A pseudo random number generator produces the sort of random number that computers most often create. They aren't really random because they are produced by a program. All they are is unpredictable, unless you know or can work out the details of the generator.
You can't use pseudo random numbers for a lottery, no matter how good they are, because in principle they can be compromised and public confidence would be zero.
The solution has to be real random numbers generated by some process that is physically random and cannot be predicted - but what?
This might sound like an odd question because there seem to be sources of randomness all around us but - not inside a computer, not if it is working properly. A computer simply isn't random. It's a machine as regular as a clock, just more complicated.
To create true random numbers you have to add something to the basic design of a computer to create a random signal. In the case of ERNIE or the Electronic Random Number Indicator Equipment (an acronym made to fit a name if there ever was one) the source was a set of neon tubes. A neon tube is a glass tube filled with neon gas and with a high voltage applied at each end. The high voltage causes electrons to be ripped off the electrodes and a current flows through the tube. This current is what causes neon tubes to glow red but it is the way that it does this that is all important. The electrons collide with the neon atoms and the path of an electron through the tube is chaotic as a result the current has a very large random component.
In the computer the current coming from the tubes was amplified to make the noise dominate any steady current and then this was converted into pulses by a "slicing valve" - presumably a threshold device or level clipper. The output was then applied to a multivibrator circuit that cleaned the pulses up.
The circuit of the noise generator - click for larger image
On average the system got 3000 pulses per second out of the tube and these were used to drive a counter. The number of pulses per second was random and so the number of counts in a second had a random component - but it wasn't random because it fluctuated about the mean. To get a random number only the lowest order digit was extracted. Using just the lowest order digit allowed a "ring" counter to be used that counted mod 6, mod 10 or mod 24, To improve the randomness so that all digits were equally likely the counter was started off from different values each time - in practice just where ever it got to in the previous count.
A Noise Generator
The counters repeatedly went around and around as the random pulses were counted so this design is the electronic equivalent of a roulette wheel. It spins a random amount and where it stops is the random digit you need.
In the final design nine neon tubes were used to drive nine counters - the ninth counter was arranged to display a value from 0 to 22 to generate a letter (I, O and U were not used) as part of the overall 8 digit one letter serial numbers. To make sure that a fault in a tube couldn't cause non-random digits to creep in the tubes were doubled up and added together. The outputs were used to drive a teleprinter and the machine produces something like one random number every two or three seconds.
Although the design used mostly valve or vacuum tubes it also made use of some very modern design techniques including transistors and printed circuits - then called printed wiring boards.
ERNIE dressed up for public consumption (NS&I Copyright)
A nice touch was the the output was routed to an appropriate teleprinter in the section that keep the records for that particular premium bond code. Notice that the bond records weren't computerized. For the first draw 60,000 codes were generated to pick just 23,000 winners. The reason for the excess values generated was simply that the serial numbers of the bonds weren't consecutive and there were large gaps of number that didn't correspond to bonds that had been sold.
You can see Ernie 1 in action in the video:
The original machine was built at the Post Office Research Station by a team led by Sidney Broadhurst. The designers were Tommy Flowers and Harry Fensom - both of whom worked on the wartime Colossus computer.
ERNIE is said to have cost £25,000 and it was completed in 1957. It took typically 52 days to complete a draw and was tested by the UK Government Actuary's Department each time to prove its randomness.
A refurbished ERNIE at the London Science Museum by user:geni
Today there is still an Ernie but it is small and uses transistor thermal noise to generate random numbers 500 times faster than the original device. The original is on display in the Science Museum in London.
When it comes to the early days of the personal computer revolution, what happened in the UK was very different from what happened in the US. So don't imagine that the well- publicized stories of what [ ... ]