I expect that I will get told off by the mods for this, but here goes.
A referendum is a strange beast because it is not an election with winners and losers, with the former forming a government, but rather the electorate being asked a question. In all the debate in the UK about this, nobody has asked the rather obvious question "If the UK votes to leave, how will this be accomplished?". Again, during there Scottish referendum, nobody asked the similar question.
The first obstacle to bone overcome is the Act of Parliament which allowed the UK to join the EU. This would have to be repealed and, as the majority of MPs are in the remain camp, there's the first difficulty. I'll say no more other than wait and see. With good will on all sides, anything is possible.
Stephen