An emp or solar flare will do the most damage to things with long coils of wire traces on a board
These act like an antenna collecting the energy from a pulse
A nuclear EMP damages electronics.
Solar flares, which shouldn't even be called an EMP, do not affect small items like transistors unless those transistors are connected to very long lengths of wire, like wire measured in yards and meters.
A nuclear EMP is a short pulse measured in nanoseconds, but in those few nanoseconds, the pulse can rise to 50,000 volts per meter of conductive surface or more, which will certainly fry electronics. Its more like a static shock, which is really really bad for electronics..
A solar EMP is a long pulse (more of a wave) measured in minutes and hours, but the voltage rise is small in the 1 or 2 volts per meter range... that's a far cry from 50,000 of a nuclear emp. That one or two volts per meter isn't much, especially for a computer board measuring centimeters.. it really doesn't affect small electronics. But what it does do is couple into the power grid lines which are thousands upon thousands of kilometers long and that 1 or 2 volts adds up fast with those distances.
Because the solar EMP lasts for so long, the increase in voltage tends to heat things up. Go ahead and try it with your toaster.. Increase the voltage from 120 volts to about 200 and watch what happens to it. This is why the transformers catch on fire and the power line wires melt.
Some more information on the differences.
Nuclear EMP is generated when gamma rays from the bomb strip electrons from their atoms. Those electrons then follow the magnetic field lines of the Earth to ground and will couple into anything in the way when they do. This "effect" of electron flow only lasts for a very short time but it all happens at once, which creates a huge voltage spike and kills delicate electronics.
Solar EMP is an entirely different animal.
When the sun releases a coronal mass ejection towards the earth, billions of tons of material collide with our planet. But our planet has an electromagnetic field surrounding it. This field diverts the solar particles around our planet. If it didn't, we'd all be dead a long time ago. The problem is that if the coronal mass ejection (CME) is big enough, the particles colliding with our magnetic field cause the field to deform. It's a lot like squeezing a balloon full of air. Wherever you squeeze, the balloon stretches somewhere else. The same thing happens to the Earth's electromagnetic field. The stream of solar particles compresses the field on the side facing the sun and causes it to stretch out on the night side. When the solar particles have passed, the electromagnetic field bounces back into place.
The problem is, our planet is covered with crisscrossing power grid lines.. So what happens when you move a magnetic field in the presence of conductor? That is what causes a solar EMP, and why it doesn't really affect computers.. unless of course those computers are connected to the grid.
But even if your computer is connected to the grid, the computer is likely to still survive.. it is the power supply that is going to be damaged as your normal 120 volts becomes 300 or 400 volts..
Of course if you're using your toaster something very different will happen as the toaster elements go from 800 or 1200 degrees to 3000 degrees, burn out, create a shower of sparks, and hopefully nothing is near the toaster that is combustible.
You can not stop a nuclear EMP without a Faraday cage.. You CAN stop a solar EMP if you know it's coming and you're willing (or able) to disconnect everything before it hits.