The Bank of England on Thursday unveiled a new design for Britain's top-value banknote featuring gay World War II code-breaker Alan Turing, celebrating diversity even as cash falls out of favour.

The more durable and forgery-secure ?50 polymer note (worth about $70 or 60 euros) will enter circulation on June 23, Turing's birthday, the UK's central bank said.

Turing was a mathematician and is considered the father of modern computing. He spearheaded a team at Britain's Bletchley Park that cracked the Nazis' Enigma code in 1941.

"He was also gay, and was treated appallingly as a result," Bank of England governor Andrew Bailey said in a statement.

"By placing him on our new polymer ?50 banknote, we are celebrating his achievements, and the values he symbolises."

The Cambridge University educated mathematician also developed the "Turing test", which looks at what criteria are needed to judge whether a machine can think like a human -- the foundation for artificial intelligence.

But he was prosecuted in 1952 for "gross indecency" and was forced to undergo chemical castration as an alternative to jail. He killed himself two years later, shortly before his 42nd birthday.

Britain's new £50 banknote features mathematician and scientist Alan Turing
Britain's new £50 banknote features mathematician and scientist Alan Turing Bank of England / -

In 1967, Britain decriminalised homosexuality between men aged over 21.

Turing's life story was turned into a 2014 movie called "The Imitation Game", starring Oscar-nominated British actor Benedict Cumberbatch.

Turing was given a posthumous pardon in 2013, and his name also lives on in a new student exchange programme launched by the government following Britain's departure from the European Union.

The new ?50 note will replace a paper bill that bears Industrial Revolution engineer James Watt and his financial backer, Matthew Boulton.

Britain's other banknotes feature wartime prime minister Winston Churchill (?5), novelist Jane Austen (?10) and the artist JMW Turner (?20). They are all polymer, which lasts longer than paper and is harder to forge.

However, cash is in long-term decline and the higher-value notes are little-used for daily payments, except anecdotally by drug dealers and other criminals.

In 2017, debit cards overtook cash as Britain's most frequently used payment method, according to the Bank of England, and the trend has accelerated during the Covid-19 pandemic with customers preferring contactless cards.

But the central bank, while conceding that bitcoin and other virtual currencies are also making inroads, insists that cash will remain a key part of the economy for years to come.