Skip to content
BetterDL

Nibble

Also called: nybble, 4 bits, half-byte

A group of 4 bits, half a byte. A nibble has 16 patterns, so it maps exactly to one hexadecimal digit, 0 to F.

A nibble is 4 bits, half a byte. It's a small unit, but an important one, because a nibble and a hexadecimal digit are the same thing written two ways.

4 bits make 2⁴ = 16 patterns, and hex has exactly 16 digits. So each nibble matches one hex digit:

  • 0 = 0000, 1 = 0001, 2 = 0010, 3 = 0011
  • 4 = 0100, 5 = 0101, 6 = 0110, 7 = 0111
  • 8 = 1000, 9 = 1001, A = 1010, B = 1011
  • C = 1100, D = 1101, E = 1110, F = 1111

You can rebuild any row from the weights 8, 4, 2, 1. For example, D = 13 = 8 + 4 + 1 = 1101.

That match is what makes binary hex conversion a lookup instead of arithmetic: split the bits into nibbles from the right and replace each one with its digit. A byte is two nibbles: the high nibble (bits 7–4) and the low nibble (bits 3–0).

1
8
1
4
0
2
1
1

Worked examples

Example

Splitting a byte into nibbles

Write 10110110 in hex.

  1. 1.

    High nibble: 1011 = 8 + 2 + 1 = 11 = B.

  2. 2.

    Low nibble: 0110 = 4 + 2 = 6.

  3. 3.

    Result: B6₁₆. Check: 11 × 16 + 6 = 182, and 128 + 32 + 16 + 4 + 2 = 182.

Example

How many hex digits for 22 bits?

Each hex digit covers one nibble, so divide by 4 and round up.

  1. 1.

    22 ÷ 4 = 5.5, so 5 full nibbles plus 2 leftover bits.

  2. 2.

    The 2 leftover bits still need their own digit (padded with zeros on the left).

  3. 3.

    Answer: 6 hex digits. The leftmost one can only be 0 to 3.

Common mistakes

  • Splitting into nibbles from the left. Groups must line up with the LSB, with the leftmost group padded on its left.

  • Dropping zeros inside a nibble. 2 is 0010, not 10; losing those zeros shifts every bit to its left.

Practice Nibble

Interactive questions with instant feedback and a worked solution for every wrong answer.

Learn it step by step

Nibble is taught in Number Systems.