# Is it possible for a computer to use AC power?

Could someone please explain why computers are built to run on DC power instead of AC.

Is it possible to make a computer that runs on AC, even theoretically?

(I understand that it wouldn't be possible to use diodes)

• Even if you had polarity-agnostic logic, the zero crossings would impose either a drastic limitation to your clock speed, or at the least a troublesome periodic interruption to it. Designing a memory element which can rapidly switch but tolerate comparatively longer loss of power should be a fun trick. Or will you somehow make everything run on 3-phases? – Chris Stratton Nov 21 '15 at 1:52

Computers represent everything with bits, and ordinarily this means one voltage range for a 0 and another voltage range for a 1. If you really wanted to use AC to in some way directly represent bits, you wouldn't be able to rely on voltage in the usual way, since by definition AC voltage is always changing.

You could play games with phase or frequency though. Consider using phase. You could define a 'reference' phase with some oscillator, and then a 0 could be AC with phase matching the reference, and 1 would be AC that's 180 degrees out of phase. (or vice versa) But right away you should see the problem even with this: while you can tell what the state of a DC bit is practically instantly, with these hypothetical AC bits, you'd have to wait a significant portion of a cycle to tell what sort of bit you had. So you'd have to run your reference phase at a very high frequency to get even mediocre performance. If you tried to use different frequencies for bits, the situation would be as bad or worse.

It would be interesting to try to get a couple of logic gates implemented this way, but only as an academic curiosity.

• This is the reason I like, you can play with the levels and devices all you like, but AC means you have to wait some time before you know something about your signal. At rf, you don't wait long. At AC Mains, you wait forever. – ArielP Nov 1 '10 at 14:26

Computers save state by saving what voltage some input(often internally generated) is at the last rising edge. With DC voltage, in the simplest terms, they save gnd as a logic 0(false) and pwr as a logic 1(true).

If we ignore the complexities of getting the transistors to work with an AC input power. whenever you saved the state, you would have to know what pwr was at that instance. Lets say you clock it when the pwr is -2V, on the next clock it might be 4 V, now you need more than a simple comparator to determine if the -2V was ground with noise, or logic true at the time.

Second, the physics of transistors would not like this. I see your statement, it would not be possible to use diodes, Transistors are diodes, just pointed at each other with an enable to allow a much higher leakage current through.

Please let me know if there is something I need to add to make more sense of this.

• Please do remember, we rectify AC to DC and then use that in computers normally, This is our reference. they do technically run off of AC in that sense. I know this is not what you asked, which is why it is a comment. – Kortuk Oct 31 '10 at 23:30
• Not only is it impossible for transistors to work with AC, but many can be damaged by it. – Thomas O Oct 31 '10 at 23:30
• It is not impossible for transistors to work with AC, just this specific application would be hell and a Half. – Kortuk Oct 31 '10 at 23:35
• I used an AC wave that is has a zero mean value(no dc offset) but there is no reason that I could not use a DC offset signal. Also, I have seen rectifiers designed with MOSFETS, you just need to protect against a body-Diode problem. BJTs are normally doped to cause large negative reverse current, but that does not mean they would fail. – Kortuk Oct 31 '10 at 23:50
• answers from Kortuk and Thomas are crisp and clear.. – V V Rao Nov 1 '10 at 4:54

You could use AC with some number of discrete phases to represent numbers. (Take a look a CQAM modulation on analog modems)

This would let you use transformers to implement logic gates. ( magnetic amplifiers!)

AC at high frequency woudn't be efficient in CMOS so it wouldn't scale to awesome numbers of gates. ( and what you'd use for a gate in a semicondicutor ??)

but a similar principle can be used with light. you can use laser light, and a discrete set of phases to represent numbers. It's an interesting technique.

Not so great in AC electricity.

Yes, but it would not be the computer as we know. There is already some implementation of these using relays. Its easy to make an digital logic (AND, OR, NOT) using relays in a similar way we use transistors. Using relays you're not worried about the flow of current, but only the presence or absence of it. The bits are represented for the relay state: active or not.

The main problem is that with relays there is almost no space for miniaturization, meaning that a simple 4 bit microprocessor would take almost an whole room.

Here are some academic, but full functional, alternated computers:

http://web.cecs.pdx.edu/~harry/Relay/

This is a DC 3bit relay computer, but easily can me changed to AC relays

http://www.electronixandmore.com/project/relaycomputertwo/index.html

Another DC relay computer, with lots of videos

http://nablaman.com/relay/

• "The main problem is that with relays there is almost no space for miniaturization, meaning that a simple 4 bit microprocessor would take almost an whole room." the other problem is if your relays are too fast they will drop out on the zero crossing. For a given frequency of AC supply this rather limits the speed of your computer. – Peter Green Nov 21 '15 at 4:04

Reversible Energy Recovery Logic uses AC power, but I think that's mostly theoretical at this point.

http://chipdesignmag.com/lpd/blog/2009/07/16/existing-circuit-styles-shed-light-on-low-power-design/

• One spot I've sometimes thought energy recovery might be interesting would be in LCD display driving. I'm not sure how one would best keep drive waveforms symmetrical enough to avoid unwanted DC bias, but in theory I would think one could have an LCD driver chip discharge the display capacitance into an inductor and then use the energy in that inductor to charge the display in the other polarity. – supercat Apr 7 '11 at 6:56

Modern semiconductor construction techniques generally require that N transistors be physically above a substrate which is at least as negative as they are(*), P transistors be above a "well" which is as positive as the transistors, and that the wells for P transistors be no more negative than the substrate upon which N transistors sit. These requirements effectively require a DC voltage potential between the P-transistor wells and the substrate. While it would be possible to power all the active circuits with AC, and use a minimal-current supply to bias the substrate and P-transistor wells, having such a circuit be able to keep state during the 'off' part of an AC cycle would require that it have internal capacitors whose behavior was predictable. Given that there are unpredictable parasitic capacitances between transistors and the substrate/wells on which they sit, getting reliable behavior would be difficult.

There are some interesting techniques for AC-powered counters and things using discrete transistors, but such approaches would be incompatible the design efficiencies of chips sharing substate and wells among many transistors.

(*)added per reminder Actually, one can get away with transistors being about 0.7 volts beyond the substrate voltage.

• Did you forget your footnote? – Kevin Vermeer Mar 9 '11 at 23:28
• this goes back to what I was trying to explain in as laymen terms as possible, it is technically possible to pull off, but in all reality the complexity is so much higher with no payoff that no one would do it. – Kortuk Mar 10 '11 at 12:50