The Prince and Duchess of Cornwall spent three hours at Bletchley Park
Prince Charles and the Duchess of Cornwall have been visiting Bletchley Park, on the day academics have called for greater protection for the site.
The Buckinghamshire estate was the centre of operation to crack German codes during World War II.
The prince, who turned on a copy of a code-breaking machine, said it was one of "the great British success stories".
More than 100 academics have written to The Times saying the crucible of the UK computer industry deserves better.
They say Bletchley should be put on a secure financial basis like other "great museums".
Prince Charles and the Duchess were greeted by dignitaries including the Lord Lieutenant of Buckinghamshire, Sir Henry Aubrey-Fletcher, and the High Sheriff of Buckinghamshire, Peter Thorogood.
The Royal couple spent just under three hours at the site and met sculptor Stephen Kettle, responsible for a slate sculpture of Alan Turing, the mathematician at the heart of code-breaking at Bletchley Park
Mr Kettle handed the Prince a piece of the same slate used for the statue engraved with Ich Dien - the motto of the Prince of Wales.
Unveiling a plaque at the site, Prince Charles said: "I woke up this morning and turned the wireless on and heard something about Bletchley Park.
"I thought 'oh lord, what have I done now', but I was so pleased to hear that attention is being paid to this remarkable place."
Addressing dignitaries he added: "You are the keepers of one of the greatest British success stories.
"I can only wish the trust well in its plans to develop the site as a world-class heritage and education centre."
The Royal couple were given a short presentation by veteran codebreakers Mavis and Keith Batey who apologised for "jiggering" or breaking the Enigma machine they had planned to demonstrate.
Mrs Batey, 87, said: "We felt the Prince was so personally involved, he really did take a great interest.
"We tend to look backwards and think it's a good idea to show what people did but I think it's equally good to bring it up to date."