Skip to main content
Hex Calculator

Hex Calculator

Perform hex arithmetic and convert between hexadecimal, decimal, binary, and octal.

Enter Your Values
Results

Fill in your values above and click Calculate.

Convert between binary, octal, decimal and hexadecimal using hexadecimal arithmetic.

Hex Calculator — CalculatorzKit

Hex Calculator – What is it?

The Hex Calculator allows you to convert between binary, decimal and hexadecimal systems, as well as perform hexadecimal multiplication and division. The hexadecimal system, which uses a 16-base, is essential for computer science, digital systems representation, and network addressing.

This tool is completely run in your browser. Data privacy is ensured by processing your inputs locally on your device. This app works with our binary calculator, and number system converter for a complete workflow.

What is Hexadecimal Number System (HN)?

Hexadecimal is identical to binary and decimal systems (bases 10 and 2), but it has a base 16 instead. The hexadecimal system uses sixteen characters, the digits 0-9 for values zero to nine and the letters A, B, C D E and F, case-insensitive, to represent the values ten to fifteen.

Hexadecimal is a human-readable, compact shorthand of binary data in computing. Each hexadecimal digit is a four-digit binary code (also known as a bit, or half-byte). The binary sequence 1010101010, for example, is simply represented as 2AA. This allows large binary addresses to be compressed.

Hexadecimal and Binary Equivalents

Hexadecimal is a base 16 system. Binary (Base 2) Decimal (Base 10).
0 0 0
1 1 1
2 10 2
3 11 3
4 100 4
5 101 5
6 110 6
7 111 7
8 1000 8
9 1001 9
You can also find out more about the A-Team here. 1010 10
B. 1011 11
C 1100 12
You can also find out more about the D 1101 13
You can also read about how to get in touch with us. 1110 14
You can also find out more about F 1111 15
14 10100 20
3F 111111 63

Converting between Hexadecimal Decimal

Understanding system place values is essential to conversion. Each digit represents a power 16 starting at the rightmost position.

Conversion from Hexadecimal Decimal

Add the sum of each hexadecimal digit and its place value ($16n$). Remember that the decimal equivalents for letters A-F are 10-15.


Example: Convert Hexadecimal 2AA to Decimal

Place values are applied starting with the rightmost number:

$2\textAA = (2 \times 16^2) + (\textA \times 16^1) + (\textA \times 16^0)$ $2\textAA = (2 \times 256) + (10 \times 16) + (10 \times 1)$

$2\textAA = 512 + 160 + 10 = 682$

The hex value 882 is the decimal equivalent of 2AA .

Convert Decimal to Hexadecimal

Divide the decimal number by 16, and then record the remainders in reverse. Follow these steps:

  1. Find the highest power of 16 less than or equal the decimal (let’s say $X$).
  2. Divide $X$ with the power of 16 and you will get the total quotient. This quotient represents a digit in that position.
  3. Multiplying the quotient to the power 16 and subtracting it from $X$ will give you the remainder, $Y$.
  4. Continue the process, but now start with $Y$. Move down to the next power of 16, and repeat the process. Continue until the divisor exceeds the remainder, which will place the final value in the $160$ bracket.
  5. The letters A to F correspond to the remainders between 10 and 15.

Example: Convert Decimal 1500 into Hex

Applying sequential division

  • The highest power of 16 is $162 which equals 256$.
  • The remainder is $220$. Record 5 at the $162$ place.
  • The next lower number is 161 = 16.
  • The remainder is $12$. Record 13 or D in the $161$ place.
  • Place the C or 12 in the $160$ place.
$1500 = (5 \times 16^2) + (13 \times 16^1) + (12 \times 16^0)$

$1500 = (5 \times 16^2) + (\textD \times 16^1) + (\textC \times 16^0)$

The decimal value 1540 is converted to 5DC when expressed in hex.

How to perform Hexadecimal Arithmetic

Hexadecimal arithmetic is based on the same principles as decimal math with some adjustments to accommodate the base-16 system.

1. Hexadecimal Addition

Add columns in decimal. Divide the sum of a column by 16 and add the remainder to the column.

1 8 1A (Carried Values)

8 A B

+ B 7

—————–

= 1 4 2 3


Step-by-Step Breakdown:

  1. Right Column: $19 / 16 = 1$ with a remainder of $3$. Convert to Hex: $19/16 = 1$, with a remaining $3$. (Write 3 and carry 1.
  2. Middle Column: $1text(carry)+ textA+ 7 = 1 +10 +7 = 18_10$. Convert to hex. $18/16 = 1$, with a $2$ remainder. (Write 2 and carry 1).
  3. Left Column: $1text(carry)+ 8 + textB= 1 + 8 +11 = 20_10$. Convert $20 to hex. 20 / 16 = $1 with a $4$ remainder. (Write 4 and carry 1).
  4. Final sum: 1423 in hex.

2. Hexadecimal Subtraction

The same rules apply to subtraction as for decimal borrowing, except that the borrowing of “1” from a column adjacent transfers 16 instead of 10.

5 D 1C

5 D C

– 3 F

—————–

The answer is 2 2 D


Step-by-Step Breakdown:

  1. Right Column: 12-15 = $textC-textF. Because 12 is less than 15, you can borrow 1 from the column below. This will reduce $textD$ into $textC$, and add 16 to the right-hand column.
  2. New calculation: $16 + 12 – 15 = 13_10 = \textD$ in hex. Write down D.
  3. Middle Column: $textC-textA= 12 – 10= 2$. (Write 1).
  4. Right Column: $5 – 3 = $2. Write down and.
  5. Final Difference: 22D In hex.

3. Hexadecimal multiplication

Hex multiplication is the process of multiplying decimal values, converting them to hex and carrying any 16-groups over, then adding the partial products.

F A (FA Hex)

x C 3

—————–

2 E E

+ B B 8 (FA * C0).

—————–

BE6E (hexadecimal code: B E 6 E)

4. Hexadecimal division

The long division in hex is the same as decimal division. All intermediate multiplications and subtractions are performed in base-16.

D E F

—————–

F A C E

E A (12*D = EA).

——-

1 0 C

F C (12*E = FC)

——-

1 0 E (10C = FC 10; bringing down E)

12 * F = 10E

——-

0 (Remainder)

Hexadecimal Multiplication Table

This table will help you find the products of hexadecimal values (values from 1 to 10 hex).

x 1 2 3 4 5 6 7 8 9 You can also find out more about the A-Team here. B. C You can also find out more about the D You can also read about how to get in touch with us. You can also find out more about F 10
1 1 2 3 4 5 6 7 8 9 You can also find out more about the A-Team here. B. C You can also find out more about the D You can also read about how to get in touch with us. You can also find out more about F 10
2 2 4 6 8 You can also find out more about the A-Team here. C You can also read about how to get in touch with us. 10 12 14 16 18 1A 1C 1E 20
3 3 6 9 C You can also find out more about F 12 15 18 1B 1E 21 24 27 2A 2D 30
4 4 8 C 10 14 18 1C 20 24 28 2C 30 34 38 3C 40
5 5 You can also find out more about the A-Team here. You can also find out more about F 14 19 1E 23 28 2D 32 37 3C 41 46 4B 50
6 6 C 12 18 1E 24 2A 30 36 3C 42 48 4E 54 5A 60
7 7 You can also read about how to get in touch with us. 15 1C 23 2A 31 38 3F 46 4D 54 5B 62 69 70
8 8 10 18 20 28 30 38 40 48 50 58 60 68 70 78 80
9 9 12 1B 24 2D 36 3F 48 51 5A 63 6C 75 7E 87 90
You can also find out more about the A-Team here. You can also find out more about the A-Team here. 14 1E 28 32 3C 46 50 5A 64 6E 78 82 8C 96 A0
B. B. 16 21 2C 37 42 4D 58 63 6E 79 84 8F 9A A5 B0
C C 18 24 30 3C 48 54 60 6C 78 84 90 9C A8 B4 C0
You can also find out more about the D You can also find out more about the D 1A 27 34 41 4E 5B 68 75 82 8F 9C A9 B6 C3 D0
You can also read about how to get in touch with us. You can also read about how to get in touch with us. 1C 2A 38 46 54 62 70 7E 8C 9A A8 B6 C4 D2 E0
You can also find out more about F You can also find out more about F 1E 2D 3C 4B 5A 69 78 87 96 A5 B4 C3 D2 E1 F0
10 10 20 30 40 50 60 70 80 90 A0 B0 C0 D0 E0 F0 100

Hexadecimal Tips for Beginners

  • Each hex value represents a 16-bit power ($160=1$, 161=16$, 162=256$, 163=4096$).
  • If you want to quickly convert binary to hex by grouping your binary digits in four-digit sets (nibbles), from left to right, convert each set into its corresponding hex number.
  • Use the Number Systems Converter for a seamless translation of values between Binary, Octal Decimal and Hexadecimal.

Hex Calculations: Frequently Asked Questions

Why does hexadecimal exist in computer science and why is it used?

Hexadecimal has been used to represent binary data because it is a human-readable format. Because $16 = $24$, one hexadecimal character represents exactly four binary characters (a nibble). It allows developers to create long binary strings, such as MAC addresses and color codes.

How does borrowing in hexa subtraction work?

The process of borrowing in hex is the same as subtracting decimals, except that borrowing “1” (from the column to the left) adds $16_10$ ($rather than the $10_10$ you would have received) to the column currently active. This is because your column represents 160$ multiplied by $161$.

What does the hexadecimal code A-F represent?

The base-10 system of numbers only allows for nine values, so letters are used as a way to represent the higher single-digit number: A = 10, C = 12, D = 13 and F = 14.