**It is very easy to design simple, accurate electronic circuits that operate with only two voltage levels. For this reason, almost every digital system uses the binary (base-2) number system as the basic number system of its operations.**

** **Other number systems (like the decimal system) are often used to interpret or represent binary quantities for the convenience of the people who work with and use these digital systems. [ Also read: decimal system ]

## Binary System – explained

*In the binary system, there are only two symbols or possible digit values, 0 and 1.* Even so, this base-2 system can be used to represent any quantity that can be represented in decimal or other number systems. In general, though, it will take a greater number of binary digits to express a given quantity.

The binary system is a positional value system, wherein each binary digit has its own value or weight expressed as a power of 2. This is illustrated in Figure 1. Here, places to the left of the binary point (counterpart of the decimal point) are positive powers of 2, and

places to the right are negative powers of 2.

The number 1011.101 is shown represented in the figure. To find its equivalent in the decimal system, we simply take the sum of the products of each digit value (0 or 1) and its positional value:

**1011.101 _{2} = (1 * 2^{3}) + (0 * 2^{2}) + (1 * 2^{1}) + (1 * 2^{0}) + (1 * 2^{-1}) + (0 * 2^{-2}) + (1 * 2^{-3}) **

**= 8 + 0 + 2 + 1 + 0.5 + 0 + 0.125 **

**= 11.625 _{10} **

Notice in the preceding operation that subscript (2) was used to indicate the base in which the particular number is expressed.This convention is used to avoid confusion whenever more than one number system is being employed.

In the binary system, the term binary digit is often abbreviated to the term bit, which we will use from now on. Thus, in the number expressed in Figure 1, there are four bits to the left of the binary point, representing the integer part of the number, and three bits to the right of the binary point, representing the fractional part.

The most significant bit (MSB) is the leftmost bit (largest weight). The least significant bit (LSB) is the rightmost bit (smallest weight).

These are indicated in Figure 1. Here, the MSB has a weight of 2^{3}; the LSB has a weight of 2^{-3}

## Binary Counting

When we deal with binary numbers, we will usually be restricted to a specific number of bits. This restriction is based on the circuitry used to represent these binary numbers. Let’s use four-bit binary numbers to illustrate the method for counting in binary.

The sequence (shown in Figure 2) begins with all bits at 0; this is called the zero count. For each successive count, the units (2^{0}) position toggles; that is, it changes from one binary value to the other.

Each time the units bit changes from a 1 to a 0, the twos (2^{1}) position will toggle (change states). Each time the twos position changes from 1 to 0, the fours (2^{2}) position will toggle (change states). Likewise, each time the fours position goes from 1 to 0, the

eights (2^{3}) position toggles. This same process would be continued for the higher-order bit positions if the binary number had more than four bits.

The binary counting sequence has an important characteristic, as shown in Figure 2. The units bit (LSB) changes either from 0 to 1 or 1 to 0 with each count. The second bit (twos position) stays at 0 for two counts, then at 1 for two counts, then at 0 for two counts, and so on.

The third bit (fours position) stays at 0 for four counts, then at 1 for four counts, and so on.

The fourth bit (eights position) stays at 0 for eight counts, then at 1 for eight counts. If we wanted to count further, we would add more places, and this pattern would continue with 0s and 1s alternating in groups of 2^{N-1}. For example, using a fifth binary place,

the fifth bit would alternate sixteen 0s, then sixteen 1s, and so on.

As we saw for the decimal system, it is also true for the binary system that by using N bits or places, we can go through 2^{N} counts. For example, with two bits we can go through 2^{2}= 4 counts (00_{2} through 11_{2}); with four bits we can go through 2^{4}=16 counts (0000_{2} through 1111_{2}); and so on.

The last count will always be all 1s and is equal to 2^{N}-1 in the decimal system. For example, using four bits, the last count is 1111_{2} = 2^{4}-1 = 15_{10}.

**Q: What is the largest number that can be represented using eight bits?**

solution:

2^{N}-1 = 2^{8}-1 = 255_{10} = 11111111_{2}.

.