Nibble
font lookup table for all possible octet values, with one nibble on each axis In computing, a nibble, also spelled nybble to match byte, is a unit of information consisting of four bits, equivalent to one half of a byte or octet (data…
≈ 3 min read
Names in other languages
No names in other languages are held for this entry yet.
Article bodies are English and are not machine-translated. A name in another language is not a translation of the article.
font lookup table for all possible octet values, with one nibble on each axis In computing, a nibble, also spelled nybble to match byte, is a unit of information consisting of four bits, equivalent to one half of a byte or octet (data units of eight-bit length). The unit is alternatively called a nybl, half-byte or tetrad.
In computer networking and telecommunications, the unit is also sometimes called a semi-octet, quadbit, or quartet. A nibble uses four digits in binary positional notation (base 2) to encode one of sixteen ( 2^4 ) 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") 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. 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 or digits rather than nibbles. 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 2^4 \times 2^4 = 2^8 , or 16 \times 16 = 256 . For example, a five-byte BCD value of represents a decimal value of . 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. For example, in the binary representation for the natural number 97, (0110\ 0001)_2 , the high nibble is 0110_2 ( 2^6 + 2^5 = 64 + 32 = 96 ) and the low nibble is 0001_2 ( 2^0 = 1 ).
That same number expressed in hexadecimal is simply 61_{16} , with each nibble now reduced to a single digit that nonetheless represents the same value ( (6 \times 16^1) + (1 \times 16^0) = 96 + 1 = 97 ). | style="padding: 0 0 0 2rem; vertical-align: top;" | |}
Text derived from https://en.wikipedia.org/w/index.php?oldid=1369932213 under CC BY-SA 4.0; modifications have been made.