Hi, my name is Lamor Free and I'm an engineer here at Adafruit Industries. And this is where I do engineering and design and I design circuits for fashion and music and technology. My name is Federico Gomez-Suarez and I'm a software developer with Microsoft Hack for Good.
And I look into using technology to help us solve some of the big social problems of our times. You may have heard that computers work on ones and zeros. Or you may have seen scary looking visuals like this.
But almost nobody today actually deals directly with these ones and zeros. But ones and zeros do play a big role in how computers work on the inside. Inside a computer are electric wires and circuits that carry all the information in a computer. How do you store or represent information using electricity?
Well, if you have a single wire with electricity flowing through it, the signal can either be on on or off. That's not a lot of choices, but it's a really important start. With one wire, we can represent a yes or a no, true or false, a one or a zero, or anything else with only two options.
This on-off state of a single wire is called a bit, and it's the smallest piece of information a computer can store. If you use more wires, you get more bits, more ones and zeros, With more bits, you can represent more complex information. But to understand that, we need to learn about something called the binary number system. In the decimal number system, we have 10 digits from 0 to 9, and that's how we've all learned to count. In the binary number system, we only have two digits, 0 and 1. With these two digits, we can count up to any number.
Here's how this works. In the decimal number system we're all used to, each position in a number has a different value. There's the 1 position, the 10 position, the 100 position, and so on.
For example, a 9 in the 100 position is a 900. In binary, each position also carries a value, but instead of multiplying by 10 each time, we multiply by 2. So there's the 1's position, the 2's position, the 4's position, the 8th position, and so on. For example, the number 9 in binary is 1001. To calculate the value, we add 1 times 8 plus 0 times 4 plus 0 times 2 plus 1 times 1. Almost nobody does this math because computers do it for us. What's important is that any number can be represented with only 1s and 0s.
or by a bunch of wires that are on or off. The more wires you use, the larger the numbers you can store. With eight wires, you can store numbers between zero and 255. That's eight ones. With just 32 wires, you can store all the way from zero to over four billion.
Using the binary number system, you can represent any number you like. But what about... other types of information, like text, images, or sound.
It turns out that all these things can also be represented with numbers. Think of all the letters in the alphabet. You could assign a number to each letter. A could be 1, B could be 2, and so on.
You can then represent any word or paragraph as a sequence of numbers. And as we saw, these numbers can be stored as on or off electrical signals. Every word you see on every web page on your phone is represented using a system like this.
Now, let's consider photos, videos, and all the graphics you see on a screen. All of these images are made out of teeny dots called pixels. And each pixel has a color.
Each of the colors can be represented with numbers. When you consider that a typical image has millions of these pixels, and a typical video shows 30 images per second, now we're talking about a lot of data here. Every sound is basically a series of vibrations in the air. Vibrations can be represented graphically as a waveform.
Any point on this waveform can be represented by a number. And this way, any sound can be broken down into a series of numbers. If you want higher quality sound, you would pick 32-bit audio over 8-bit audio. More bits means a higher range of numbers.
When you use a computer to write code or make your own app, you're not dealing directly with these ones and zeros, but you will be dealing with images or sound or video. So if you want to understand how computers work on the inside, it all comes down to these simple ones and zeros and the electrical signals in the circuits behind them. They are the backbone of how all computers input, store, process, and output information.