Continuity mistake: We see John come into the room and stand next to Mrs. Hudson and put on his coat. After a few shots Mrs. Hudson walks away with the plates and says, "Lovely tune, Sherlock..." As she's walking away we see John isn't wearing his coat, and he puts it on again.
Deliberate mistake: The army major wears a full beard. British Army personnel may not wear beards. (The beard is a nod to the original canon character on which he's based, John Barrymore, who is described in the book multiple times as being a "black-bearded man").
Plot hole: For the supposed code that hacks into UK system, Sherlock deduces that the finger taps are counted as 1s in the binary code and the rest (while Moriarty's fingers are in the air) are taken as 0s. Sherlock can't know the rate at which the rests are counted in the binary code that he thinks Moriarty tapped out. So even if the key code was real, he wouldn't have known what it was.
Continuity mistake: In the scene where Sherlock is on the roof of the hospital with Moriarty, when Moriarty shoots himself in the mouth, when the camera shot quickly changes from a close up and Sherlock moves back, the gun disappears from Moriarty's hand (to the right of Sherlock). In the next shot of him, it's still in his hand.
Add timeLiam D
Other mistake: While Sherlock sits reading the paper he gets a text alert from (we assume) Irene Adler, and John notes that he had heard this alert fifty seven times. At the end of the episode, when Sherlock is looking through the texts that she sent to him, there are not that many texts from Miss Adler.