A computer really is a marvel of electromagnetic engineering, using electromagnetism to handle every single aspect of it. The control signals are electric. The short term storage is an electric pattern in the RAM. The long term storage is a magnetic pattern on the hard drive. (Or a floppy, or, very rarely now, a pattern blown into a Flash ROM.) Power comes from readily available electric sockets, and portable computers can operate for a few hours on battery, and can be charged reasonably quickly.
However, there are places where electrical computers work poorly, like in high magnetic or radiation areas. Strong magnetic fields can "flip" bits from one to zero or back, distorting and corrupting the information until the computer can no longer function. Similarly, ionizing radiation wrecks hell upon computers, even when they're off. (The radiation causes electric currents to flow, self powering, and often overwhelming the circuitry.)
However, it would still be possible to operate a computer there if need be, because electromagnetism is not the only force able to send a control signal, as we learned when laying undersea cables, which tended to attenuate when electricity flowed through them, reducing the signal quality. The substitute force was optic fiber. Signals would be sent by light.
Similarly, a computer could be made that had optical channels, that flipped around physical storage mediums when the light shined upon them. The computer would have fiber optic channels instead of copper wires, mirrored gates that could be moved into one of two positions, laser emitters to produce the light, and sensors to detect it. It would still take electric power, but the signals would be stored in light, and transmitted via fiber optic cables for permenant storage away from the danger zone. In a strong magnetic field....it gets free power and the signals aren't affected. In a radiation zone....it gets free power and the signals aren't affected.
This could be useful in medicine, for deep scanners that work via powerful magnets, for radiation-recovery robots, who can be effectively infinitely hardened against radiation, and for deep space, where radiation is a constant threat.
There is a downside too: the optical computer would be bigger and more expensive, and likely slower at first. It would be like downgrading to a 386, which would be painful in this six-core world.