There is a picture of the actors Benedict Cumberbatch and Keira Knightley in The Imitation Game, the film about the code-breakers at Bletchley Park, that you've probably seen a few times.

It shows Cumberbatch as Alan Turing leaning intently over a desk and Knightley as his colleague Joan Clarke standing next to him with three other code-breakers.

Of the five people in the picture, four of them are men, but the truth was exactly the opposite. Bletchley - that famous, intriguing, secret, startling place that shortened the Second World War by two years - wasn't male-dominated at all. In fact, by 1944, women outnumbered men by four to one.

It is this fact that the broadcaster and writer Tessa Dunlop is keen to impress on me when we talk about her new book The Bletchley Girls, in which she interviews 15 women who served at Bletchley, including two Scots.

Dunlop, who is best known as a presenter of the television series Coast, tells me that if you'd arrived at Bletchley during the Second World War, particularly towards the end in 1944, all you would have seen would have been a sea of women. Yes, there was a team of quite posh, very cerebral men running the show, but there were female code-breakers too. And the code-breaking network of Enigma and Bombe machines was almost entirely operated and run by women.

Dunlop says spreading this fact about the role of women at Bletchley was one of the main reasons she wrote her book; she wanted to help correct the traditional narrative of the Second World War, she says, which has always been: men, men, men. "It p***es me off," she says.

"I want to write about women in history but people would rather read about the D-Day landings and dogfights and you're sometimes told women's history is a bit social and drab and worthy. But Bletchley stops that because, in terms of the war-time narrative, it is up there with the D-Day landings."

There are some other myths about Bletchley that Dunlop's book could help demolish, such as: everyone at the code-breaking camp was terribly posh. Yes, says Dunlop, there was a distinctly upper middle class whiff about many of the staff at Bletchley, particularly in the early days, but that didn't last long.

Like the pilots who flew Spitfires during the Battle of Britain, the recruiters may have started out by taking on the "right kind of people" but in the end war doesn't work that way. War needs people and lots of them, meaning class distinctions in the end have to be put to one side. And that, to a large extent, is what happened at Bletchley - 10,000 people worked there at its height, mostly women, and they were from all classes and all backgrounds.

And I'm about to meet one of them. She's called Ann Mitchell and she's 92 years old and lives in Edinburgh in a pleasant apartment decorated with fine Jacobean furniture and a handsome portrait of one of her husband Angus's ancestors. In other words, however misleading they may be, Ann Mitchell is from the kind of background that fits with the some of the traditional stereotypes of Bletchley. Her father Herbert Williamson served with the Indian Civil Service and she was educated at the private Headington School for Girls in Oxford, although even for her, some doors appeared to be closed in the 1930s - she recalls that when she decided that she wanted to specialise in maths, her headmistress told her that it was not a ladylike subject.

In the end, though, Mitchell did study maths at Oxford, which may or may not have singled her out as a good candidate for Bletchley. "We were told later that the job didn't use maths but that people who were good at maths were good at code-breaking which sounds a bit back to front," she says. She also points out that the year she went up to Oxford, she was one of only five female students of the subject. She was a rarity in a world before any real progress had been made on female equality.

It was while she was still at Oxford that she went up to Buckinghamshire to be interviewed for the job at Bletchley in 1943. The word "Bletchley" was not on her radar at all, but by this time, women had also been called up to work in factories, farms and hospitals and Mitchell didn't want to go into uniform.

"I went to the university appointments board and asked what they would suggest I could do next," she says. "I'd never heard of Bletchley but I went by train there, had the interview which was mainly them telling me about the domestic arrangements, and two or three weeks later, I had a letter offering me a job as a temporary assistant." The salary was £150 a year.

It took a while for Mitchell to realise the nature of the work she would be doing at Bletchley, and how it fitted into the bigger picture of the war effort, although straight away she was working right at the heart of things in Hut 6, where German Enigma messages were decoded.

By 1945, the Nazis had deployed 100,000 of these machines, which resembled typewriters and used a sophisticated cipher system to encrypt and decrypt messages. The German authorities believed the system to be impenetrable but the job of Mitchell and her colleagues was to prove them wrong.

The code-breaking system worked as follows.

In one room, the cryptanalysts came up with their best guesses about what an encrypted message said (what helped was the recurrence of certain phrases such as Heil Hitler). These guesses were then converted, using machines similar to the Enigma, by Mitchell and her colleagues into menus or diagrams that could be fed into the Bombe devices developed by Alan Turing (whom Mitchell never met).

I suggest to her that it might be monotonous work day in, day out, but she's having none of it. "It wasn't monotonous because every day was different and every code was different," she says. And her diary from the time backs it up: "29 December 1943. Worked like the devil all day. Good fun."

What Mitchell certainly had no real idea of was how her work fitted into the bigger picture. She knew she was breaking German codes, but she didn't know where they came from and she didn't know or hear the word Enigma until decades later. On her first day, she signed the Official Secrets Act and for her and everyone else, it meant what it said and she never talked about it.

"The secrecy started straight away and we swore never to tell a soul what we were doing," she says. "I went to Bletchley in 1943 and it wasn't until the 1970s that books began to be published and I remember thinking 'they can't do that, it's secret'." So secret in fact that Mitchell had not even told her husband Angus about the nature of the work she did during the war and with the gradual easing of the secrecy years later, she can't quite remember when she finally did (it certainly wasn't before the 1970s).

The secrecy also meant the staff at Bletchley sometimes didn't even talk to each other about what they were doing, which meant Mitchell kept it to herself when she started to notice a pattern in the messages she was helping to decode: they were getting fewer and fewer.

She remembers sitting on a hillside in the Lake District while she was on leave and thinking to herself: "I know! I know the war is coming to an end because there are fewer and fewer messages coming into Hut 6!" It was an encouraging moment for the young Mitchell but she kept the little kernel of comfort to herself.

In the end, the vow of secrecy around Bletchley was never officially lifted; it just slowly evaporated. "We were never told, now you can talk about it, it just dawned on us," says Mitchell. "The extraordinary thing is that people didn't talk. You would think that at least one person would talk and one person would tell a secret who would tell another, but they didn't. In some strange way, they knew. There are some people still who don't talk apparently and no one could trace 10,000 people and where they got to. Some people died without ever telling their husbands what they did during the war."

Mitchell does briefly wonder if modern women would keep the secret in the way that her generation did during the war, but Tessa Dunlop is convinced they would. "We still have people signing the Official Secrets Act and we don't know about them, because it's secret," she says. "The fact that the secret was en masse at Bletchley makes it a big deal, but it's a different time now. We're not in a time of total war when we know that keeping secrets is the difference between the Germans invading or not. We need to give the modern generation a bit more credit."

Giving credit is part of Dunlop's mission with her book. She and Mitchell are delighted in the revival of interest in Bletchley, fed partly by The Imitation Game, but they both want the true story to be told rather than Hollywood's edited highlights with men as the stars. The scale of female involvement in Britain's war effort was unmatched by any other country, and nowhere was it more obvious than at Bletchley. The staff there weren't all posh and they weren't all geniuses and they certainly weren't all men. But in those little concrete huts, they were all part of the ingenious network of humans and machine, the network that cracked the code.

The Bletchley Girls by Tessa Dunlop is published by Hodder and Stoughton at £20. Tessa Dunlop will be appearing at AyeWrite! at The Mitchell Library in Glasgow on Saturday April 18 at 6pm. Her talk will feature audio and video clips of the Bletchley women talking about their experiences. See www.ayewrite.com