Byte
A byte is a unit of digital information that today almost always means eight bits. A bit is a single 0 or 1, so one byte can hold 256 different patterns, which is enough to stand for any English letter, digit, or common punctuation mark.[1]
Computers store and measure data in bytes. In most computers, each byte in memory has its own number, called an address, that a program uses to find it.[1] File sizes, memory, and disk space are measured in bytes and in larger units such as the Kilobyte, Megabyte, and Gigabyte.
Bits make a byte
A byte is a group of bits handled as one unit.[1] Because each bit has two possible values, adding a bit doubles the number of patterns a group can hold.[2]
Here is the number of bits and is the number of different patterns they can form. For a byte, , so .[2]
Read as a whole number in binary, a byte holds any value from 0 to 255. One pattern (all zeros) stands for 0, which leaves 255 patterns for the positive values 1 to 255.[2]
High-order and low-order bits
Each bit position has a place value, from 128 for the leftmost bit down to 1 for the rightmost. The leftmost bit, worth the most, is the most significant or high-order bit. The rightmost, worth 1, is the least significant or low-order bit.[3]
Nibbles and hexadecimal
Half a byte, four bits, is called a Nibble (also spelled nybble).[4] Four bits make patterns, which is exactly the number of digits in Hexadecimal, so one hexadecimal digit stands for one nibble.[2][4]
This makes hexadecimal a short way to write bytes. Every byte is written as two hexadecimal digits, from 00 to FF. For example, the byte 01001011 splits into the nibbles 0100 and 1011, which are 4 and B, so it is written 0x4B (75 in decimal), where the prefix 0x marks a hexadecimal number.[2]
What a byte holds
A byte has no meaning on its own. The same eight bits can stand for a letter, a number, or part of a larger value, depending on how a program reads them.
- Text. A character encoding maps each character to a bit pattern. The 7-bit ASCII code fits in one byte with the high-order bit set to 0.[5] UTF-8 uses 1 to 4 bytes per character, and it stores every ASCII character in a single byte with its usual value.[6]
- Numbers. One byte holds a whole number from 0 to 255. Larger numbers take several bytes in a row.[2][7]
- Memory locations. In most computers the byte is the smallest unit of memory that has its own address. A program cannot ask for fewer than eight bits of memory.[1]
Symbols and multiples
The byte has the symbol B, and the bit has the symbol bit.[8][9]
The standard IEC 80000-13 warns that the symbol B for byte is not international. It must not be confused with B for the bel, a unit of sound level.[9]
Decimal and binary prefixes
Large amounts of data use prefixes. The metric prefixes count in powers of 1000, while the binary prefixes count in powers of 1024 ().[8]
| Decimal unit | Size in bytes | Binary unit | Size in bytes |
|---|---|---|---|
| kilobyte (kB) | = 1000 | kibibyte (KiB) | = 1024 |
| megabyte (MB) | = 1 000 000 | mebibyte (MiB) | = 1 048 576 |
| gigabyte (GB) | = 1 000 000 000 | gibibyte (GiB) | = 1 073 741 824 |
| terabyte (TB) | tebibyte (TiB) |
The International Electrotechnical Commission (IEC) approved the binary prefixes in December 1998. They are not part of the International System of Units (SI), though their names come from the SI prefixes.[8]
Why the two systems clash
The confusion began because = 1024 is close to 1000. Computer engineers started calling 1024 bytes a kilobyte because it was easier, and the habit spread to the public.[10]
As a result, the word megabyte has more than one meaning.[8]
| Context | Meaning of megabyte | Size in bytes |
|---|---|---|
| Most memory makers | bytes | 1 048 576 |
| Most storage-device makers | bytes | 1 000 000 |
| "1.44 MB" 3.5-inch floppy disk | 1000 × 1024 bytes | 1 024 000 |
The gap grows with each prefix. It is 2.4 % at the kilo scale and close to 10 % at the tera scale.[10] A drive sold as 1 TB holds bytes, which is about 931 GiB.
Bits per second and bytes per second
Data sizes are usually given in bytes, but transfer speeds over a network are usually given in bits per second.[10] The unit for byte rates is the byte per second (B/s).[9] Because a byte has eight bits, a link of 100 megabits per second (Mbit/s) moves at most 12.5 megabytes per second (MB/s).
History
Creating the word
Werner Buchholz created the word byte in 1956 while working on the IBM Stretch computer.[11] He took it from "bite" and changed the spelling so it would not be accidentally turned into "bit".[12]
The early records of the word, as Buchholz described them, are these.[12]
- June 1956. An internal Stretch memo, the earliest known record, describes a byte as one to six bits handled at the same time (in parallel). Input and output equipment of the time handled six bits at a time.
- August 1956. The team considered 8-bit bytes and built them into the Stretch design shortly after.
- The word first appeared in print, in the paper "Processing Data in Bits and Pieces" by G. A. Blaauw, F. P. Brooks Jr., and W. Buchholz.
- The book Planning a Computer System, edited by Buchholz, defined a byte as "a group of bits used to encode a character, or the number of bits transmitted in parallel to and from input-output units".
The 8-bit standard
The IBM System/360, announced on April 7, 1964, made the 8-bit byte standard.[13] Stretch had given an address to each single bit and allowed bytes of different sizes. System/360 fixed the byte at eight bits to save cost and gave addresses to whole bytes instead. Since then the word byte has generally meant eight bits.[12]
Other byte sizes
Some older machines used byte for groups of 6, 7, or 9 bits. The PDP-10 supported bytes of any size from 1 to 36 bits.[11] These uses are no longer found.[11]
Byte versus octet
The word byte once had several sizes, so different groups settled the question in different ways.
The octet
Standards that need an exact size use the word octet, which always means eight bits. For example, the Internet Protocol specification describes an address as four octets (32 bits).[14]
IEC guidance
IEC 80000-13, first published in 2008, states that in English the name byte, symbol B, is another name for octet, symbol o, meaning an eight-bit byte.[15] It notes that byte has been used for other sizes and strongly recommends using byte and B only for eight-bit bytes. The 2025 edition keeps the same note.[9][15]
The C language
The C programming language keeps the older, general meaning. Its standard defines a byte as the smallest unit of storage that has its own address and can hold any character of the basic character set of the system running the program.[3] It leaves the number of bits in a byte to each Compiler (a program that turns source code into instructions a computer can run) and platform, as long as it is at least eight.[3][16]
Byte order
A value larger than one byte is stored as several bytes at consecutive addresses, and computers differ in the order they use. This order is called Endianness.[7]
- Little-endian systems store the least significant byte at the lowest address. x86 processors work this way.[7]
- Big-endian systems store the most significant byte at the lowest address.[7]
Byte order matters mainly when machines exchange data, since both sides must agree on it. In 1980 Danny Cohen urged the Internet community to adopt one standard order, and the Internet Engineering Task Force later chose big-endian as the "network byte order".[7]
References
- Binary and Data Representation, Dive Into Systems (Matthews, Newhall, and Webb), 2022.
- Number Bases and Unsigned Integers, Dive Into Systems (Matthews, Newhall, and Webb), 2022.
- Programming languages: C, working draft N2310, ISO/IEC JTC 1/SC 22/WG 14, 2018.
- nybble, The Jargon File (Eric S. Raymond), 2003.
- RFC 20: ASCII format for Network Interchange, Vint Cerf, 1969.
- RFC 3629: UTF-8, a transformation format of ISO 10646, IETF, 2003.
- Integer Byte Order, Dive Into Systems (Matthews, Newhall, and Webb), 2022.
- Prefixes for binary multiples, NIST Reference on Constants, Units, and Uncertainty.
- IEC 80000-13:2025, Quantities and units, Part 13: Information science and technology (preview), IEC, 2025.
- About bits and bytes: prefixes for binary multiples, International Electrotechnical Commission.
- byte, The Jargon File (Eric S. Raymond), 2003.
- Origin of the word "byte" in computers (Buchholz, "The word 'byte' comes of age", BYTE, February 1977), Computer History Museum archive, 1977.
- The IBM System/360, IBM.
- RFC 791: Internet Protocol, Information Sciences Institute (for DARPA), 1981.
- IEC 80000-13:2008, Quantities and units, Part 13: Information science and technology (sample), IEC, 2008.
- 5.2.4.2.1 Sizes of integer types (text of WG14/N1124), The New C Standard (Derek M. Jones), 2005.
