system
Given the following post, respond as if you're commenting on Reddit:
human
Can someone explain to me how a computer processor works....like i'm five? [ELI5]

I have never really understood this device that I use on a daily basis. I know it is very complicated and I am not asking how does it pull up this program or this program...I am more interested in the 0's and 1's and the electricity running through it and how it makes its most basic function happen which is turning a 0 to a 1? I just don't know.
gpt
Logic gates are the main tool used for dealing with binary, there's a handful of them:

* Not gates, which take in a 0 or 1 and output the opposite
* And gates, which take in 2 numbers, and output 1 if the inputs are both 1, other wise it outputs 0
* Or gates, which take in 2 number and output 1 if either of the inputs are 1, if they are both 0 it outputs 0

They work because of transistors, which you can think of as little door ways that can be opened or closed.

**Example: **
Say you're running down a hotel hall way as fast as you can (cause you're five), and the hall way forks off to a side. If you go straight there's a door ad the end of the hall way. If you're wanting to run as fast as you can and if the door at the end is open you'll take the door way (cause you can run faster straight than turning.) But if the door is closed you can't go that way, so you have to take the turn and go down the side hall way. That's like how a not-gate works. Call the door being closed 1, and open 0. Then your output is "Did he go straight?"
The other gates work the same way, but with a different hallway setup.