Base 2 → Base 16 • Right-to-Left 4-Bit Grouping

Binary to Hex Converter

Convert binary bit strings into hexadecimal instantly. Automatically groups bits from right to left into 4-bit nibbles with clear left-padding explanations.

Samples:
Hexadecimal Result (Base 16)
2A
4-Bit Grouped Binary
0010 1010
Decimal (Base 10)
42
Octal (Base 8)
52
Minimum Bit Length
6 bits

4-Bit Grouping to Hex Digits

How Binary to Hexadecimal Grouping Works

Start at the rightmost bit (least-significant bit) and split the binary number into 4-bit groups. If the leftmost group has fewer than 4 bits, pad the left side with zeros. Left zero-padding never alters the numeric value — just like writing 007 for 7 in decimal.

Worked Example: Convert 101010₂ to Hex

  1. Split from the right: 10 and 1010.
  2. Left-pad the leftmost group with two zeros: 0010 and 1010.
  3. Convert each nibble: 0010 = 2, 1010 = 10 = A.
  4. Result: 2A₁₆ (Decimal 42).

Common Mistake to Avoid

Never group binary digits from left to right! Grouping 101010 from the left would produce 1010 10(00) = A8 (168), which is wrong by a factor of 4. Always align groups from the rightmost bit.

Frequently Asked Questions

Why do we pad zeros on the left instead of the right?

Zeros added to the left of an integer carry zero weight and leave the value unchanged. Adding zeros to the right multiplies the binary number by powers of 2.

What is 11111111 in hexadecimal?

Split into two 4-bit nibbles: 1111 (F) and 1111 (F), giving FF (decimal 255).