🔢 Binary & Hex Converter

Convert between decimal, binary, hex, and octal. Includes Unicode inspector, IP address converter, IEEE 754 float visualizer, bit-width selector, and signed/unsigned bitwise operations.

Enter a Number
Input Value
Quick Presets
ASCII
Unicode / ASCII Lookup
🔢

Enter Details

Enter a number in any base to see all conversions

About

Understanding Binary & Hex Converter

💻

What is a Binary & Hex Converter?

A Binary & Hex Converter is a tool that converts numbers between Binary (Base-2) and Hexadecimal (Base-16) formats. These numbering systems are widely used in computer programming, networking, digital electronics, memory addressing, and data representation.

Binary uses only 0s and 1s, while hexadecimal uses 0-9 and A-F to represent values more compactly.

📊

Number Systems Explained

  • Binary (Base-2) → Digits: 0, 1
  • Decimal (Base-10) → Digits: 0–9
  • Hexadecimal (Base-16) → Digits: 0–9, A–F
  • Octal (Base-8) → Digits: 0–7

Binary & Hex Conversion Tips

  • Every hexadecimal digit equals exactly 4 binary bits.
  • Group binary digits into sets of four when converting to hexadecimal.
  • Use hexadecimal for memory addresses, color codes, and machine-level programming.
  • Binary is commonly used in digital circuits and logic operations.
FAQ

Frequently Asked Questions

Common questions about binary, hex, and number base conversion

How do you convert decimal to binary?
Divide the decimal number by 2 repeatedly, recording the remainders. Read the remainders from bottom to top. Example: 42 ÷ 2 = 21 r0 → 21 ÷ 2 = 10 r1 → 10 ÷ 2 = 5 r0 → 5 ÷ 2 = 2 r1 → 2 ÷ 2 = 1 r0 → 1 ÷ 2 = 0 r1. Reading remainders upward: 101010 = 42 in decimal.
How do you convert binary to hexadecimal?
Group binary digits into sets of 4 from right to left (padding with zeros if needed), then convert each group to its hex digit: 0000=0, 0001=1, …, 1001=9, 1010=A, 1011=B, 1100=C, 1101=D, 1110=E, 1111=F. Example: 11001010 → 1100 1010 → C A = 0xCA = 202 decimal.
What are common hex colors in web design?
Hex colors use 6 hex digits: #RRGGBB. White = #FFFFFF (255,255,255), Black = #000000 (0,0,0), Red = #FF0000 (255,0,0), Green = #00FF00, Blue = #0000FF. Each pair represents intensity 0–255. Well-known UI colors developers encounter globally: #FF0000 (pure red), #1DA1F2 (Twitter/X blue), #25D366 (WhatsApp green), #0D9488 (NeftCal teal — R:13 G:148 B:136). The # prefix is CSS notation; the actual value is 3 bytes (24-bit color).
What is a bitwise AND / OR / XOR operation?
Bitwise operations work bit-by-bit: AND (A & B) — 1 only if both bits are 1. OR (A | B) — 1 if either bit is 1. XOR (A ^ B) — 1 if bits differ. NOT (~A) — flips all bits. Left shift (A << n) — multiplies by 2ⁿ. Right shift (A >> n) — divides by 2ⁿ. These operations are fundamental in low-level programming, cryptography, and networking (subnet masks). Toggle the Signed/Unsigned button above the results to see two's complement interpretation alongside raw bits.
What is two's complement and signed vs unsigned?
Two's complement is how computers represent negative integers. To negate a number: flip all bits, then add 1. Example: +5 in 8-bit = 00000101. Flip bits: 11111010. Add 1: 11111011 = -5. The most significant bit (leftmost) indicates sign: 0 = positive, 1 = negative. This is why NOT(5) shows as 4294967290 in unsigned 32-bit, but -6 in signed 32-bit. Use the Signed/Unsigned toggle in the bitwise results panel to switch between both interpretations.
What is IEEE 754 and why does 0.1 + 0.2 ≠ 0.3?
IEEE 754 is the international standard for floating-point arithmetic used in virtually all processors. A 32-bit float has: 1 sign bit, 8 exponent bits (biased by 127), 23 mantissa bits. A 64-bit double has: 1 sign bit, 11 exponent bits (biased by 1023), 52 mantissa bits. Most decimal fractions (0.1, 0.2, 1/3) cannot be represented exactly in binary, so they're stored as the nearest representable value. This is why 0.1 + 0.2 gives 0.30000000000000004 in every programming language — it's a binary representation artifact, not a bug.
How does the Unicode / ASCII lookup work?
Standard ASCII covers code points 0–127 (English letters, digits, symbols). Unicode extends this to over 1 million code points covering Devanagari (Hindi), Tamil, Telugu, Chinese/Japanese/Korean (CJK), Arabic, Hebrew, emoji, and more. The lookup shows: the Unicode code point in U+XXXX format, the UTF-8 encoding (1–4 bytes), and the UTF-16 encoding. For example, the Hindi letter 'अ' is U+0905, encoded as 3 UTF-8 bytes (0xE0 0xA4 0x85). Emoji like '😀' are U+1F600, encoded as 4 UTF-8 bytes.

Related Calculators

Explore other tech tools