Home
Mode:
Enter a hexadecimal number (0-9, A-F).
Add
Enter a hexadecimal number (0-9, A-F).
Enter the number to convert.
The format of the input.
The format of the output.
Number of decimal places in results.
Display the step-by-step calculation.
Letter case for hexadecimal output.

What Is Hexadecimal?

Hexadecimal (or "hex") is a base-16 number system widely used in computing and digital electronics. It uses sixteen distinct symbols: the digits 0-9 to represent values zero to nine, and the letters A-F to represent values ten to fifteen. Hexadecimal is convenient because each hex digit corresponds to exactly four binary digits (bits), making it easy to represent binary data compactly.

Common uses of hexadecimal include:

  • Memory Addresses: Memory locations in computers are often displayed in hex.
  • Color Codes: Web colors use hex notation (e.g., #FF0000 for red).
  • Debugging: Memory dumps and error codes are often shown in hex.
  • Programming: Assembly language and low-level programming frequently use hex.

How the Hex Calculator Works

The calculator performs arithmetic operations on hexadecimal numbers using the following steps:

Step 1: Convert the hexadecimal inputs to decimal (base-10) numbers.

Step 2: Perform the arithmetic operation (add, subtract, multiply, or divide) on the decimal values.

Step 3: Convert the result back to hexadecimal format.

Step 4: Display the result in hex, decimal, and binary formats simultaneously.

For example, A5 + 1F:

  • A5 (hex) = 165 (decimal)
  • 1F (hex) = 31 (decimal)
  • 165 + 31 = 196 (decimal)
  • 196 (decimal) = C4 (hex)

Why Use This Hex Calculator?

  • Arithmetic Operations: Add, subtract, multiply, and divide hex numbers.
  • Multi-Format Conversion: See results in hex, decimal, and binary instantly.
  • Step-by-Step: Optional step-by-step calculation display for learning.
  • Free & Private: No registration, no data storage.
  • Mobile-Friendly: Works on any device.

Hexadecimal Conversion Reference

  • 0x0 = 0 โ€” Decimal 0, Binary 0000
  • 0x5 = 5 โ€” Decimal 5, Binary 0101
  • 0xA = 10 โ€” Decimal 10, Binary 1010
  • 0xF = 15 โ€” Decimal 15, Binary 1111
  • 0x10 = 16 โ€” Decimal 16, Binary 0001 0000
  • 0xFF = 255 โ€” Decimal 255, Binary 1111 1111

โ“ Hex Calculator FAQ

What is hexadecimal?

Hexadecimal is a base-16 number system using digits 0-9 and letters A-F to represent values. It's commonly used in computing because each hex digit represents exactly 4 binary digits (bits).

How do I convert hex to decimal?

Multiply each hex digit by 16 raised to its position (starting from 0 on the right). For example, A5 = 10ร—16ยน + 5ร—16โฐ = 160 + 5 = 165. This calculator does this automatically.

How do I convert decimal to hex?

Divide the decimal number by 16 repeatedly, noting the remainders. Read the remainders from bottom to top. For example, 196 รท 16 = 12 remainder 4, 12 รท 16 = 0 remainder 12 (C) โ†’ C4.

How do I convert hex to binary?

Replace each hex digit with its 4-bit binary equivalent. For example, A = 1010, 5 = 0101 โ†’ A5 = 1010 0101. This calculator shows the conversion instantly.

How do I add hex numbers?

Convert both numbers to decimal, add them, then convert back to hex. For example, A5 (165) + 1F (31) = C4 (196). This calculator handles all the steps for you.

What is the difference between hex and decimal?

Decimal is base-10 (uses 0-9). Hexadecimal is base-16 (uses 0-9 and A-F). Hex is more compact for representing binary data โ€” 2 hex digits = 1 byte.

What is the difference between hex and binary?

Binary is base-2 (uses only 0 and 1). Hexadecimal is base-16 (uses 0-9 and A-F). Hex is a more human-readable shorthand for binary โ€” each hex digit represents 4 binary digits.

What is the hex value of 255?

255 in decimal is FF in hexadecimal. This is the maximum value for a single byte (8 bits).

What is the decimal value of FF?

FF in hexadecimal equals 255 in decimal. F = 15, so FF = 15ร—16ยน + 15ร—16โฐ = 240 + 15 = 255.

What is the decimal value of 0x10?

0x10 in hexadecimal equals 16 in decimal. The "0x" prefix indicates a hex number. 0x10 = 1ร—16ยน + 0ร—16โฐ = 16.

What is the decimal value of 0xFF?

0xFF in hexadecimal equals 255 in decimal. FF = 15ร—16ยน + 15ร—16โฐ = 240 + 15 = 255.

What is the difference between 0x and 0h notation?

Both indicate hexadecimal numbers. 0x is more common in programming (C, C++, Python). 0h is sometimes used in assembly language. Both mean the same thing.

How do I validate a hex string?

A valid hex string contains only characters 0-9 and A-F (case insensitive). This calculator validates your input automatically and shows an error if you enter invalid characters.

What is the purpose of hexadecimal in computing?

Hexadecimal is used in computing because it's a compact representation of binary data. It's easier for humans to read and write than long binary strings, and it maps perfectly to 4-bit groups.

Can I use this calculator for negative hex numbers?

This calculator currently handles positive hex numbers. For negative numbers, consider using two's complement representation or a specialized signed hex calculator.

What is the hex value of 100?

100 in decimal is 64 in hexadecimal. 64 = 6ร—16ยน + 4ร—16โฐ = 96 + 4 = 100.

How do I convert binary to hex?

Group binary digits into sets of 4 from the right, then replace each group with its hex equivalent. For example, 1010 0101 = A5. This calculator handles the conversion for you.

What is the hex value of 1,000,000?

1,000,000 in decimal is F4240 in hexadecimal. This shows how hex can represent large numbers more compactly than decimal.