Like many people, British actor Benedict Cumberbatch knew very little about Alan Turing, the genius mathematician he portrays in ‘The Imagination Game,’ who helped to hasten the end of World War Two by cracking Germany’s wartime communications code.

Turing’s top-secret work with cryptologists and math wizards at Britain’s decryption center, Bletchley Park, saved countless lives by breaking Germany’s Enigma machine code. But the computer pioneer received no credit, died a broken man, and was only pardoned for charges, a crime in 1952, 60 years after his death in 1954.

‘I was shocked at how little I knew before reading the story,’ said Cumberbatch, 38, best known for leading roles in TV series ‘Sherlock’ and ‘The Fifth Estate’ film. ‘It is such a heart-wrenching true story that needs to be heard. There is an urgency about presenting it to the world.’ ‘The Imitation Game,’ is based on the book ‘Alan Turing: The Enigma’ by Andrew Hodges, and opens in U.S. theaters on Friday.

The film pieces together Turing’s story, work, relationships and injustices he suffered such as chemical castration. British actress Keira Knightley (‘Pirates of the Caribbean’) is Joan Clarke, a brilliant mathematician and the only woman on Turing’s decoding team. Clarke was briefly engaged to Turing and wanted to marry him.

Cumberbatch’s portrayal of the awkward, sensitive Turing has made him a contender for a Best Actor Oscar nomination and Morten Tyldum (‘Headhunters’) is tipped to a receive Best Director nod. Tyldum said he never envisioned anyone but Cumberbatch in the role.

‘This character is so complex and I wanted to make it a unique character. He is so strong and so driven and at the same time so awkward and so fragile. The core of it is this young boy who lost so much,’ said the Danish director. Cumberbatch said he tried to get every nuance and complexity about Turing just right and admitted working himself into a state until he realized he was thinking about Turing and not thinking as him.

‘What bore on me quite heavily was the idea that this man’s story, to a large extent is an unknown story, and doing something culturally that helps define his legacy a little bit,’ he said. ‘That’s an onerous task when you are talking about someone who achieved so much in such a short life.’