CHAPTER 01.04: BINARY REPRESENTATION : Introduction
This segment will introduce you to binary numbers. If you look at day-to-day numbers which you have, we have those numbers in base-10. So we talk about numbers like, let’s suppose 256.79, let’s suppose. We’re using digits from 0 through 9, so we’re using digits from 0 through 9 in the base-10 system, and that’s why it’s called a base-10 system, because there are 10 digits going from 0 to 9, because you’re including 0, so up to 9 makes it 10 digits. So if you look at this number here, each of these numbers which you are seeing, 2, 5, 6, 7, and 9, have a place in the number itself. So, for example, if you look at 2, 2 stands for 200, 5 stands for 50 and 6 is your single digit there, and 7 is one tenth multiplied by 7, this one is one hundredth of whatever that place number is. So if I was going to write this, I would write this like this: 2 times 10 to the power 2 plus 5 times 10 to the power 1, plus 6 times 10 to the power 0, so that would be the number of 256. So you’re seeing that the 2 has . . . is part of hundreds, 5 is part of tens, and 6 is part of 10 to the power 0. And then if you look at the number which is after the decimal point you get 7 times 10 to the power -1 plus 9 times 10 to the power -2. So each number has a place, and if you’re looking at the base-10 number, or your decimal numbers, they use digits from 0 through 9. Now with binary numbers it’s very similar. So when you’re looking at binary numbers, some people get scared about binary numbers, because it’s different, and that’s true, it is different, but no need to be scared about it. The thing is that binary numbers is base-2. It’s base-2, so you’re only going to use 2 digits, as opposed to using 10 digits in your base-10, and the numbers which you use in the binary is 0 and 1, that’s it. And the reason why we use only 0 and, because if you understood about the bits in a computer or in a computer memory, they can be on or off, so off might be 0, on might be 1. So you can only represent 0 and 1 in your binary notation in a computer. So that’s why we use base-2, so we have base-2, we have 2 numbers which you can represent, 0 and 1. So let’s go ahead and look at a number in binary notation and see what it is equivalent to in the base-10 notation, so that you can go back and forth between the two numbers. So let’s suppose somebody gives me a number like this, says hey, I’m going to give you a number like 1011 dot 0011 base-2. Now this dot which you are seeing here is no longer called a decimal point, the reason why it’s not called a decimal point is because it is now in the base-2. The common name which is given to it is the radix point. So if you are dealing with base-2, base-4, base-8, base-16, base-10, you can always call this point to be the radix point. So that differentiates between the integer part and the fractional part of a number.
Now, if I was going to look at what is the equivalent of this binary number, what I will do is I will see what the placement is. Now here, just like in your decimal notation the placement for this number 1 was 10 to the power 0, here it will be just 2 to the power 0, here will be 2 to the power 1, here will be 2 to the power 2, here will be 2 to the power 3. So that’s the only thing which has changed so far as the base is concerned, so you have the base of 2 now as opposed to 10. And this will be 2 to the power -1, this one will be 2 to the power -2, this one will be 2 to the power -3, and this number here will be 2 to the power -4. So you can see how the placements are very similar to the way you have in your decimal numbers, so there’s not much difference between the two. So let me write this number again, because I wrote a lot at the . . . about notation, so I’m going to just rewrite the same number, so you have 1011, radix point, 0011, 2. That 2 stands, this number here, 2 which you have here, is for the base which you are using for the numbers. So now what I’m going to do is, I’m going to get this 1, which will be 2 to the power 3, that is this number here, then plus 0 times 2 to the power 2, that is this number here, then plus 1 times 2 to the power 1, that is this number here, plus 1 times 2 to the power 0, and that’s the last number before the radix point. Now taking care of the numbers which are after the radix point, I’ve got 0 times 2 to the power -1, that takes care of this number, plus 0 times 2 to the power -2, takes care of that number, plus 1 times 2 to the power -3, which takes care of that number, plus 1 times 2 to the power -4, it takes care of that number. And if you go ahead and calculate this number, you’re going to get 11.1875, and this number is the equivalent number in the base-10. So what I have shown to you in this segment is how to convert, or how to see what the equivalent of the base-2 number which is given to you to what is the base-10. In the next segment, I’ll show you how to do the reverse process, where somebody gives you a number in the decimal, or base-10, notation, how do you convert it into a binary number. And that’s the end of this segment. |