Convert Binary to Hexadecimal

Convert Binary (bin) to Hexadecimal (hex) instantly and accurately.

Selected Binary (bin) - available characters: 0, 1

Binary (bin)
Hexadecimal (hex)

Conversion Formula

Step-by-step example using the value 42 (decimal):

Convert Binary (base 2) → Hexadecimal (base 16)

Step 1: Expand each digit of 101010 (bin) by position:

        1 × 2^5 = 32
        0 × 2^4 =  0
        1 × 2^3 =  8
        0 × 2^2 =  0
        1 × 2^1 =  2
        0 × 2^0 =  0
        ────────────
        Sum = 42 (decimal)

Step 2: Divide 42 by 16 repeatedly (read remainders upward):

        42 ÷ 16 = 2  r 10 (A)
         2 ÷ 16 = 0  r 2
        Read remainders upward: 2A

────────────────────────────
Result:  101010 (bin) = 2A (hex)

About Binary

Binary (base 2) is the foundational numeral system of all digital electronics, using only 0 and 1. Each position represents a power of 2: 2⁰=1, 2¹=2, 2²=4, 2³=8. Leibniz formalised it in 1679; Shannon applied Boolean logic to circuits in 1948. 8 bits = 1 byte (256 values) - the fundamental unit in every CPU from the 8080 to ARM Cortex-X. Every integer, float, character, pixel, and instruction in any digital device is ultimately binary. Conversion: decimal 42 = 32+8+2 = 2⁵+2³+2¹ = 101010₂.

About Hexadecimal

Hexadecimal (base 16) uses digits 0-9 and A-F (A=10, B=11, C=12, D=13, E=14, F=15). Each position is a power of 16: 16⁰=1, 16¹=16, 16²=256. Because 16 = 2⁴, each hex digit = exactly 4 bits (one nibble). Ubiquitous in computing: memory addresses (0x7FFF…), CSS colours (#FF5733), IPv6, SHA-256 hashes (64 hex digits = 256 bits), MAC addresses, UUID/GUIDs, and binary file magic numbers. The '0x' prefix originated in C (1972) and is standard in C++, Java, Python, JS, Rust, and Go. Conversion: decimal 42 = 2×16+10 = 2A₁₆.

Quick Reference Table

Binary (bin)Hexadecimal (hex)
11
102
1015
10008
1010A
1111F
1000010
1010102A
100000040
110010064
11111111FF

→ Full Number Base Converter