A 56-page handwritten notebook belonging to code breaker and computer pioneer Alan Turing has sold for $US1 million at auction in New York.
The work of the British mathematical genius is credited with hastening the end of the WWII and saving many lives.
He led a team of cryptographers who cracked the wartime Enigma code, which the Germans had considered unbreakable.
Bonhams auction house, which declined to name the buyer, said the notebook was one of his very few manuscripts, and showed his work on mathematical formulas and the basics of computer science.
It dates back to 1942 and was left to his friend Robin Gandy, who added his own notes and kept the notebook hidden until his death.
Alan Turing committed suicide in 1954, while undergoing hormone treatment as an alternative to imprisonment for his homosexuality.
Part of the proceeds from the sale will go to an unspecified charity.
Sixty years after his death Turing received a rare, royal pardon by the Queen for his conviction in 1952 under laws on homosexuality.
Benedict Cumberbatch received a best actor Academy Award nomination for his portrayal of the code breaker in the film The Imitation Game, which won an Oscar for best adapted screenplay.