When we meet, Jim Davidson has the air of a man about to visit the dentist.

While outwardly jovial as he ushers the photographer and me into his basement flat in London - "We're down in the dungeon," he joshes - beneath the affable and polite exterior appear to bubble the conflicted emotions of someone who isn't quite sure what the agenda is.

Davidson, who shot to fame in the late 1970s with his eponymous TV show before presenting family favourites Big Break and The Generation Game, has been in the comedy game long enough to know how it works. He's got something to plug - a month-long run at the Edinburgh Festival Fringe and a new autobiography - but as he sits down he has a subdued, guarded demeanour. You can almost see the cogs whirring in his head as, like a nasty tooth extraction, he wishes the next hour to pass as quickly as possible.

His Fringe debut, No Further Action, promises to tell the story of the worst year of his life, addressing his arrest under Operation Yewtree over alleged sexual offences, the tumult that followed and the subsequent clearing of his name after the Crown Prosecution Service ruled last August there was "insufficient evidence for a realistic prospect of conviction".

The show, alongside a forthcoming book, charts a "nightmare year of interrogation and tabloid speculation" - to quote the press release - which left Davidson "shaken to the core". But, it trumpets, with "all charges dropped, he can finally look back on his year from hell." Not least "winning the heart of the nation all over again as a Big Brother champion". Yet, away from the hyperbole, the story is arguably less black and white, something that the 60-year-old comedian would attest to. Davidson was arrested by detectives from Operation Yewtree, the police investigation set up after the Jimmy Savile sex abuse scandal, on January 2, 2013. His arrest was not linked to the late DJ.

Davidson had flown into Heathrow from Glasgow, where he'd spent New Year with his wife Michelle, and was to take part in the reality television series Celebrity Big Brother. On arrival he was met by police. "It wasn't an SAS SWAT team - I had to talk them in," he clarifies, mimicking holding a mobile phone to an ear while gesticulating wildly to attract the attention of the arresting officer.

At a nearby police station, accompanied by his lawyer Henri Brandman, Davidson heard the allegations of sexual assault made by two women which dated back to 1988 and 1989. Released on bail, he was re-arrested in March 2013 after further allegations - ranging from him having touched a woman's breast to rape - surfaced.

Throughout, Davidson consistently denied the claims made against him. In the weeks that followed he and his team worked round the clock to gather evidence to counter the allegations. Davidson kept a diary while under investigation in what he describes as a bid to stave off the "demons" and stop himself falling to bits.

"It was a way to concentrate on the facts rather than what was in the political air," he says. "The more I read the facts, the more I was convinced there was something else going on. Because the facts were flimsy. They [the police] obviously hadn't done any investigation. I thought: 'This is not right, being arrested when they haven't done any investigation. Maybe I'm guilty and they are just looking to fill in the gaps and put the roof on the house first.' That was the frightening bit. This sounds ridiculous but when you haven't done it, you can't wriggle off."

Davidson will detail all the allegations in his book, right down to claims by two of the women who, independently from one another, he tells me, claimed to have bit him "on the willy" during alleged sexual assaults. This, it would seem, is a notion Davidson finds particularly troubling. He refers to the case of PR mogul Max Clifford who was jailed for eight years in May for assaulting four women and girls.

"I was listening to the Max Clifford case and I read an article about one of his victims and it sounded daft," he says. "You must tell me, as a woman, or perhaps a feminist, how it is possible to force a woman to do a sex act on you?"

I'm caught off guard by the question. We eyeball each other across the coffee table. How is it possible? I parrot back. "To give you a blow job," he clarifies. "If that man doesn't have a knife, threaten to kill you or have a gun, how do you force someone? And why would you want to with all those teeth in there?"

But it does happen, I say. "I can't see how," replies Davidson. He can't see physically how that could happen? "How could you force someone to perform a sex act on you that then doesn't run out afterwards? I just don't know how you do that."

So he doesn't think the threat of violence could be enough? "She never mentioned a threat of violence," he says. "I'm talking about this specific person [in the Clifford case]. A threat of violence, I can understand that, but that must be the only way you can force someone.

"If this woman thinks: 'I better do this, I'll get a part on a film.' Is that her problem or his?" Davidson is warming to his theme. "Without using violence it's impossible to get someone to perform [a sex act]. They say in the newspapers: 'He made me perform a sex act.' So that means she was threatened with violence?"

It would suggest a threat was implicit, I reply. Davidson nods. "That's the bit that gets me," he says. By this point I'm feeling uncomfortable about the turn of conversation, but he has already changed tack. "I've turned into one of these forensic scientists," he continues, cheerily. "Being on the receiving end, all there is are allegations and truth."

Davidson describes the moment he got the call from his lawyer on August 21, 2013, who uttered the long-awaited three words "no further action" on 10 allegations, as being strangely underwhelming. "What now?" he says, recalling his feelings. "You've won the war, can I win the peace? How will I face journalists who want to ask the questions I haven't considered yet?"

The feeling of limbo endured with the ongoing investigation into an allegation from outside the UK by a woman who claimed she was sexually assaulted by Davidson while he was entertaining British troops on the Falkland Islands in the 1980s. Four months later, in December 2013, the Falkland authorities announced there would be no further action.

It was only then, says Davidson, that he felt he could again resume life. A month later, the Celebrity Big Brother house again beckoned. "I was in a cell when I was supposed to do Big Brother in 2013," he says. "Then when I was doing it for real on the first night I was sitting on a double bed, handcuffed to Linda Nolan, thinking: I wish I was back in that cell. Well, not quite, but it's a nice line, isn't it?"

To win the show by a landslide vote, he says, was a "wonderful feeling". He bristles when asked if the Big Brother victory was his phoenix-from-the-ashes moment. "I don't think it was, because you have to die first to re-emerge," says Davidson. "I don't think I ever died. I don't think comedians ever pack up and say: 'Right, I'm not fashionable or funny any more'. Your audience leaves you. They leave you a row at a time. Everyone has their shelf life. When I'm funnier than Ant and Dec, I'll start moaning that I'm not on television." He pauses for a beat. "I was Ant and Dec," he says. "I don't think it has been a re-emergence. I think it enabled people to rediscover I was still there."

He recounts an anecdote from before he entered the Big Brother house. His good friend, a former military man nicknamed Goose, told him he should simply be himself. "He said: 'Don't worry. If you'd cured Aids and eradicated malaria, you'd still be a racist, homophobic and sexist old-school comedian,'" says Davidson. "He's right. I still get considered just that."

Davidson presents a confusing conundrum. He projects this deep-rooted desire to be liked which comes across as slightly out of sync given he's made his career out of lampooning others, drawing accusations of sexism, misogyny, racism and homophobia.

There are moments he speaks in a wistful tone that gives the impression that if he could go back and start over afresh he would. Then there are others where he is unrepentant, claiming to have no regrets about the polarising persona he created in the 1970s and 1980s with controversial comedy characters such as Chalky White, who had a mock Jamaican accent.

"I was top of the tree in the 1970s and early 1980s," says Davidson, "but it's like punk music coming along. I was Pink Floyd and the punks came along and said: 'That is awful old-school s***.' The worst thing that happened to me was Bernard Manning dying. Then someone else has to be the bad guy. If you have a bad guy it makes everyone better by default, doesn't it?"

His brow furrows when asked if he's undergone what could be viewed as rebranding. "Nah, because I still do the same stuff on stage," he insists. "I'm never going to convince people any different. If you think I'm racist, sexist, homophobic, I'm not going to convince you in a million years. So I've given up. It's quite upsetting."

He looks me dead in the eye. "I wouldn't like to read your mind." Mine, why? "I can tell," he says simply, a flicker of hurt followed by defiance crosses his face. You don't know what I'm thinking, I counter. "You're working for The Herald for one thing," he says. We've all got to have a job, I joke, attempting to lighten the mood.

"You can't get everyone to like you," he concedes. "I made that ridiculous statement saying I would like Stephen Fry to like me because he said: 'I'd hate to meet Jim Davidson and find out he's a nice bloke.' That is it, isn't it? 'I don't like him. I hope he's as rotten as my thoughts about him are.' I shouldn't be bothered about that, should I?" But the slightly down-turned corners of his mouth suggest he is.

One of the most disconcerting moments comes when Davidson talks about being molested as a 13-year-old by a man he met while walking home from school in Charlton in south-east London. The man had offered him a job sharpening knives and the following weekend the pair caught a bus to a housing estate where they walked to nearby woods. It was there that Davidson says a sexual assault took place.

"He was an Alfie Bass lookalike and smelled of iron filings," he says. "Like your old metalwork teacher's coat." He comes across as remarkably matter-of-fact about it. Wasn't he traumatised? Davidson gives a shrug. "I wasn't, no," he says. "It was an awful thing and I wouldn't suggest anyone went out there wanting to have it as a hobby. I wasn't traumatised. It wasn't very nice. I thought it was a bit odd. I felt a bit sorry for him - 'Oh, you poor bugger, having to play with me.'"

His Glaswegian father Jock was incensed, says Davidson, but afterwards life went on. It is not the nature of the incident but rather the nonchalance with which he recounts it that jars most. "I never reported it to the police - I should have done," he muses. "Might do now. It could be a celebrity. What proof would I have, though? What memory would I have of that 45 years ago? None. Other than those snapshots. Then I'd have to make the rest up, wouldn't I?" It's a remark laden with sarcasm.

Davidson says he never had time for Jimmy Savile, the late disgraced DJ and television presenter. "He was someone you ran away from when you heard him coming," he says. "Not because you thought he was a pervert but because you couldn't speak to him. Jimmy Savile comes off stage as Jimmy Savile, but doesn't turn into the normal guy. He's like that all the time - Davidson adopts an uncannily accurate Savile impersonation - 'Now then, now then, what's in the case?' Oh, f*** off.

"I always thought he was gay. Everyone has their own little thoughts. No-one knew him because he was a loner. You couldn't say to him: 'Let's go out to dinner,' because he thought he was bigger than everything. So I don't think the BBC or anyone around Jimmy Savile, apart from his inner circle, could take the blame for what he got up to. I certainly never knew what he got up to."

Davidson is blunt when asked how the experience of being investigated by Operation Yewtree has changed him. "I lost faith in people," he says. It impacted on his relationship with his wife of four years, Michelle. "It still does to an extent," he says. "We are both not the people that we were." Did he ever fear she might not believe him? "To be honest that wasn't my main priority," he says. "My main priority was finding and proving the truth - or to disprove the accusations. Whether Michelle stayed with me or not was basically up to her."

He exhales sharply when asked about the financial implications. "A figure? Half a million," he says. "That's Big Brother and panto - which was going to be in Glasgow. All the stuff I'd put into preparation to stay in Glasgow for another year that went out the window. A lot of the theatres said: 'We're not going to have him.'"

It's hard to imagine Davidson's working men's club brand of humour juxtaposed with the alternative scene of the Fringe. Even he seems unsure of how good a fit his show - in which he plans to talk about having a Glaswegian family, being arrested and Big Brother - will be.

"I'm not going to stay in Edinburgh, I'm staying in Glasgow and will get the train back and forth," he says. "I don't think I'm going to mix with many people. I'm going to go in, do my show and come out. I'm not convinced that it's the right thing to do. I don't think it's my job to say: 'Hey, listen. I'm not what you think.' I don't know - am I going in there to prove a point?

"Am I going in there to do what other comics might call apologise, and toe the line? Do I want to be part of all them? No. I'm going there because my management said I should and I listen to them. The days of me listening to me are long gone."

His great concern, he says, is not to be perceived as cashing in. "I didn't want to be seen to be victorious," he says. "I'm glad it's over."

Davidson says he was told by an officer in the Royal Marines that it was likely he was suffering from post-traumatic stress disorder. Has he considered talking to someone about it? Another shrug. "I'm talking to you. And I've written a book," he says. "I don't think I need any therapy. Other people would probably tell me that before I would admit it." n

Jim Davidson: No Further Action is at Rainy Hall, Assembly Hall, as part of the Edinburgh Festival Fringe, from August 1-24. The accompanying book will be published by John Blake, priced £18.99, on August 7.