Just shut off all electronic devices. If you can't trust yourself not to go on, give it to your mum. Silly mistakes can be avoided by reading the question and revising on your weak points before an exam.
You have to find a balance between rushing through a question too fast and not leaving enough time for yourself, which can be hard to do if you're prone to screwing up.
First, always read the entire question properly. Then after answering the question do a quick skim over it and make sure your answer actually makes sense.
Also, practice will help you stop making these small mistakes.
But it's entirely possible that you'll still end up with a few (or more) minor errors that you didn't catch. And you'll just have to accept it, because nobody is perfect and if you did well enough you can still maintain a high ranking.
In maths you won't be penalised too much for a small error, but you really want to make sure it doesn't happen in Chemistry or Physics, especially at the beginning of the question.