{{Short description|Four-bit unit of binary data}} {{About|the data storage unit}} {{More citations needed|date=April 2015}} {{Use dmy dates|date=March 2020|cs1-dates=y}} {{Use American English|date=March 2019}} [[File:Octets in CP866 ordered by nibbles.png|192px|thumb|right|An octet code page 866 font table ordered by nibbles.]]
In computing, a '''nibble''',<ref name="Intel_1974_MCS-40"/> also spelled '''nybble''' to match byte, is a unit of information that consists of four bits. A nibble is half of a byte, or octet.<ref name="Intel_1974_MCS-40"/><ref name="Hall_1980"/><ref name="Warren_2013"/> The unit is alternatively called '''nyble''', '''nybl''', '''half-byte'''<ref name="esr"/> or '''tetrade'''.<ref name="Carr_1959"/><ref name="Speiser_1965"/> In networking or telecommunications, the unit is often called a '''semi-octet''',<ref name="Puzman_2012"/> '''quadbit''',<ref name="Horak_2007_Websters"/> or '''quartet'''.<ref name="Brewster_1994"/><ref name="Courbis_1989"/>
As a nibble can represent sixteen ({{math|2<sup>4</sup>}}) possible values, a nibble value is often shown as a hexadecimal digit (hex digit).<ref name="Intro_CPP_1997"/> A byte is two nibbles, and therefore, a value can be shown as two hex digits.
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. They continue to be used in some microcontrollers. In this context, 4-bit groups were sometimes also called characters<ref name="Intel_1973_MCS-4"/> rather than nibbles.<ref name="Intel_1974_MCS-40"/>
== History == The term ''nibble'' originates from its representing half a byte, with ''byte'' a homophone of the English word ''bite''.<ref name="esr"/>
David B. Benson, at the time a Washington State University professor, might have originated the term ''nibble'' in 1958 as a joke.<ref>{{Cite web |last=Hollandbeck |first=Andy |date=August 4, 2022 |title=In a Word: Common Words You Didn’t Know Were Also Units of Measure |url=https://www.saturdayeveningpost.com/2022/08/in-a-word-common-words-you-didnt-know-were-also-units-of-measure/ |access-date=January 4, 2025 |website=The Saturday Evening Post}}</ref>
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 cash machines and Citibank's data centers that used the basic data unit ''nabble''.{{fact|date=September 2025}}
In the early 1980s, the alternative spelling ''nybble'' reflected the spelling of ''byte'', as noted in editorials of ''Kilobaud'' and ''Byte''.{{fact|date=September 2025}}
Historically, ''nybble'' was used in many cases for a group of bits greater than 4. On the Apple II, much of the disk drive control and group-coded recording was implemented in software. Writing data to a disk was done by converting 256-byte pages into sets of 5-bit (later, 6-bit) nibbles and loading disk data required the reverse.<ref name="Lechner_1982_Beneath_Apple_DOS"/><ref name="Lechner_1985_Beneath_Apple_ProDOS"/><ref name="CP_1989_CopyII"/> Moreover, 1982 documentation for the Integrated Woz Machine refers consistently to an "8 bit nibble".<ref name="Apple_1982_IWM"/> 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.{{fact|date=September 2025}}
==Part of a byte== ''Nibble'' 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. 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 {{math|16×16 {{=}} 2<sup>8</sup>}}. For example, a five-byte BCD value of {{code|31}} {{code|41}} {{code|59}} {{code|26}} {{code|5C}} represents a decimal value of +314159265.{{fact|date=September 2025}}
Packed nibbles can also describe binary numbers. The low and high nibbles of a byte are its two halves, which are the least and the most significant bits within the byte, respectively.<ref name="Baccala_1997"/> For example in binary, : ninety-seven {{=}} 97<sub>10</sub> {{=}} (0110 0001)<sub>2</sub> the high nibble is {{math|0110<sub>2</sub>}} ({{math|6<sub>16</sub>}}), and the low nibble is {{math|0001<sub>2</sub>}}. The total value is {{math|high-nibble × 16<sub>10</sub> + low-nibble}} ({{math|6 × 16 + 1 {{=}} 97<sub>10</sub>}}).
== Value representation == A nibble-sized value can be represented in different numeric bases:
{| class="wikitable" style="margin:auto" ! Binary !! Decimal !! Hexadecimal |- | {{Mono|0000}} || 0 || 0 |- | {{Mono|0001}} || 1 || 1 |- | {{Mono|0010}} || 2 || 2 |- | {{Mono|0011}} || 3 || 3 |- | {{Mono|0100}} || 4 || 4 |- | {{Mono|0101}} || 5 || 5 |- | {{Mono|0110}} || 6 || 6 |- | {{Mono|0111}} || 7 || 7 |- | {{Mono|1000}} || 8 || 8 |- | {{Mono|1001}} || 9 || 9 |- | {{Mono|1010}} || 10 || A |- | {{Mono|1011}} || 11 || B |- | {{Mono|1100}} || 12 || C |- | {{Mono|1101}} || 13 || D |- | {{Mono|1110}} || 14 || E |- | {{Mono|1111}} || 15 || F |- |}
== See also == * {{Annotated link|Binary number}} * {{Annotated link|Syllable (computing)|Syllable}} * {{Annotated link|Word (computer architecture)|Word}}
== References == <references> <ref name="Hall_1980">{{cite book |author-last=Hall |author-first=Douglas V. |title=Microprocessors and Digital Systems |publisher=McGraw-Hill |year=1980 |isbn=0-07-025571-7}}</ref> <ref name="Warren_2013">{{Cite book |title=Hacker's Delight |title-link=Hacker's Delight |author-first=Henry S. |author-last=Warren Jr. |date=2013 |orig-year=2002 |edition=2 |publisher=Addison Wesley – Pearson Education, Inc. |isbn=978-0-321-84268-8 |id=0-321-84268-5}}</ref> <ref name="esr">{{cite book |title=The New Hacker's Dictionary |author-first=Eric S. |author-last=Raymond |author-link=Eric S. Raymond |page=333 |url=https://books.google.com/books?id=g80P_4v4QbIC&pg=PA333 |publisher=MIT Press |year=1996 |isbn=978-0-262-68092-9}}</ref> <ref name="Carr_1959">{{cite book |title=Introduction to the use of digital computers: Notes from the Summer Conference Held at the Computation Center of the University of North Carolina, Chapel Hill, N.C., August 17-28, 1959 |volume=1 |series=Frontier Research on Digital Computers |author-first=John W. |author-last=Carr |publisher=University of North Carolina at Chapel Hill, Computation Center |page=211 |quote=Each of these letters corresponds to one of the integers from zero to fifteen, therefore requiring 4 bits (one "tetrade") in binary representation.}}</ref> <ref name="Speiser_1965">{{cite book |author-first=Ambrosius Paul |author-last=Speiser |author-link=Ambrosius Paul Speiser |location=ETH Zürich, Zürich, Switzerland |title=Digitale Rechenanlagen – Grundlagen / Schaltungstechnik / Arbeitsweise / Betriebssicherheit |language=de |trans-title=Digital computers – Basics / Circuits / Operation / Reliability |edition=2 |date=1965 |orig-year=1961 |publisher=Springer-Verlag / IBM |lccn=65-14624 |id=0978 |pages=6, 34, 165, 183, 208, 213, 215}}</ref> <ref name="Puzman_2012">{{cite book |title=Public Data Networks: From Separate PDNs to the ISDN |author-first1=Josef |author-last1=Puzman |author-first2=Boris |author-last2=Kubin |publisher=Springer Science+Business Media |date=2012 |isbn=978-1-4471-1737-7 |page=113 |url=https://books.google.com/books?id=ZY7qBwAAQBAJ&pg=PA113}}</ref> <ref name="Horak_2007_Websters">{{cite book |title=Webster's New World Telecom Dictionary |author-first=Ray |author-last=Horak |publisher=John Wiley & Sons |date=2007 |isbn=978-0-470-22571-4 |page=402 |url=https://books.google.com/books?id=L18YaEomzjMC&pg=PA402}}</ref> <ref name="Brewster_1994">{{cite book |title=Data Communications and Networks, Vol. III |volume=31 |series=IEE telecommunications series |publisher=Institution of Electrical Engineers |author-first=Ronald L. |author-last=Brewster |date=1994 |isbn=978-0-85296-804-8 |page=155 |url=https://books.google.com/books?id=7O5EXtN94PIC&pg=PA155 |quote=A data symbol represents one quartet (4 bits) of binary data.}}</ref> <ref name="Courbis_1989">{{cite book |author-last1=Courbis |author-first1=Paul |author-link1=Paul Courbis |url=http://www.courbis.fr/spip.php?article17 |title=Voyage au centre de la HP28c/s |author-last2=Lalande |author-first2=Sébastien |date=2006-06-27 |publisher=Editions de la Règle à Calcul |edition=2 |location=Paris, France |language=fr |oclc=636072913 |access-date=2015-09-06 |orig-year=1989 |archive-url=https://web.archive.org/web/20160806084555/http://www.courbis.fr/Voyage-au-centre-de-la-HP28-c-s,17.html |archive-date=2016-08-06 |url-status=live}} [http://www.courbis.fr/Data/Books/Pdfs_72/Voyage28/Voyage28_72x72_001_063.pdf] [http://www.courbis.fr/Data/Books/Pdfs_72/Voyage28/Voyage28_72x72_064_113.pdf] [http://www.courbis.fr/Data/Books/Pdfs_72/Voyage28/Voyage28_72x72_114_163.pdf] [http://www.courbis.fr/Data/Books/Pdfs_72/Voyage28/Voyage28_72x72_164_213.pdf] [http://www.courbis.fr/Data/Books/Pdfs_72/Voyage28/Voyage28_72x72_214_263.pdf] [http://www.courbis.fr/Data/Books/Pdfs_72/Voyage28/Voyage28_72x72_264_285.pdf]</ref> <ref name="Intro_CPP_1997">{{cite book |title=Introduction to C++ |author-first=Steve |author-last=Heller |publisher=Morgan Kaufmann |date=1997 |isbn=978-0-12-339099-8 |page=27 |url=https://books.google.com/books?id=KbiDKrvExnsC&pg=PA27 |quote=Each hex digit (0–f) represents exactly 4 bits.}}</ref> <ref name="Lechner_1982_Beneath_Apple_DOS">{{cite book |author-last1=Worth |author-first1=Don D. |url=https://archive.org/stream/Beneath_Apple_DOS_OCR#page/n24/mode/1up |title=Beneath Apple DOS |author-last2=Lechner |author-first2=Pieter M. |date=May 1982 |publisher=Quality Software |edition=4th printing, 1st |location=Reseda, California, USA |access-date=2017-03-21 |orig-year=1981}} [http://asciiexpress.net/files/docs/Beneath%20Apple%20DOS%20OCR.pdf] [https://mirrors.apple2.org.za/Apple%20II%20Documentation%20Project/Books/Beneath%20Apple%20DOS.pdf] [http://fd.fabiensanglard.net/prince_of_persia/Beneath%20Apple%20DOS.pdf] {{Webarchive|url=https://web.archive.org/web/20160309202219/http://fd.fabiensanglard.net/prince_of_persia/Beneath%20Apple%20DOS.pdf|date=9 March 2016}}</ref> <ref name="Lechner_1985_Beneath_Apple_ProDOS">{{cite book |author-last1=Worth |author-first1=Don D. |url=http://www.apple-iigs.info/doc/fichiers/beneathprodos.pdf |title=Beneath Apple ProDOS – For Users of Apple II Plus, Apple IIe and Apple IIc Computers |author-last2=Lechner |author-first2=Pieter M. |date=March 1985 |publisher=Quality Software |isbn=0-912985-05-4 |edition=2nd printing, 1st |location=Chatsworth, California, USA |lccn=84-61383 |access-date=2017-03-21 |orig-year=1984 |archive-url=https://web.archive.org/web/20170321014045/http://www.apple-iigs.info/doc/fichiers/beneathprodos.pdf |archive-date=2017-03-21 |url-status=live}} [https://archive.org/details/A2_BENEATH_APPLE_PRODOS_1_1984]</ref> <ref name="CP_1989_CopyII">{{cite book |title=Copy II Plus Version 9 – ProDOS/DOS Utilities – Data Recovery, File Management, Protected Software Backup |publisher=Central Point Software, Inc. |version=9.0 |date=1989-10-31 |orig-year=1982 |url=http://cps.applearchives.com/copy_ii_plus_9x_manual.pdf |access-date=2017-03-21 |url-status=dead |archive-url=https://archive.today/20170507224326/http://cps.applearchives.com/copy_ii_plus_9x_manual.pdf |archive-date=7 May 2017 }}</ref> <ref name="Apple_1982_IWM">{{cite book |title=Integrated Woz Machine (IWM) Specification |edition=19 |publisher=DigiBarn Computer Museum |author=Apple Computer, Inc. |author-link=Apple Computer, Inc. |date=February 1982 |orig-year=1978 |url=http://www.brutaldeluxe.fr/documentation/iwm/apple2_IWM_Spec_Rev19_1982.pdf |access-date=2016-08-06 |url-status=live |archive-url=https://web.archive.org/web/20160806095036/http://www.brutaldeluxe.fr/documentation/iwm/apple2_IWM_Spec_Rev19_1982.pdf |archive-date=2016-08-06}}</ref> <ref name="Baccala_1997">{{cite encyclopedia |title=Binary arithmetic |encyclopedia=Connected: An Internet Encyclopedia |author-first=Brent |author-last=Baccala |edition=3rd |date=April 1997 |url=http://www.freesoft.org/CIE/Topics/19.htm |access-date=2015-07-20 |url-status=live |archive-url=https://web.archive.org/web/20160806094514/http://www.freesoft.org/CIE/Topics/19.htm |archive-date=2016-08-06}}</ref> <ref name="Intel_1973_MCS-4">{{cite book |title=MCS-4 Assembly Language Programming Manual – The INTELLEC 4 Microcomputer System Programming Manual |chapter=Terms And Abbreviations |edition=Preliminary |publisher=Intel Corporation |date=December 1973 |location=Santa Clara, California, USA |id=MCS-030-1273-1 |pages=v, ((2–6)) |chapter-url=http://bitsavers.trailing-edge.com/components/intel/MCS4/MCS-4_Assembly_Language_Programming_Manual_Dec73.pdf |access-date=2020-03-02 |url-status=live |archive-url=https://web.archive.org/web/20200301235541/http://bitsavers.trailing-edge.com/components/intel/MCS4/MCS-4_Assembly_Language_Programming_Manual_Dec73.pdf |archive-date=2020-03-01 |quote=[...] Bit – The smallest unit of information which can be represented. (A bit may be in one of two states I 0 or 1). [...] Byte – A group of 8 contiguous bits occupying a single memory location. [...] Character – A group of 4 contiguous bits of data. [...]}} (NB. This Intel 4004 manual uses the term ''character'' referring to ''4-bit'' rather than 8-bit ''data'' entities. Intel switched to use the more common term ''nibble'' for 4-bit entities in their documentation for the succeeding processor 4040 in 1974 already.)</ref> <ref name="Intel_1974_MCS-40">{{cite book |title=MCS-40 User's Manual For Logic Designers |chapter=The Functions Of A Computer: Instruction Register And Decoder |publisher=Intel Corporation |editor-first=Howard A. |editor-last=Raphael |date=November 1974 |location=Santa Clara, California, USA |page=viii |chapter-url=http://bitsavers.trailing-edge.com/components/intel/MCS40/MCS-40_Users_Manual_Nov74.pdf |access-date=2020-03-03 |url-status=live |archive-url=https://web.archive.org/web/20200303024244/http://bitsavers.trailing-edge.com/components/intel/MCS40/MCS-40_Users_Manual_Nov74.pdf |archive-date=2020-03-03 |quote=[...] The characteristic eight bit field is sometimes referred to as a byte, a four-bit field can be referred to as a nibble. [...]}}</ref> </references>
==External links== * {{cite web |url=http://www.txbobsc.com/aal/1981/aal8105.html |title=Apple Assembly Line |date=May 1981 |volume=1 |number=8}}
{{Computer Storage Volumes}}
Category:Computing terminology Category:Data unit Category:Units of information Category:Articles with example C code Category:Articles with example Lisp (programming language) code