This article needs additional citations for verification. (April 2015) |
In computing, a nibble, also spelled nybble[1] to match byte,[2] is a unit of information consisting of four bits,[3] equivalent to one half of a byte or octet (data units of eight-bit length).[4][5] The unit is alternatively called a nybble, nybl, half-byte or tetrad.[6][7] In computer networking and telecommunications, the unit is also sometimes called a semi-octet,[8] quadbit,[9] or quartet.[10][11]

A nibble uses four digits in binary positional notation (base 2) to encode one of sixteen () possible values, representing the same amount of information stored by two digits in the quaternary numeral system (base 4) or just a single hexadecimal ("hex")[12] digit (base 16). That functional equivalence allows nibbles to typically be represented by a single hex digit, and likewise, byte values by a pair of hex digits.[12]
Four-bit computers use nibble-sized data for storage and operations, in the form of the word unit. Such computers were used in early microprocessors, pocket calculators and pocket computers, and continue to be used in some microcontrollers. In this context, 4-bit groups were sometimes also called characters[13] or digits[14] rather than nibbles.[3]
History
editThe term nibble originates from its representing half a byte, with byte a homophone of the English word bite.[2] David B. Benson may have coined its use to describe four-bit values as a joke while working as a professor at Washington State University in 1958.[15]
In 1977, an early use of the spelling nybble for the term was recorded within the consumer-banking technology group at Citibank. It created a pre-ISO 8583 standard for transactional messages between ATMs and Citibank's data centers that used the basic data unit nabble.[citation needed]
In the early 1980s, the alternative spelling nybble reflected the spelling of byte, as noted in editorials of Kilobaud Microcomputing and Byte.[citation needed]
Historically, nybble was used in several cases for data units longer than four bits. On the Apple II, much of the disk drive control and group coded recording was implemented in software, and writing data to a disk was done by converting 256-byte pages into sets of 5-bit[16] (later, 6-bit) nibbles whereas loading disk data required the reverse.[17][18] Moreover, 1982 documentation for the Integrated Woz Machine refers consistently to an "8 bit nibble".[19] The term byte once had the same ambiguity and meant a set of bits but not necessarily 8, hence the distinction of bytes and octets or of nibbles and quartets (or quadbits). Today, the terms byte and nibble almost always refer to 8-bit and 4-bit collections, respectively, and are very rarely used to express any other sizes.[citation needed]
Part of a byte
editNibble is used to describe the amount of memory used to store a digit of a number stored in packed decimal format (BCD) within an IBM mainframe. This technique is used to make computations faster and debugging easier. An 8-bit byte is split in half, and each nibble is used to store one decimal digit. The last (rightmost) nibble of the variable is reserved for the sign.[citation needed] Thus, a variable that can store up to nine digits would be packed into 5 bytes. Ease of debugging resulted from the numbers' being readable in a hex dump where two hex numbers are used to represent the value of a byte, as , or . For example, a five-byte BCD value of 31 41 59 26 5C represents a decimal value of +314,159,265.
Packed nibbles can also describe binary numbers. When converting from bytes to nibbles,the two halves are often referred to as the low (right) and high (left) nibbles rather than the more formal labels of least- and most-significant bits.[20] For example, in the binary representation for the natural number 97, , the high nibble is () and the low nibble is (). That same number expressed in hexadecimal is simply , with each nibble now reduced to a single digit that nonetheless represents the same value ().
Value representation
editA nibble-sized value can be represented in different numeric bases:
See also
edit- Binary number – Number expressed in the base-2 numeral system
- Syllable – Platform-specific data size used for some historical digital hardware
- Word – Base memory unit handled by a computer
References
edit- ↑ Sander-Cederlof, Bob (May 1981). "Commented Listing of DOS 3.2.1, $B800-BCFF". Apple Assembly Line. 1 (8). Richardson, Texas: S-C Software. Archived from the original on 2024-12-13. Retrieved 2026-06-11.
PRE.NYBBLE and POST.NYBBLE convert between memory format and disk format. […] PRE.NYBBLE converts the 256-byte buffer to 410 bytes of 5-bits each, then […] POST.NYBBLE converts the 410 5-bit values back to 256 8-bit bytes.
- 1 2 Raymond, Eric S., ed. (1991-09-21). The New Hacker's Dictionary (1st ed.). Cambridge, Massachusetts: MIT Press. p. 265. ISBN 0-262-18145-2. LCCN 91018745. OCLC 1036797040. OL 1540152M. Retrieved 2026-05-21.
nybble /nib´l/ (alt. nibble) [from v. ´nibble´ by analogy with ´bite´ ⇒ ´byte´] n. Four bits; one hex digit; a half-byte. […]
- 1 2 Raphael, Howard A., ed. (November 1974). "The Functions Of A Computer: Instruction Register And Decoder" (PDF). MCS-40 User's Manual For Logic Designers. Santa Clara, California: Intel Corp. p. viii. Archived (PDF) from the original on 2018-09-20. Retrieved 2020-03-03.
The characteristic eight bit field is sometimes referred to as a byte, a four-bit field can be referred to as a nibble.
- ↑ Hall, Douglas V. (1980). Microprocessors and Digital Systems (1st ed.). New York City: Gregg Division, McGraw-Hill, Inc. p. 76. ISBN 0-07-025571-7. LCCN 79015644. OCLC 1285744331. OL 4412038M. Retrieved 2026-05-21.
An eight-bit binary word is often called a byte, and a four-bit binary word is called a nibble.
- ↑ Warren, Henry S., Jr. (July 2002). "Chapter 1–1: Notation". Hacker's Delight (1st ed.). Boston: Addison-Wesley. p. 1. ISBN 0-201-91465-4. LCCN 2002066501. OCLC 49559016. Retrieved 2026-05-22.
The terms "bits," "nibbles," "bytes," "halfwords," "words," and "doublewords" refer to lengths of 1, 4, 8, 16, 32, and 64 bits, respectively.
{{cite book}}: CS1 maint: multiple names: authors list (link) - ↑ Carr, John Weber, III and Spearman, Mary Dale, eds. (1959). "Introduction to the Use of Digital Computers, Programming and Artificial Intelligence". Notes from the Summer Conference held at the Computation Center of the University of North Carolina at Chapel Hill, 17–28 August, 1959. Frontier Research on Digital Computers. Vol. 1. p. 211.
Each of these letters corresponds to one of the integers from zero to fifteen, therefore requiring 4 bits (one "tetrade") in binary representation.
{{cite conference}}: CS1 maint: multiple names: editors list (link) - ↑ Speiser, Ambrosius Paul (1965) [1961]. Written at ETH Zurich. Digitale Rechenanlagen: Grundlagen / Schaltungstechnik / Arbeitsweise Betriebssicherheit [Digital computers: Fundamentals / Circuit technology / Operation and reliability] (in German) (2nd ed.). Berlin/Heidelberg: Springer-Verlag. pp. 6–9, 164–165, 183, 208–212. doi:10.1007/978-3-642-92953-3. ISBN 978-3-642-92954-0. LCCN 6500014624. p. 6:
Es gibt 10 verschiedene Dezimalziffern. Mit 4 Dualstellen lassen sich 24 = 16 Kombinationen bilden, also miissen 4 Dualstellen geniigen, um eine Dezimale zu verkörpern. Eine solche Vierergruppe wird als Tetrade bezeichnet.
[There are 10 different decimal digits. With 4 binary digits, 24 = 16 possible combinations can be formed; thus, 4 binary digits must suffice to represent a decimal digit. Such a group of four is called a tetrad.] - ↑ Pužman, Josef and Kubín, Boris (2012-12-06) [16 December 1991]. Public Data Networks: From Separate PDNs to the ISDN (2nd ed.). London: Springer-Verlag. p. 112–114. doi:10.1007/978-1-4471-1737-7. ISBN 978-1-4471-1737-7. Retrieved 2026-05-22. p. 112:
[…] the X.25 packet format is octet-oriented (it is an integer multiple of 8-tuples of bits), though in some cases only semi-octets (4 bits) provide comprehensive information.
- ↑ Horak, Ray (2007-11-28). Webster's New World Telecom Dictionary (PDF). Indianapolis: Wiley Publishing, Inc. p. 402. ISBN 978-0-471-77457-0. LCCN 2007024232. Archived (PDF) from the original on 2026-05-22.
quadbit 1. A set of four bits.
- ↑ Brewster, Ronald L., ed. (1994) [1986]. Data communications and networks 3. IEE Telecommunications Series. Vol. 31 (3rd ed.). London: Institution of Electrical Engineers. p. 155. ISBN 978-0-85296-804-8. LCCN 2014466971. OCLC 1391398597. OL 18078010M.
A data symbol represents one quartet (4 bits) of binary data; 16 symbols are thus required to convey data.
- ↑ Courbis, Paul and Lalande, Sébastien (2006-06-27) [1 December 1989]. "Chapitre V - L'accès au langage-machine: comment entrer un programme-machine ou, plus généralement, un objet quelconque (ASS / LASS)" [Chapter V - Accessing Machine Language: How to enter a machine program or, more generally, any object (ASS / LASS)] (PDF). Voyage au centre de la HP28c/s [A Look Inside the HP28c/s] (in French) (2nd ed.). Paris: La Règle à Calcul. pp. 63, 105. OCLC 636072913. Archived from the original on 2016-08-06. Retrieved 2015-09-06. p. 63:
Comme un caractère de la chaîne LM représente un quartet et que l'on veut créer une chaîne comme résultat on va coder 2 quartets par 2 quartets (1 caractêre ASCll=2 quartets=1 octet).
[Since each character in the LM string represents a quartet, and we want to create a string as the result, we will encode the quartets in pairs (1 ASCII character = 2 quartets = 1 byte).] - 1 2 Heller, Steve (1997-04-24). Introduction to C++ (1st ed.). Morgan Kaufmann. pp. 25–27. ISBN 978-0-12-339099-8. LCCN 96-054727. pp. 25–26:
As a rule, the term hexadecimal is abbreviated to hex. Since there are 16 possible combinations of 4 bits (2×2×2×2), hexadecimal notation allows four bits of a binary number to be represented by one hex digit. […] For this reason, binary is almost never used. Instead, we use hex as a shortcut to eliminate the necessity of reading, writing and remembering long strings of bits.
- ↑ "Terms And Abbreviations" (PDF). MCS-4™ Assembly Language Programming Manual (Preliminary ed.). Santa Clara, California: Intel Corp. December 1973. pp. v, 2–6. Archived (PDF) from the original on 2020-03-01. Retrieved 2020-03-02.
Character – A group of 4 contiguous bits of data.
(N.B. This Intel 4004 manual uses the term character referring to 4-bit rather than 8-bit data entities. By 1974, Intel had already switched to use the more common term nibble for 4-bit entities in their documentation for the succeeding 4040 processor.) - ↑ COP400 Microcontroller Family COPS Family User's Guide. National semiconductor. p. 9.10. Retrieved 2025-06-23.
- ↑ Hollandbeck, Andy (2022-08-04). "In a Word: Common Words You Didn't Know Were Also Units of Measure". The Saturday Evening Post. Indianapolis. Archived from the original on 2022-08-04. Retrieved 2025-01-04.
[…] As David Benson, a Washington State University professor, remembered it, he had jokingly made a remark in 1958 about "half a byte" (i.e., "half a bite") being a nibble, and the name stuck.
- ↑ Worth, Don D. and Lechner, Pieter M. (1982-05-01) [1981-06-01]. Beneath Apple DOS (4th printing, 1st ed.). Reseda, California: Quality Software. p. 14. ISBN 978-0-912985-00-8. Retrieved 2017-03-21.
This new method involved a "5 and 3" split of the data bits, versus the "4 and 4" mentioned earlier. Each byte written to the disk contains five valid bits rather than four. This requires 410 "disk" bytes to store a 256 byte sector.
- ↑ Worth, Don D. and Lechner, Pieter M. (March 1985) [1984]. Beneath Apple ProDOS (2nd printing, 1st ed.). Chatsworth, California: Quality Software. ISBN 978-0-912985-05-3. LCCN 84-61383. Retrieved 2017-03-21.
- ↑ Copy II Plus, Version 9 – ProDOS/DOS Utilities (PDF). Beaverton, Oregon: Central Point Software. 1989-10-31 [1982]. Retrieved 2017-03-21.
{{cite book}}: CS1 maint: deprecated archival service (link) - ↑ Apple Computer, Inc. (February 1982) [1978]. Integrated Woz Machine (IWM) Specification (Revision 19) (PDF). Boulder Creek, California: DigiBarn Computer Museum. Archived (PDF) from the original on 2014-02-12. Retrieved 2016-08-06.
- ↑ Baccala, Brent, ed. (April 1997). "Binary arithmetic". Connected: An Internet Encyclopedia (3rd ed.). Archived from the original on 2019-02-13. Retrieved 2015-07-20.
Memorize the decimal values for the high nibble (they're just the multiples of 16). The low nibble is trivial. Every number between 0 and 255 is the sum of one of the high nibble values and one of the low nibble values.