Introduction to Binary Representation of Numbers

In this segment we'll talk about introduction to binary representation of numbers. In everyday life we use number systems that have a base 10, also called the decimal numeral system. And when a number is written in this system we can quickly decipher as what those numbers really mean, so for example if I take a number like 267.35, now I know exactly that hey this 267 and 0.35 is the number. And we don't think too much about it, but what you got to understand is that each of these numbers have a place. For example, this one is the place for hundreds, this one is placed for the tens this one is the place for ones, and then after the decimal point this place is for one tenth, that's in power minus one, and this place is for one hundreds. If we had to write 267.35, we would also be able to write it as 2*10^2 + 6* 10^1 + 7*10^0. And then for the fractional part which is this one right here we'll say 3*10^-1 + 5*10^-2. So, you can see that how if we expand this number, we'll get 200 + 60 + 7 + 0.3 + 0.05, and eventually we'll get back our number of 267.35. So, the binary system is not any different; the only difference is that the base is different the base is only two. So, the only numbers which you can have are zeros and ones. So as far the digits are concerned, in base 10 we know that the digits which we can have is any number from zero through nine; we have ten different digits. But for binary it'll be base 2 so we can have only 2 digits in it and those 2 digits are zero and one. So, let’s go and see what that means. So, let’s go and look at a number in base 2. So, a number like this for example. Now what's going to happen is that this is base two number so there's only going to be ones and zeros in the number. This dot here is called the radix point. It is no longer called the decimal point, because the decimal point only is connected to the decimal numeral system. And then of course this is called the fractional part, and this is called the integer part of the of the number. But what was now different is only this fact that hey let's suppose if you look at this number 1 here this is corresponding to 2^0. And the place for this one is 2^1. So just the base is different this is 2^2, and this place here is 2^3. And if you look at this one this is 2^-1, this place is 2^-2, and this place is 2^-3, and this place here is 2^-4.  So only the base is different everything else is still the same. So, let's suppose somebody says hey can you tell me what the equivalent of this number is in base 10. It'll be just equal to 1*2^3 plus 1*2^2 + 0*2^1  +1*2^0 because this is 1*2^3,  1*2^2,  0*2^1, 1*2^0.  Then let's look at the fractional part. It will be 1*2^-1 + 0*2^-2 + 1*2^-3 + 1*2^-4. 1*2^-1, 0*2^-2, 1*2^-3, 1*2^4. So, if we expand this, we get 8 from the first one then, we get 4, then we get 0, and then we get 1. And then from the fractional part, which is this part right here we get 0.5, we get 0, we get 0.125, and then from here we get 0.0625. That’s what we get here. So now if we're going to add these numbers, we'll get 13 from here, right. And then we will get 13.6875. That'll be our equivalent to the base 10. And so, once we have realized that we can now convert a base 2 number to base 10 number. And that tells you that how equivalency there is. In the next lesson, we'll talk about the reverse: how do we convert a base 10 number to a base 2 number? And that is the end of this segment.