Nibble
Template:Short description Template:CS1 config Template:Use American English Template:Use dmy dates Template:About Template:More citations needed [[File:Octets in CP866 ordered by nibbles.png|thumb|right|A [[Code page 866|Template:Abbr 866]] font lookup table for all possible octet values, with one nibble on each axis]] 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 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 (<math display="inline">2^4</math>) 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
The 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.Template:Citation needed
In the early 1980s, the alternative spelling nybble reflected the spelling of byte, as noted in editorials of Kilobaud Microcomputing and Byte.Template: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.Template:Citation needed
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.Template: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 <math display="inline">2^4 \times 2^4 = 2^8</math>, or <math display="inline">16 \times 16 = 256</math>. For example, a five-byte BCD value of <syntaxhighlight lang="text" class="" style="" inline="1">31</syntaxhighlight>Template:Narrow no-break space<syntaxhighlight lang="text" class="" style="" inline="1">59</syntaxhighlight>Template:Narrow no-break space<syntaxhighlight lang="text" class="" style="" inline="1">5C</syntaxhighlight> represents a decimal value of Template:Resize314,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, <math display="inline">(0110\ 0001)_2</math>, the high nibble is <math display="inline">0110_2</math> (<math display="inline">2^6 + 2^5 = 64 + 32 = 96</math>) and the low nibble is <math display="inline">0001_2</math> (<math display="inline">2^0 = 1</math>). That same number expressed in hexadecimal is simply <math display="inline">61_{16}</math>, with each nibble now reduced to a single digit that nonetheless represents the same value (<math display="inline">(6 \times 16^1) + (1 \times 16^0) = 96 + 1 = 97</math>).
Value representation
A nibble-sized value can be represented in different numeric bases:
See also
References
Template:Computer Storage Volumes
- ↑ Cite error: Invalid
<ref>tag; no text was provided for refs namedaal_bsc1981 - ↑ 2.0 2.1 Cite error: Invalid
<ref>tag; no text was provided for refs namedraymond1991 - ↑ 3.0 3.1 Cite error: Invalid
<ref>tag; no text was provided for refs namedraphael1974 - ↑ Cite error: Invalid
<ref>tag; no text was provided for refs namedhall1980 - ↑ Cite error: Invalid
<ref>tag; no text was provided for refs namedwarren2002 - ↑ Cite error: Invalid
<ref>tag; no text was provided for refs namedcarr1959 - ↑ Cite error: Invalid
<ref>tag; no text was provided for refs namedspeiser1965 - ↑ Cite error: Invalid
<ref>tag; no text was provided for refs namedpuzman2012 - ↑ Cite error: Invalid
<ref>tag; no text was provided for refs namedhorak2007 - ↑ Cite error: Invalid
<ref>tag; no text was provided for refs namedbrewster1994 - ↑ Cite error: Invalid
<ref>tag; no text was provided for refs namedcourbis2006 - ↑ 12.0 12.1 Cite error: Invalid
<ref>tag; no text was provided for refs namedheller1997 - ↑ Cite error: Invalid
<ref>tag; no text was provided for refs namedintel1973 - ↑ Template:Cite book
- ↑ Cite error: Invalid
<ref>tag; no text was provided for refs namedhollandbeck - ↑ Cite error: Invalid
<ref>tag; no text was provided for refs namedworth1982 - ↑ Cite error: Invalid
<ref>tag; no text was provided for refs namedlechner1984 - ↑ Cite error: Invalid
<ref>tag; no text was provided for refs namedcopyiiplus9 - ↑ Cite error: Invalid
<ref>tag; no text was provided for refs namediwm1982 - ↑ Cite error: Invalid
<ref>tag; no text was provided for refs namedbaccala1997