Glossary

Binary

base 2binary numeral system

Binary is a base-2 numeral system that represents values using only the digits 0 and 1.

Definition

Binary is a positional numeral system with base 2. It uses only 0 and 1; each binary digit is called a bit. Computers use binary states to represent numbers, text, instructions, images, and other data.

A binary string is a representation, not an encryption method. Anyone who knows its format can convert or interpret it without a secret key.

How it works

Each position has a value that is a power of two. From right to left, the positions represent 1, 2, 4, 8, and so on. Thus 101101 equals 32 + 8 + 4 + 1, or decimal 45.

Eight bits commonly form a byte. A byte can hold one of 256 values from 00000000 to 11111111, equivalent to hexadecimal 00 through FF.

Practical example

The bit groups 01001000 01101001 correspond to hexadecimal bytes 48 69. When those bytes are interpreted as ASCII or UTF-8, they produce Hi.

The same bits could mean something else under another format. Decoding binary therefore requires rules for grouping, bit order, byte order, signedness, and data type.

Interpretation and pitfalls

Leading zeros do not change an ordinary unsigned integer, but they matter when a field has a fixed width. For example, 1 and 00000001 have the same numeric value, while the latter explicitly occupies one byte.

A sequence of zeros and ones does not identify its own format. It may represent an integer, encoded text, floating-point data, compressed bytes, or ciphertext.

Frequently asked questions

Binary is a way to represent values. Some binary formats define codes for particular data, but binary itself provides no secrecy and is not encryption.

An unsigned field of n bits has 2^n possible patterns, from zero through 2^n - 1. Signed and other formats assign meanings to those patterns differently.

Modern systems commonly organize storage around 8-bit bytes. Grouping makes byte boundaries visible, but protocols may also use fields of other widths.

See also
Related tools
Related terms