# What does a circuit (in a computer) do and how does it do it?

259 views

What does a circuit (in a computer) do and how does it do it?

In: Technology

Do you mean an electric circuit? What it does is what all circuits do, which is to allow current to flow from one pole to another of some electric source like a battery or the wall outlet. What happens in between those poles varies wildly from application to application.

A heater has an element between the poles that warms up when electricity flows through it. An electric motor has a loop of wire around a magnet, and when electricity flows through it it makes the magnet spin.

A computer circuit is extremely more complicated. what happens when electricity flows through it is that a mind-boggling amount of tiny little switches, called transistors, switch state very fast.

From an purely electrical point of view, that is what happens. How all those tiny transistors switching state create the words you are reading on your screen is an altogether different question with a much, much more complicated answer.

A circuit in this context is just a loop around which electrons can flow. As they do this, they encounter a bunch of different obstacles. Depending on what these obstacles are like, the electrons will do different things. This can trigger obstacles in other circuits or other bits of the same circuit to do different things, which can make more stuff happen.

These obstacles are called logic gates, and the circuits are called logic circuits. Stick a bunch of these together and you get a computer.

There are a number of different types of logic gates, and they can be built out of loads of different things, including [dominoes](https://youtu.be/OpLU__bhu2w) and [water](https://youtu.be/IxXaizglscw). In these cases, the domino runs or the tubes are the circuits.

A NOT gate is like a switch. If the signal coming in is “off”, the the signal going out is “on”. An OR gate takes two inputs. If either one or the other (or both) is ON, the output will be ON. You can think of this as being like a door handle. You only need to turn the handle on the outside OR the inside to open the door. On the other hand, an AND gate will take two inputs and only trigger is both input 1 AND 2 are on. This would be like a door with a lock. You need to undo the lock AND turn the handle for the door to open. You also get exclusive or gates, XORs, where it triggers if one OR the other input is on, but NOT BOTH.

A circuit is just a flow that allows electricity to travel.

If you took a battery and put a wire that connects both terminals, that is a circuit. But it’s not a very good circuit, since it isn’t doing anything.

If you add something inline, like an LED, now you have a circuit that powers the LED. It’s a bit more useful, but ultimately it only does one thing.

If you add a lightswitch, you now have the ability to easily break the circuit by flipping the lightswitch. This is getting a bit more useful.

In a computer, there are things called transistors. These are essentially electrically controlled lightswitches. You can make a transistor complete a circuit by applying power to it. You can then feed this electricity into the control of another transistor (or multiple transistors). This is what makes a computer so powerful — the use of transistors opens and closes circuits, which open and close others, and so on, and so on. Do this a few billion times in the right combinations, and you get something that starts to look like a computer.

There are a lot of different circuits in a computer, all with very (VERY) specific purposes. We design them using digital logic gates and we model them using boolean algebra. The most simple of equations can be made by analyzing a truth table, while some of the more complex equations often take the resources of multiple VLSI engineers. If you wanted to rephrase your question for a specific operation to be done, I could go more in depth on that specific circuit, but as I said earlier, way too many to just start listing off the generics of each one.

circuit is basically smaller version of many cables – before circuits were invented, components were connected with hundreds of cables, which took much more space.

&#x200B;

circuit is basically metal which can transfer electric current put on a piece of plastic, with various electrical components put on it.

&#x200B;

if you were a masochist you could replace circuits with thousands of small cables, but that would be expensive, confusing, and space-inefficient