Hex Calculator
Hex Calculator / /
The hexadecimal number system (hex) functions virtually identically to the decimal and binary systems. Instead of using a base of 10 or 2 respectively, it uses a base of 16. Hex uses 16 digits including 0-9, just as the decimal system does, but also uses the letters A, B, C, D, E, and F (equivalent to a, b, c, d, e, f) to represent the numbers 10-15. Every hex digit represents 4 binary digits, called nibbles, which makes representing large binary numbers simpler. For example, the binary value of 1010101010 can be represented as 2AA in hex. This helps computers to compress large binary values in a manner that can be easily converted between the two systems. Below are some typical conversions between hex, binary, and decimal values:
Hex/Decimal Conversion HexBinaryDecimal 000 111 2102 3113 41004 51015 61106 71117 810008 910019 A101010 B101111 C110012 D110113 E111014 F111115 141010020 3F11111163
Converting between decimal and hex involves understanding the place values of the different number systems. A more in-depth discussion is available on the . Note that converting between decimal and hex is quite similar to converting between decimal and binary. The ability to perform the conversion of either should make the other relatively simple. As previously mentioned, hex functions using the base of 16. This means that for the value 2AA, each place value represents a power of 16. Starting from the right, the first "A" represents the "ones" place, or 160. The second "A" from the right represents 161, and the 2 represents 162. Remember that "A" in hex is equivalent to 10 in decimal. Knowing this information, it is then possible to convert from hex to decimal, as shown below: EX:2AA = (2 × 162) + (A × 161) + (A × 160) = (2 × 256) + (10 × 16) + (10 × 1) = 512 + 160 + 10 = 682 Converting from decimal to hex is slightly more involved, but uses the same concepts. Refer to the steps and examples below. It is important to work through the example provided in conjunction with the listed steps in order to understand the process: Find the largest power of 16 that is less than or equal to the number to be converted, which will be referred to as X. Determine how many times the power of 16 found in Step 1 goes into X, and take note of that number. Multiply the number found in Step 2 by the power of 16 and subtract this value from X. This new value will be referred to as Y. Note that the number found in Step 2 will be the value written in the place value for the power of 16 that was found. If, for example, the largest power of 16 was found to be 164, and the number in Step 2 was found to be 3, the hex value would have the number 3 in its 164 place value: 3qrst, where qrst represents the 160 through 3 place values. Repeat Steps 1-3 using Y as the new starting value. Continue the process until 16 is larger than the remaining value, and assign the remainder to the 160 place value. Assign each of the values found in each iteration of Step 2 to its respective place value to determine the hex value. EX:Convert decimal 1500 to hex (1)Largest power = 162 = 256 (2)256 × 5 = 1280, so (5 × 162) (3)1500 - 1280 = 220 (4)16 × 13 = 208, so (13 × 161) (5)220 - 208 = 12 (6)16 is larger than 12, so 12 is the value in the 160 place value (7)1500 = (5 × 162) + (13 × 161) + (12 × 160) (8)Remember that 10-15 have letter numerals In hex: 13 = D, and 12 = C (9)Therefore the hex value of 1500 is: 5DC Converting from hex to decimal utilizes the same principles, but is arguably simpler. Multiply each digit in the hex value by its corresponding place value, and find the sum of each result. The process is the same regardless of whether the hex value contains letter numerals or not. EX:Convert hex 1024 to decimal (1)(1 × 163) + (0 × 162) + (2 × 161) + (4 × 160) (2)4096 + 0 + 32 + 4 = 4132
Hex Calculator
Hexadecimal Calculation-Add Subtract Multiply or Divide
Convert Hexadecimal Value to Decimal Value
Hexadecimal Value:Convert Decimal Value to Hexadecimal Value
Decimal Value:The hexadecimal number system (hex) functions virtually identically to the decimal and binary systems. Instead of using a base of 10 or 2 respectively, it uses a base of 16. Hex uses 16 digits including 0-9, just as the decimal system does, but also uses the letters A, B, C, D, E, and F (equivalent to a, b, c, d, e, f) to represent the numbers 10-15. Every hex digit represents 4 binary digits, called nibbles, which makes representing large binary numbers simpler. For example, the binary value of 1010101010 can be represented as 2AA in hex. This helps computers to compress large binary values in a manner that can be easily converted between the two systems. Below are some typical conversions between hex, binary, and decimal values:
Hex/Decimal Conversion HexBinaryDecimal 000 111 2102 3113 41004 51015 61106 71117 810008 910019 A101010 B101111 C110012 D110113 E111014 F111115 141010020 3F11111163
Converting between decimal and hex involves understanding the place values of the different number systems. A more in-depth discussion is available on the . Note that converting between decimal and hex is quite similar to converting between decimal and binary. The ability to perform the conversion of either should make the other relatively simple. As previously mentioned, hex functions using the base of 16. This means that for the value 2AA, each place value represents a power of 16. Starting from the right, the first "A" represents the "ones" place, or 160. The second "A" from the right represents 161, and the 2 represents 162. Remember that "A" in hex is equivalent to 10 in decimal. Knowing this information, it is then possible to convert from hex to decimal, as shown below: EX:2AA = (2 × 162) + (A × 161) + (A × 160) = (2 × 256) + (10 × 16) + (10 × 1) = 512 + 160 + 10 = 682 Converting from decimal to hex is slightly more involved, but uses the same concepts. Refer to the steps and examples below. It is important to work through the example provided in conjunction with the listed steps in order to understand the process: Find the largest power of 16 that is less than or equal to the number to be converted, which will be referred to as X. Determine how many times the power of 16 found in Step 1 goes into X, and take note of that number. Multiply the number found in Step 2 by the power of 16 and subtract this value from X. This new value will be referred to as Y. Note that the number found in Step 2 will be the value written in the place value for the power of 16 that was found. If, for example, the largest power of 16 was found to be 164, and the number in Step 2 was found to be 3, the hex value would have the number 3 in its 164 place value: 3qrst, where qrst represents the 160 through 3 place values. Repeat Steps 1-3 using Y as the new starting value. Continue the process until 16 is larger than the remaining value, and assign the remainder to the 160 place value. Assign each of the values found in each iteration of Step 2 to its respective place value to determine the hex value. EX:Convert decimal 1500 to hex (1)Largest power = 162 = 256 (2)256 × 5 = 1280, so (5 × 162) (3)1500 - 1280 = 220 (4)16 × 13 = 208, so (13 × 161) (5)220 - 208 = 12 (6)16 is larger than 12, so 12 is the value in the 160 place value (7)1500 = (5 × 162) + (13 × 161) + (12 × 160) (8)Remember that 10-15 have letter numerals In hex: 13 = D, and 12 = C (9)Therefore the hex value of 1500 is: 5DC Converting from hex to decimal utilizes the same principles, but is arguably simpler. Multiply each digit in the hex value by its corresponding place value, and find the sum of each result. The process is the same regardless of whether the hex value contains letter numerals or not. EX:Convert hex 1024 to decimal (1)(1 × 163) + (0 × 162) + (2 × 161) + (4 × 160) (2)4096 + 0 + 32 + 4 = 4132