20061208
01.c. Number Systems: Binary
The other base system that concerns us most is base 2. It is also called "binary" because it is composed of two parts. This is the native number system of computers. Computers only have
two fingers, if you will; on or off. That's it. Back in the old days there were relays that were either open or closed. (In fact, Grace Hopper found that her program wasn't working right because there was a moth caught in a relay, preventing it from signaling as closed. That was the first computer bug. True story.) Nowdays we have little pulses of plus or minus 3.3 volts or whatever signaling level the chip expects. But computers still only have those two fingers, on or off. Because geeks are cool, we have shortened the term "binary digit", to get the word "bit".

Constructing a binary value table looks different but he principle is the same. The rightmost least significant bit is also the ones place but the full range of values is zero or one. Because of, this, the place values are dictated by powers of two. Two is the base number (because there are only two possible values for a binary digit.) This is the fundamental property of the base 2 number system. We will be doing lots of work with of powers of base two. The sooner you get comfortable with "2 to the power of" values, the happier you're going to be. Extra resources will be available to help with that.
Let's start with 2 to the power of zero, the least significant bit. 2 to the power of zero is? What? It's one. Why? Just because anything to the power of zero is one. Working our way leftwise, to the next most significant bit, this position (or place) value is 2 to the power of one, which is? It's two. Because? Anything to the power of one is the number itself. It's like we're back learning multiplication tables. The next most signific
ant digit value is 2 to the power of 2. The exponent, of course, indicates how many instances of the base is multiplied by itself; 2 times 2. That's 4. And the most significant of these four digits, the leftmost position multiplier has the value of 2 to the power of 3. 2 times 2 times 2, is 3 2's multiplied together, or 8.
Let's take a look at a binary number such as 0101. Working from the least significant digit, there is a 1 in the 1's place, 0 in the 2's, 1 in the 4's, and 0 in the 8's. We add that up as 1 + 4 and get 5. 0101 in binary equals 5 in decimal. Okay with that? How about 1010? 0 1's, 1 2's, 0 4's, and 1 8's. Right? So 2 + 8 = 10. 1010 in binary equals 10 in decimal. If we have four places then the highest number possible is 1111, which 1 + 2 + 4 + 8, which equals a decimal 15. For the same reason that the highest 4 digit decimal value is 9,999.
You've heard of bits and bytes. We just said that a bit is a binary digit. A byte is a grouping of 8 bits interpreted together. How many possible values are there in a byte? If there are 8 bits, then we're looking at 27 possible values, or 256. There's a rather arcane term, called the "nibble". That's 4 bits - or half of a byte. Cute. Nobody ever talks about a nibble, but it's going to be a handy unit for some of our purposes.
Next==>
two fingers, if you will; on or off. That's it. Back in the old days there were relays that were either open or closed. (In fact, Grace Hopper found that her program wasn't working right because there was a moth caught in a relay, preventing it from signaling as closed. That was the first computer bug. True story.) Nowdays we have little pulses of plus or minus 3.3 volts or whatever signaling level the chip expects. But computers still only have those two fingers, on or off. Because geeks are cool, we have shortened the term "binary digit", to get the word "bit".
Constructing a binary value table looks different but he principle is the same. The rightmost least significant bit is also the ones place but the full range of values is zero or one. Because of, this, the place values are dictated by powers of two. Two is the base number (because there are only two possible values for a binary digit.) This is the fundamental property of the base 2 number system. We will be doing lots of work with of powers of base two. The sooner you get comfortable with "2 to the power of" values, the happier you're going to be. Extra resources will be available to help with that.
Let's start with 2 to the power of zero, the least significant bit. 2 to the power of zero is? What? It's one. Why? Just because anything to the power of zero is one. Working our way leftwise, to the next most significant bit, this position (or place) value is 2 to the power of one, which is? It's two. Because? Anything to the power of one is the number itself. It's like we're back learning multiplication tables. The next most signific
ant digit value is 2 to the power of 2. The exponent, of course, indicates how many instances of the base is multiplied by itself; 2 times 2. That's 4. And the most significant of these four digits, the leftmost position multiplier has the value of 2 to the power of 3. 2 times 2 times 2, is 3 2's multiplied together, or 8.Let's take a look at a binary number such as 0101. Working from the least significant digit, there is a 1 in the 1's place, 0 in the 2's, 1 in the 4's, and 0 in the 8's. We add that up as 1 + 4 and get 5. 0101 in binary equals 5 in decimal. Okay with that? How about 1010? 0 1's, 1 2's, 0 4's, and 1 8's. Right? So 2 + 8 = 10. 1010 in binary equals 10 in decimal. If we have four places then the highest number possible is 1111, which 1 + 2 + 4 + 8, which equals a decimal 15. For the same reason that the highest 4 digit decimal value is 9,999.
You've heard of bits and bytes. We just said that a bit is a binary digit. A byte is a grouping of 8 bits interpreted together. How many possible values are there in a byte? If there are 8 bits, then we're looking at 27 possible values, or 256. There's a rather arcane term, called the "nibble". That's 4 bits - or half of a byte. Cute. Nobody ever talks about a nibble, but it's going to be a handy unit for some of our purposes.
Next==>
Comments:
<< Home
to the power of 3. 2 times 2 times 2,
need an extra space between 3. and 2 or it almost looks like a decimal.
Post a Comment
need an extra space between 3. and 2 or it almost looks like a decimal.
<< Home
