Binary to Hexadecimal Converter

developer · number system

Convert Binary to Hexadecimal with a fixed input and output format, step-by-step formulas under the result, and reference tables. Parsing matches the main hub (0b, 0x, leading 0 for octal; one optional . for fractional digits on numeric bases; single character for character mode).

Calculator

From: Binary

To: Hexadecimal

Formulas

Enter a value → place-value expansion + division chain.

About Binary

Binary (base 2) uses digits 0 and 1. This tool accepts an optional 0b prefix. You may use one radix point; digits after it use negative powers of two (½, ¼, …). It is the native representation for digital logic and bitwise operations.

About Hexadecimal

Hexadecimal (base 16) uses 0–9 and A–F. This tool accepts an optional 0x prefix. One radix point is allowed; fractional digits use 16⁻¹, 16⁻², …. Each hex digit covers four bits, so it is compact for memory addresses, colors, and byte dumps.

How to convert binary to hexadecimal

Three steps: symbols → the right math move for this pair → worked examples you can copy on paper. Numeric bases (binary, octal, decimal, hex) also support one radix point and digits after it; character mode stays a single code unit.

Step 1 — Identify the symbols

Input (Binary): Each position is either 0 or 1.

Output (Hexadecimal): Digits 0–9 plus letters A–F for values ten through fifteen.

Hex conversions use this letter-to-number map:

Hex digit → value (for place weights)
DigitValueDigitValue
0088
1199
22A10
33B11
44C12
55D13
66E14
77F15
Dev note
  • Many tools allow a 0b prefix (e.g. 0b1010).
  • 0x is a common prefix (e.g. 0xFF).

Step 2 — The Two-Step Method (via Decimal)

First express the left format as a decimal value (one optional . for a fractional part is allowed on numeric bases), then rewrite that value in the right format. The calculator automates both steps.

Part A — Into decimal

Number positions from the right, starting at 0. At each position, multiply that digit by 2 raised to the position index, then add every term. The total is your decimal number.

Digits after the dot: use negative powers of 2 (2−1, 2−2, …). Each place is still (digit × weight); add the fractional side to the whole side.

Part B — Out of decimal

Repeated division by 16: each remainder is one hex digit; values 10– 15 become A–F. Read remainders from last step to first.

Fractional decimal values: convert the whole part with repeated division, then multiply the fractional part by the target base over and over; each integer you get is the next digit after the radix point (same idea the calculator shows in Formulas).

Step 3 — Worked examples

Two practice values in Binary, converted to Hexadecimal using the same rules as Step 2. Example 3 uses a fractional part (digits after the radix point); the hub and pair calculators accept a single . on binary, octal, decimal, and hex inputs.

Example 1

"1010" (Binary) → Hexadecimal.

Toward decimal

Binary "1010"
= 1×2³ + 0×2² + 1×2¹ + 0×2⁰
= 8 + 2
= 10  (decimal)

From decimal to output

Whole part — repeated division:
10 ÷ 16 = 0  R 10 (A)

Read remainders bottom → top → A

→ tool: 0xa

Verify: "1010"0xa

Example 2

"1111" (Binary) → Hexadecimal.

Toward decimal

Binary "1111"
= 1×2³ + 1×2² + 1×2¹ + 1×2⁰
= 8 + 4 + 2 + 1
= 15  (decimal)

From decimal to output

Whole part — repeated division:
15 ÷ 16 = 0  R 15 (F)

Read remainders bottom → top → F

→ tool: 0xf

Verify: "1111"0xf

Example 3

"1010.101" (Binary) → Hexadecimal.

Toward decimal

Binary "1010.101"
Left of . : 1×2³ + 0×2² + 1×2¹ + 0×2⁰ = 10
Right of .: 1×2^-1 + 0×2^-2 + 1×2^-3 = 0.5 + 0.125
= 10.625  (decimal)

From decimal to output

Whole part — repeated division:
10 ÷ 16 = 0  R 10 (A)

Read remainders bottom → top → A

Fractional part — multiply by 16, integer of each product = next digit after .
  0.625×16 = 10  →  A
Digits after . (in order): .A

→ tool: 0xa.a

Verify: "1010.101"0xa.a

Summary

To convert Binary to Hexadecimal, the tool first parses your input strictly as binary, producing a decimal value. For binary, octal, decimal, and hex, you may include one radix point and fractional digits; character input remains a single code unit with no dot. That value is formatted as hexadecimal using the same rules as the main Number System Converter (prefixes 0b, 0, 0x where applicable; character output uses symbolic names for common controls and requires a whole-number code point). Long fractional expansions are truncated to a fixed digit cap; ordinary floating-point rounding may appear in extreme cases.

Relationship context

Binary, Hexadecimal, and the other numeric bases on this site all describe the same numeric value; only the radix changes (including optional fractional digits after one dot). Moving between them is equivalent to changing how the value is written, not to scaling or unit conversion. Binary, octal, and hex align with bit boundaries (powers of two), while decimal is optimized for human arithmetic.

Conversion tables

Binary (input)Hexadecimal (output)
00
0b10x1
0b100x2
0b110x3
0b1000x4
0b1010x5
0b1100x6
0b1110x7
0b10000x8
0b10010x9
0b10100xa
0b11110xf
0b100000x10
Binary (input)Hexadecimal (output)
0b10110xb
0b1000000x20
0b10000000x40
0b100000000x80
0b1000000000x100
0b10000000000x200
0b100000000000x400
0b1000000000000x800
0b10000000000000x1000
0b100000000000000x2000
0b1000000000000000x4000
0b10000000000000000x8000
0b11111111111111110xffff

More number system pairs

Other fixed input/output converters use the same parsing rules as the hub. Open any pair for the same calculator layout and reference tables.