Someone once said that there are 10 kinds of people in the world, those who understand binary and those who don't. By the end of this tutorial, you will be among the group that understands binary and you will also get the joke. More importantly, this tutorial will give you a better understanding of how modern computers work. The smallest unit of data in a computer is the bit. The word bit is short for binary digit. Like a light bulb, a bit could be one of two states, on or off. In computing, a bit represents a single on or off signal inside of an electrical circuit. These on or off values are represented by the numbers one and zero respectively. From these simple bits, computers string together large sequences of ones and zeros to represent complex data and instructions. A string of eight bits is referred to as a byte. BITE is short for binary term. Since these on or off signals are composed of finite states, we call them digital. By contrast, an analog system would cover a range of virtually infinite points. Visually, we could represent digital signals as step functions and analog signals as continuous waves. For example, in a digital computer, we can represent music as a series of bits in an MP3 file. In an analog system, we can represent music as a pattern of waves. Old-fashioned vinyl records are a good example of an analog recording medium. Rather than represent music through a series of bits, the grooves in a vinyl record approximate the actual sound waves that have been recorded. So now that we know what bits are, let's learn how such a simple system can store such a wide array of information. We will now learn how to represent virtually any number using just ones and zeros. Let's use light bulbs to represent bits. Suppose we have an array of four light bulbs. When a light bulb is on, we can represent that on state as the digit one. Conversely, we can represent the off state as the digit zero. Suppose each bulb represents a power of two when turned on. The right most bulb is two to the power of zero, which is one. The next bulb over is two to the power of one, which is two. The next bulb after that is two to the power of two, which is four. And finally, the left most bit will represent two to the power of three, which is eight. When all four light bulbs are on, we can add up their values to get the number 15. Since eight plus four plus two plus one is 15. When a bulb is on, we can imagine that we are multiplying the power of two by one. When the light bulb is off, we multiply that power of two by zero. So if all of the light bulbs are turned off, we get zero times eight plus zero times four plus zero times two plus zero times one. In a moment, I will show you how to count from zero to fifteen in binary. First, I will flash the entire process in fast motion. Then I will break it down step by step. Here goes the fast motion counting. Now let's break it down and start at zero with all the lights off. To represent the value one, we turn on the right most bit. What we have is one times one. To represent the value two, we turn on the second bit only. What we have is one times two plus zero times one. To represent the value three, we turn on the first two bits. What we now have is one times two plus one times one. To represent the value four, we turn on the third bulb only. What we have now is one times four plus zero times two plus zero times one. To represent the value five, we add one times four plus zero times two plus one times one. So it's four plus one. To represent six, we add one times four plus one times two plus zero times one. So we have four plus two. We add up 1 times 4 plus 1 times 2 plus 1 times 1. So 3 ones. Or in base 2, 7. You might be recognizing a pattern. So you get the value 8. We turn on the fourth bulb only. This gives us 1 times 8 plus 0 times 4 plus 0 times 2 plus 0 times 1. To represent 9, we write 1, 0, 0, 1 in binary. It's 8 plus 1. To represent 10, we write 1, 0, 1, 0. You may have noticed a relationship between the number of bits and the number of values that can be represented. As a general rule, X number of bits can represent a total of 2 to the X different values. Let's start with 1 bit. As we know from our definition of a bit, a single bit can represent a total of 2 different values, 0 or 1. With 2 bits, we can represent 4 different values, namely 0 through 3. With 3 bits, we can represent 8 different values, 0 through 7. And with 4 bits, we can represent 16 different values, 0 through 15. In this tutorial, we define what is a bit and how it can be used to store numbers. We learn to count in binary from 0 to 15. And finally, we noted the relationship between the number of bits and the number of values that can be represented by these bits. For more information and lots more interesting content, please check out my blog Pumpkin Programmer by clicking on the link in the video description. Thanks for watching!