# Binary Numbers

**Binary numbers** (also called base-2) are representations of numbers using bits—0s and 1s—instead of decimal digits. Typically numbers are represented in base-10, meaning they go $1, 2, 3, 4, 5, 6, 7, 8, 9,$ and then $10.$ In binary numbers look something like this: $100101110$. In base-10 that would be the number $302$.

Binary numbers are used extensively in mathematics and especially computer science, as bits are easy to create physically using logic gates (the gates are either open or closed, meaning 0 or 1).

#### Contents

## Definition

A binary number is a number expressed in the binary numeral system, which represents numbers using two digits: 0 and 1.

In contrast to the standard base-10 system, which represents numbers using powers of 10, the place values in binary correspond to powers of 2. Thus the first place (the place just before the decimal) represents $2^0,$ the second place indicates $2^1,$ the third $2^2,$ and so forth. The digits on the right side of the decimal all have a denominator which is a power of 2. So, the first digit after the decimal represents $2^{-1},$ the second digit $2^{-2},$ and so on.

## Examples

What is the representation of $1011_2$ using the base-10 system? (Note: The sub 2 notation here indicates that this is a binary number.)

Starting from the right, the places each represent $2^0, 2^1, 2^2,$ and $2^3$. So

$1011_2= 1\times 2^3 + 0 \times 2^2 + 1 \times 2^1 + 1 \times 2^0 = 8 + 2 + 1 = 11.\ _\square$

What is the representation of 16 in binary?

Since $16 = 2^4$, we need a single 1 in the place that represents $2^4$.Thus $16 = 10000_2$. $_\square$

What is the representation of $1110_2 + 1001_2$ using the base-10 system?

$1110_2$ is equal to

$1\times 2^3 + 1 \times 2^2 + 1 \times 2^1 + 0 \times 2^0 = 8 + 4 + 2 = 14,$

and $1001_2$ is equal to

$1\times 2^3 + 0 \times 2^2 + 0 \times 2^1 + 1 \times 2^0 = 8 + 1= 9.$

Thus, the answer is $14 + 9 = 23.$

Alternatively, it is possible to add the numbers without converting to binary first, using the same arithmetic as for decimal numbers. Remembering that $1_2+1_2 = 10_2$, the sum is $10111_2 = 23_{10}.$ $_\square$

That's right! Many procedures in arithmetic are possible in binary as well and follow the same form. Addition, subtraction, multiplication. division, squares, and square roots are all possible via traditional arithmetic procedures.

If 30 is represented in binary, what would the sum of the digits be?

30 is equal to

$16 + 8 + 4 + 2 = 1\times 2^4 + 1 \times 2^3 + 1 \times 2^2 + 1 \times 2^1 + 0 \times 2^0 = 11110_2 .$

Thus, the sum of the digits is $1+1+1+1+0 = 4.$ $_\square$

What is $\frac13$ converted to binary?

Since $\frac43 =\frac13+1,$ if

$\frac13 = (0.c_1c_2c_3\ldots)_2,$

then

$\frac43 = (1.c_1c_2c_3\ldots)_2.$

But $\frac43 = 4 \cdot \frac13$, and multiplying by $4 = 100_2$ shifts the binary expansion of a number by two units to the left. So $0 = c_1, 1 = c_2, c_1 = c_3, c_2= c_4,$ and so on. This shows that

$\frac13 = (0.0101\ldots)_2 = \big(0.{\overline{01}}\big)_2,$

which corresponds to the geometric series

$\frac13 = \frac14+\frac1{16}+\frac1{64}+\cdots.\ _\square$