Byte
A unit of digital information typically consisting of eight bits.
A byte is a fundamental unit of computer storage and memory, consisting of 8 bits. Bytes are the standard unit for measuring file sizes and memory capacity.
Byte facts:
- 8 bits = 1 byte (standard since IBM System/360, 1960s)
- Range: 0-255 (unsigned) or -128 to 127 (signed)
- One ASCII character = one byte
- Term likely coined by Werner Buchholz (IBM, 1956)
Byte multiples (binary):
- Kilobyte (KB): 1,024 bytes (2¹⁰)
- Megabyte (MB): 1,048,576 bytes (2²⁰)
- Gigabyte (GB): 1,073,741,824 bytes (2³⁰)
- Terabyte (TB): 2⁴⁰ bytes
Note: SI prefixes (1000-based) vs binary prefixes (1024-based): KB vs KiB.
graph LR
Center["Byte"]:::main
Pre_bit["bit"]:::pre --> Center
click Pre_bit "/terms/bit"
Rel_bit["bit"]:::related -.-> Center
click Rel_bit "/terms/bit"
Rel_binary["binary"]:::related -.-> Center
click Rel_binary "/terms/binary"
Rel_hexadecimal["hexadecimal"]:::related -.-> Center
click Rel_hexadecimal "/terms/hexadecimal"
classDef main fill:#7c3aed,stroke:#8b5cf6,stroke-width:2px,color:white,font-weight:bold,rx:5,ry:5;
classDef pre fill:#0f172a,stroke:#3b82f6,color:#94a3b8,rx:5,ry:5;
classDef child fill:#0f172a,stroke:#10b981,color:#94a3b8,rx:5,ry:5;
classDef related fill:#0f172a,stroke:#8b5cf6,stroke-dasharray: 5 5,color:#94a3b8,rx:5,ry:5;
linkStyle default stroke:#4b5563,stroke-width:2px;
🧒 Explain Like I'm 5
📦 Think of a **[bit](/en/terms/bit)** like a single light switch (on or off). A **byte** is a small box that holds 8 of those switches. This 'box' is the smallest piece of information a computer can easily grab and understand, like a single letter in a word.
🤓 Expert Deep Dive
## Byte: An Expert Deep Dive
A byte is a fundamental unit of digital information, conventionally comprising eight bits. Historically, byte sizes were variable, ranging from 4 to 7 bits, but the 8-bit standard has achieved widespread de facto adoption. This standardization is critical, as a byte is the smallest addressable unit of memory in most modern computer architectures.
The significance of the 8-bit byte lies in its capacity to represent 28, or 256, distinct values. This range is sufficient for encoding a single character in schemes like ASCII or EBCDIC, or for representing small integers. However, the interpretation of these 256 values is entirely dependent on the context, specifically the character encoding scheme (e.g., ASCII, UTF-8) or data type (e.g., signed/unsigned integer, floating-point number) being used.
Beyond basic storage, bytes are integral to data transfer and processing. In networking, the term octet is often employed synonymously with byte to explicitly denote an 8-bit quantity, avoiding historical ambiguities. Crucially, the order in which bytes are arranged to represent multi-byte data, known as endianness (big-endian or little-endian), profoundly impacts data interpretation and cross-platform compatibility. Understanding byte representation, including bit ordering within a byte and memory alignment, is essential for low-level programming, hardware interaction, and optimizing performance.