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.