From codebreakers to millionaire-makers: the story of ERNIE

After the launch of Premium Bonds in November 1956, savers across the nation waited with bated breath for the first draw in June 1957. The monumental task of creating a machine that could routinely generate random numbers against which Bond holders’ certificates could be matched fell to a team that had already proven their engineering expertise during the Second World War.

Tommy Flowers, the designer of code breaking machine Colossus, was given the project to oversee the delivery of a piece of Electronic Random Number Indicator Equipment – or ERNIE for short – and Harry Fensom, who had also worked on Colossus, was its chief engineer.

Inspiring millions to save billions

Their concept and design would inspire millions of savers across the UK and further afield as Premium Bonds grew in popularity.

In ERNIE 4’s final draw in February 2019, there were over 22 million Premium Bonds holders, who had collectively invested over £78 billion.

Over 400 million winning numbers had been created, and nearly £20 billion in prizes had been paid out.

This is the story of ERNIE’s evolution as a random number generating machine.

ERNIE 1: Where dreams were made. Noisily.

The original (and some say best!) ERNIE was revealed to the public in 1957, shortly before the start of the first draw that June. The first draw would eventually take three days to complete in full.

To create random numbers, sensors counted the number of electrons passing through a neon diode at various intervals, and to ensure these were especially robust, each of the nine numbers or letters generated by ERNIE was the combination of two diodes’ electron output. The method of using thermal noise to generate and collect random outputs would be the cornerstone of ERNIE’s descendants too.

Dates active Jun 1957 - Jan 1973
Output (numbers / hour) 2,000 
Winning numbers generated 8,067,575
Total value of prizes £303,779,900

Find out how ERNIE 1 worked thanks to Virtual ERNIE on the Virtual Colossus website.

Hear from Phil Hayes, from The National Museum of Computing, about how the original ERNIE was developed.


ERNIE 2: Smaller, quicker, more productive

By the end of ERNIE 1’s lifespan, it was taking nearly 10 working days to generate all the winning numbers for Premium Bonds holders. The introduction of ERNIE 2 dramatically reduced the total time taken to complete the draw.

Although ERNIE 2 used similar technology, the increase in processing power and the efficiencies of new components meant that it was over 30 times faster – until the introduction of ERNIE 5, it was the biggest percentage increase between successive generations of ERNIE.

And it was necessary, because by the end of its lifespan, ERNIE 2 was needing to generate over 350,000 numbers in each draw.

Dates active Feb 1973 - Aug 1988
Output (numbers / hour) 65,000
Winning numbers generated 22,740,704
Total value of prizes £1,494,420,100

ERNIE 3: The original millionaire-maker

In over 30 years since the original ERNIE began generating random numbers, Premium Bonds had become an increasingly popular way for people to save money, with the chance of winning a life-changing amount of money in each monthly draw.

When launched in 1988, the top prize that the first number generated by ERNIE 3 could win was £250,000.

However, the first number generated by ERNIE 3 in April 1994 would produce the first ever Premium Bonds millionaire. A man from Surrey with £10,000 invested would find out from someone called Agent Million that their lucky Bond number - 29JZ644125 – had been the first one that month randomly generated by ERNIE.

Fundamentally, the technology behind the machine was still the same as that created by Tommy Flowers and Harry Fensom, but with massive advances in electronics and technology since the 1950s, the whole draw would take less than six hours to complete, despite the huge volumes of numbers required.

Dates active Sep 1988 - Mar 2004
Output (numbers / hour) 330,000 
Winning numbers generated 77,885,566
Total value of prizes £5,113,645,250



ERNIE 4: A step change in processing power

At the dawn of the new millennium, ERNIE 3’s components were beginning to become tired. Not just because of age, but because of the strain of having to consistently generate huge sequences of random numbers as Premium Bonds continued to be a popular savings choice.

Around 40 billion numbers were eligible to have won prizes in ERNIE 4’s first draw, rising to nearly 80 billion in its final event in January 2019.

To cope with this, ERNIE 4’s processing speed meant that it could generate 1 million numbers per hour – still using the same thermal noise process designed around half a century earlier, but at an astronomically faster rate.

Dates active Apr 2004 - Feb 2019
Output (numbers / hour) 1,000,000
Winning numbers generated 322,002,740
Total value of prizes £12,205,221,800
Promo media image

ERNIE 5: A leap into the quantum realm

ERNIE 5 is taking a leap into the quantum realm - using light rather than thermal noise to generate random numbers.

The behaviour of photons fired through ERNIE 5’s system produces a series of binary outputs, which, like its forebears, are matched with other sensors to generate the Bond numbers that customers are familiar with.

A draw that took over 8 hours to complete on ERNIE 4 takes less than 15 minutes on ERNIE 5, driven by an electronic chip smaller than a 5p piece.

But how can you prove it’s all random?

The test of proving that ERNIE’s outputs are robust has long been discussed by experts in the field of randomness.

However, from the outset, engineers working in conjunction with – but exclusive of – the ERNIE programme have proven that the numbers created by the machine are unpredictable and follow no set patterns.

The original system to test ERNIE’s randomness was called Pegasus, designed by Dame Stephanie Shirley, who went on to be one of Britain’s greatest computer engineers.

Since then, as with ERNIE’s evolution, testing randomness has developed and is now managed by the Government Actuary’s Department (GAD).

Each month after the Premium Bonds numbers have been generated, they are sent securely to GAD who run a number of tests to identify whether the outputs are truly random:

  • The frequency test – whether every possible character in each position of the Bond number appears as often as it should. 
  • The serial test – looking at the number of times one digit follows another (for example the number of 3s coming directly after 7s). 
  • The poker test – looking at the number of times that a group of characters generated consecutively contain four identical characters, three of a kind, two pairs, one pair and all different.
  • The correlation test – looking for correlation between characters in two different Bond positions over a series of Bond numbers. 

ERNIE has never failed to be anything but random in every test carried out by GAD.