Keira Knightley felt like she was back in physics class when learning about code for 'The Imitation Game'.

The 29-year-old actress stars as wartime codebreaker Joan Clarke in the drama and admits she and her co-stars - which include Benedict Cumberbatch - were left baffled during preparatory sessions with experts who tried to explain how the systems used worked.

She said: ''These people were geniuses! I think you'd at least need some form of higher mathematics to understand. Did I take any of it in? No. Can I explain any of it? No. They tried to teach us, they brought in enigma machines and tried to bring in this very lovely man who was desperately trying to explain to us how it worked and how the machine Alan [Turing] made would work but it just went straight over... there was nothing.

''I said immediately [that I didn't understand], I felt like I did when I was 14 and in physics class and didn't understand a word, so I had to admit straight away, it took me straight back.''

The movie follows technological pioneer Alan Turing - who was later prosecuted after admitting to be homosexual - and Keira was shocked at how little she knew of him and his story before filming began.

She said: '''Imitation Game' is an amazing story. I didn't know that much about Alan Turing, I first read about him a few years ago when there was a big push to get him pardoned and I remember thinking 'How do I not know anything about this?'

''Particularly because I am someone who is interested in history so I have read around it, I thought it was really weird.

''But the whole of Bletchley Park and what was done there was fascinating.''