Introduction to the Binary System
Get introduced to the base symbols and representation rules of the binary system.
We'll cover the following
What is the binary system?
The decimal system leverages the fact that humans have ten fingers to count with. The binary system does something similar in the case of computers.
An essential component of computers is the transistor, which has two states, on and off. These are sometimes also referred to as high and low states, and correspond to the presence or absence of voltage. Each state can be represented using one of two symbols— and —resulting in a numbering system with base 2.
The binary system is a two-base system.
Base digits
The base digits for the binary system are simple: 0 to represent a low state and 1 to represent a high state.
Place value
Like in the decimal system, the rules for representing a number in binary come from the place values of the digits. We know that the rule was that place values correspond to ascending powers of from right to left.
Note: For the binary system, the rule is that—you guessed it—place values correspond to ascending powers of from right to left.
Note: Recall that binary digits are referred to as bits.
MSB and LSB
MSB is the most significant bit. It is the leftmost bit of a binary number and the one with the largest place values. Similarly, the LSB, or least significant bit, is the rightmost bit and the one with a place value of . The same symbol 1 in different places can have different values. For example, in , the MSB is , and in , the MSB is and vice versa for LSB. These terms make referring to binary numbers easier and can also be used to talk about groups of bits. For example, we can say “four least significant bits” to refer to the four right most bits in our number.
Range
This is all well and good, but you might be thinking that it was lucky for us that we had five places to start with for the example above. So, how would we know how many places an arbitrary number would take up to be represented in binary?
For that, we need to think about the range of a set of bits.
Let’s think about how many different numbers we can represent with two bits.
We can represent four numbers from . Let’s now see how many numbers we can represent with three bits.
Note: We already know that we can have four different numbers with two bits, which could each either be or . If we add a third bit, it could also either be or . So, we may extend each of the four two-bit binary numbers with a on the left and then with a on the left, giving different numbers. So, each bit contributes to doubling the number. In the following illustration, we are showing only the ones where the leftmost bit is .
Let’s try to come up with an expression for the range of bits. This means we want an expression to calculate how many (and what) numbers we can represent using bits.
Can we use the patterns we observed in our two examples to do this? Let’s see.
A single digit binary number can have two different values ( or ). When we take the number of bits to , the number of possible values increases to . When we take the number of bits to three digits, the number of possible values increases to . Notice that for binary digits, we have all the numbers available that we did for digits. This happens when we turn the th MSB digit off. Additionally, we have the option of turning the th digit on, which gives more possible numbers. This brings our total to . Thus, with every increase in , we are multiplying the possible combinations by . We then have:
Note: Remember that one of these values is always , so the range of numbers that we can represent is to .
Test yourself
How many numbers can you represent in binary using digits?