1. Unsigned and Signed Binary Numbers
Unsigned binary = all numbers are positive (AKA no negative binary numbers allowed)
Signed binary = Both positive and negative binary numbers. This is what we are concerned with.
2. The Most Significant Bit (MSB)
MSB or the Most Significant Bit is the binary digit (bit) furthest to the left. For example, the MSB of 0101 (unsigned binary) is the 0 on the left because its potential value 1*2^3 or 8 (decimal) is the most significant!
In the decimal system the MSB has the highest weight (value) always. This however, is not always the case for binary numbers.
In the decimal system the MSB has the highest weight (value) always. This however, is not always the case for binary numbers.
3. Negative Weight of the MSB
Negative weight is present only in the MSB of a signed binary number. A non-signed binary number has positive weight for all of its bits because there is an unknown system size. The MSB (furthest bit to left) is weighted negatively if has the value 1.
For example, a nibble (4-bit unit) of 0111 would have no negative weight, thus would be positive. Specifically 0111 would be +7 (decimal), but what would -7 be? 1001 is -7. This occurs because the MSB of 1001 is negatively weighted and -8 + 1 would be equal to -7.
In signed binary numbers a number will always have 1 more negative value for every positive value in its system. For example, a nibble (4-bit unit) is the most positive at 0111 which is 7 in decimal, when the most negative value for the 4-bit unit is 1000 (-8). So, to find the complement of any positive binary number would be to switch all bits of 0 to be 1's and 1 to be 0's (inverting the number) followed by adding positive 1.
For example, a nibble (4-bit unit) of 0111 would have no negative weight, thus would be positive. Specifically 0111 would be +7 (decimal), but what would -7 be? 1001 is -7. This occurs because the MSB of 1001 is negatively weighted and -8 + 1 would be equal to -7.
In signed binary numbers a number will always have 1 more negative value for every positive value in its system. For example, a nibble (4-bit unit) is the most positive at 0111 which is 7 in decimal, when the most negative value for the 4-bit unit is 1000 (-8). So, to find the complement of any positive binary number would be to switch all bits of 0 to be 1's and 1 to be 0's (inverting the number) followed by adding positive 1.
4-Bit System potential bit values: [-8] [4] [2] [1]
8-Bit System potential bit values: [-128] [64] [32] [16] [8] [4] [2] [1]
All binary systems are limited to a finite state of values.
No comments:
Post a Comment