There’s a lot of layers to what’s going on, and each one of them is interesting!
When you press a key on a keyboard, you complete a circuit which allows electricity to flow through that key. Through complicated circuits, this becomes an electrical signal that travels through the wire to get to the motherboard of the computer. That signal then traverses even more complex circuits in the motherboard. Eventually electricity flows through to your monitor and lights up some pixels on the screen the right color.
These complex circuits are made up of things called “logic gates.” An “and” gate takes in two wires, and outputs one wire. If both input wires have a high charge, the output wire has a high charge. An “or” gate has two inputs and if either one or both have a charge, it will output a charge. A “not” gate has one input and simply outputs the opposite, meaning a charge becomes no charge or no charge becomes a charge. There are other gates too with their own inputs, outputs, and rules.
When you get millions and millions of these gates together wired up the right way, you do some amazing electrical signal processing. That’s basically how computers work. Millions and millions of tiny little circuit pieces causing small charges of electricity to flow the right way.
In my Logic Design class in college we used a program to simulate 1000s of these gates and designed a very basic calculator out of them. The calculator took in 16 signals to represent the equation. It had 4 operations. It could add two numbers, subtract, invert (multiple by -1), or double.
Latest Answers