ArticleslgStudy

computer science

Nibble

Nibble is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Nibble rather than just read about it. In short: 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.

Nibble — main illustration
Nibble — illustration

Key takeaways

  • Nibble belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Nibble to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Nibble from memory before moving on to harder problems.

Reference excerpt

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 {\textstyle 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.

History The term nibble originates from its representing half a byte, with byte a homophone of the English word bite. 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. 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. In the early 1980s, the alternative spelling nybble reflected the spelling of byte, as noted in editorials of Kilobaud Microcomputing and Byte. 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 (later, 6-bit) nibbles whereas loading disk data required the reverse. Moreover, 1982 documentation for the Integrated Woz Machine refers consistently to an "8 bit nibble". 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.

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 2 4 × 2 4 = 2 8 {\textstyle 2^{4}\times 2^{4}=2^{8}} , or 16 × 16 = 256 {\textstyle 16\times 16=256} . 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. For example, in the binary representation for the natural number 97, ( 0110 0001 ) 2 {\textstyle (0110\ 0001)_{2}} , the high nibble is 0110 2 {\textstyle 0110_{2}} ( 2 6 + 2 5 = 64 + 32 = 96 {\textstyle 2^{6}+2^{5}=64+32=96} ) and the low nibble is 0001 2 {\textstyle 0001_{2}} ( 2 0 = 1 {\textstyle 2^{0}=1} ). That same number expressed in hexadecimal is simply 61 16 {\textstyle 61_{16}} , with each nibble now reduced to a single digit that nonetheless represents the same value ( ( 6 × 16 1 ) + ( 1 × 16 0 ) = 96 + 1 = 97 {\textstyle (6\times 16^{1})+(1\times 16^{0})=96+1=97} ).

Value representation A nibble-sized value can be represented in different numeric bases:

See also 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

Illustrations

Nibble: A CP 866 font lookup table for all possible octet values, with one nibble on each axis
A CP 866 font lookup table for all possible octet values, with one nibble on each axis

Worked examples

Example 1 — a first encounter with Nibble

Start with the simplest possible case. Write down what Nibble claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Nibble before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Nibble ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Nibble

In research
Nibble appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Nibble in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Nibble is common in secondary-school and first-year university syllabi. It links to neighbouring topics Computing terminology, Data unit, Units of information, so understanding it makes those chapters shorter.
In everyday life
Look for Nibble outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Nibble in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Nibble means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Nibble out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Nibble in simple terms?

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.

Why does Nibble matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Nibble?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Nibble.

Tags

  • Computing terminology
  • Data unit
  • Units of information

Keep exploring