How do electric circuits work?

1.23K views

I’ve always been very mechanically minded, although when it comes to electronics and circuits, I’m baffled.

How can pieces of silicon and metal make my computer turn on, to being able to run games and programmes?

In: Technology

5 Answers

Anonymous 0 Comments

Hard to explain to any age, but especially to a five year old. But here is a go.

Complex electronics are built up off of lots of simple components. They are:

Resistor – tries to keep current from flowing.

Capacitor – temporarily stores current

Inductor – also temporally stores current but in a different way.

Diode – allows current to only flow in one direction.

Transistor – think electric valve. Handle gets turned more, it allows more current through.

Take transistors, capacitors, and resistors and put them together in the right way and you create logic circuits. For simplicity we can treat these circuits as working with true and false. Those circuits are:

And – if all inputs are true then output is true.

Or – if any input is true then output is true.

XOR – if one and only one input is true then output is true.

There is a type of math that if you lean it will allow you to use those simple logic circuits to solve higher complexity math problems. It is called Boolean math (aka Boolean logic). Along with grouping multiple trues and falses together to create numbers with more than two possibilities, and you can start doing something real.

So say I want to represent the the number five with only trues and falses (represented as 1 for true and 0 for false). Obviously I need more than one place just like when dealing with normal numbers I need two numbers to represent the number ten. So five would end up being 1 0 1. That represents a true in the four place, zero in the two place, and one in the ones place (4 + 1 = 5).

Ok say you want to add two such numbers. Let’s say add five plus one. Or 1 0 1 + 0 0 1 in binary. You would have a series of logic circuits doing that math.

So first you would add the one columns by xoring them. And the result of that will be the result ones column. In this case 1 xor 1 would equal zero. So the ones column of the result is a one. Then we have to check to see if a one is carried to the twos column. That would be an and between the original ones column. Or 1 and 1 which would be 1. So we have a carry on the twos column. So now I have three numbers in the second column. The carryover 1 + 0 + 0. Same thing but just add two at a time. So first 1 + 0 = 1 xor 0 = 1. Then add that result to the remaining number so 1 xor 0 = 1. So result is 1. So we have 1 in twos column. The carryover is a bit more complicated because you can end up carrying over twice instead of just once. But in our example there is no carryover because 1 + 0 + 0 = 1. Doing the math in the fours column. Gives us 1 1 0 = 4 + 2 +0 = 6.

So just like the electronic components can be grouped to get complex logic circuits, logic circuits can be grouped up to perform complex operations.

Turns out those numbers and logic operations can make up data (what you are dealing with) and instructions (how you want to deal with it). So programs are effectively just that. A bunch of ones and zeros representing data and instructions.

Operating systems are just sets of data and instructions that allow the hardware to do something useful. Programs or apps are data and instructions that work with the operating systems to make the OS useful.

I took a few liberties and shortcuts to try and keep it in the ball park for a five year old.

You are viewing 1 out of 5 answers, click here to view all answers.