 Even though we think of computers as super complicated high-tech machines with very tiny parts, they can also be huge wooden and mechanical just like this computer here. And even though they look very different, they're both made of the same basic part. A switch. One switch doesn't seem very interesting. It's either off or on. But if we arrange switches in a specific pattern, we can do math or logic. For instance, this circuit turns on the light if both switches are turned off. But this circuit turns on the light if either or both switches are turned off. If we connect more switches, we can do more complex math and logic. So fundamentally, a computer is just a carefully constructed arrangement of switches. A light switch has a mechanical input and an electrical output, but because the input and output types are different, we can't connect the output of one to the input of another. In order to make more complicated circuits, we need to switch with the same input and output types so that we can string a bunch of switches together. Our DigiComp has switches with a mechanical input and mechanical output. Just like a light switch, these switches have two states. Either left and right, off and on, or zero and one. What's really cool here is that instead of programming this computer by writing code, we program it by physically setting the position of several different switches. I'll now set this computer to count the number of balls in the top tray by setting the count switch to on. The sum is given by this bank of switches here. We'll set the sum to zero before we start counting. Now let's start counting by pressing this lever. Math problem the computer solved was zero, zero, zero, zero, zero, zero. Plus one. As the ball goes through the system, it changes the first switch from a zero to a one so that the sum now reads zero, zero, zero, zero, zero, zero, one. Or simply one. Now let's count the second ball. So what happened this time? I'll reset the sum back to one. The math problem that we solved was zero, zero, zero, zero, zero, zero, one, plus one. The DigiComp adds one to the first switch, but since it's already full, it carries the one to the second switch. The sum ends up being zero, zero, zero, zero, zero, one, zero, which is two in binary. Let's count the third ball. After the third ball, we can see that the sum is now zero, zero, zero, zero, zero, one, one, which is three in binary. In addition to counting, the DigiComp can add, subtract, multiply, and divide. The number of switches determines how big the numbers can be. This DigiComp has 31 switches and can count up to 127. But modern computer chips have over a billion switches. They're made from wafers such as this one, where each square represents a chip. They're made from semiconductor switches called transistors, which have the advantage of being solid state, meaning they have no moving parts. This allows engineers like me to make them smaller, faster, and more energy efficient. We can make them over a billion times faster than the DigiComp. These semiconductor switches make modern electronics possible.