Topics Register • News • History • How to • Sequences statistics • Template prototypes

# Binary

Binary means composed of two parts or two pieces. It contrasts with unary, ternary, quaternary, and so on. Binary numeral system, a representation for numbers using only two digits (usually, 0 and 1). Thus it is a base 2 numbering system.

Binary is used in computers as a series of "off" and "on" switches. All the data and calculations are binary in nature. A bit is a binary digit. A byte is 8 bits and can hold values between 0 and 255. In binary, each digit's place value is double that of the next digit to the right; the place value of the rightmost digit being 1.

Example: 101100112 = 17910

from right to left
1 → 1 * 20 = 1
1 → 1 * 21 = 2
0 → 0 * 22 = 0
0 → 0 * 23 = 0
1 → 1 * 24 = 16
1 → 1 * 25 = 32
0 → 0 * 26 = 0
1 → 1 * 27 = 128

So 1 + 2 + 16 + 32 + 128 = 179.

Mersenne numbers when written in binary are all 1's. This makes them repunit numbers. This innate 'binariness' of Mersenne numbers makes calculations in the search for Mersenne primes a bit easier.

Octal (base 8) and hexadecimal (base 16) are other ways that binary may be represented. Two hexadecimal digits (0-F) can show a full byte. Hexadecimal FF = 255 (base 10) = 11111111 binary.