EMP can easily be grounded, avoided.
Yes, all computers/robots, what-have-you need to be programmed enable to do what they do. But there are programs today that are programmed to learn, to experience and to scan that information received and to utilize it when it feels fit. Yes, it learns, and takes in information to better itself. Of course, it isn't -that- powerful, it won't look at a gun, take it, and shoot its master. But given time these programs can cause problems if not watched with a careful eye.
The future is Robotics, there is no doubting that. Quantum computing is what I believe with rocket AI through the roof, considering 25,000 atoms can break all US security codes in seconds. Imagine a trillion atoms, or 7 trillion atoms "The size of 1 cell".
Anywho, this will be an interesting thing to watch throughout my lifetime, how robotic technology will advance and what problems may arise from it.
Want my view on what would happen? Robotic creations would work on logic, logically, killing us off has no good end result, nor would staying on this planet and sucking the resources and killing all life. I believe if the robot was -that- advanced, he wouldn't stay here and kill the living organisms inhabiting this planet, they have the capabilities for space travel, why not move to a new planet and leave this place alone?