Hexadecimal z to Decimal: Value & Conversion
The calculator for this page is switched off while it is checked. The formula is below, and the worked example in the article shows how to use it by hand.
This calculator converts a hexadecimal digit (0-9, A-F) or a full hexadecimal number into its decimal equivalent. You enter the hexadecimal value, and the calculator returns the corresponding base-10 number. The letter “z” is not a valid hexadecimal digit; hexadecimal uses only 0-9 and A-F.
Formula
The conversion uses the positional notation of base 16. Each digit in a hexadecimal number represents a power of 16, starting from the rightmost digit (the least significant) which is 160.
For a hexadecimal number with digits dn-1 … d1 d0, the decimal value is:
Decimal = dn-1 × 16n-1 + … + d1 × 161 + d0 × 160
Where each digit di is a value from 0 to 15 (A=10, B=11, C=12, D=13, E=14, F=15).
Worked Example
Using the default value 1A from the calculator:
- Split the digits: 1 and A.
- Convert A to its decimal value: 10.
- Apply the formula: (1 × 161) + (10 × 160) = 16 + 10 = 26.
- Result: 1A in hexadecimal equals 26 in decimal.
The calculator’s formula (16*1 + 1*10) gives 26, matching the step-by-step result.
Why Hexadecimal Uses Only 0-9 and A-F
Hexadecimal (base 16) needs 16 distinct symbols. The digits 0-9 cover the first ten values (0-9). For the remaining six values (10-15), the letters A through F are used. The letter “z” is not part of this system, just as “G” or “2” are not. If you see a “z” in a hexadecimal context, it is likely a typo or a placeholder in a programming example, not an actual digit.
How to Convert a Full Hexadecimal Number
For numbers longer than one digit, the same positional method applies. For example, convert 3F:
- F = 15
- (3 × 161) + (15 × 160) = 48 + 15 = 63
For a three-digit number like 2B7:
- B = 11
- (2 × 256) + (11 × 16) + 7 = 512 + 176 + 7 = 695
Each additional digit multiplies the previous power of 16 by 16.
Common Mistakes and Misconceptions
A frequent error is confusing hexadecimal letters with ordinary letters. “A” is not the same as the letter A in a word; it represents the number 10. Another mistake is mixing up the order of digits. The rightmost digit is always the least significant (160), and moving left increases the exponent by 1. Also, some people try to convert “z” or other letters beyond F; those are invalid. If you encounter a string like “1z”, it is not a valid hexadecimal number.
Why Convert Hexadecimal to Decimal?
Hexadecimal is used in computing because it maps neatly to binary (each hex digit equals 4 bits). Programmers use it for memory addresses, color codes, and machine-level instructions. Converting to decimal helps humans understand the numeric value in a familiar base. For example, the color code #FFFFFF (white) converts to decimal 16777215, which is the maximum 24-bit color value. Understanding the conversion allows you to interpret these codes without a calculator.
Limits of the Formula
The formula works for any length of hexadecimal input, but very large numbers can produce huge decimal values that may be difficult to read. For instance, a 16-digit hex number can exceed 18 quintillion (1019). The calculator handles these, but for practical purposes, you may want to use a programming language or a scientific calculator for extremely large values. Also, the formula assumes a valid hexadecimal string; it does not account for signs or decimal points.
Frequently Asked Questions
Is “z” a valid hexadecimal digit?
No. Hexadecimal digits are 0-9 and A-F only. “Z” is not defined in any standard hexadecimal system. If you see it, it is likely an error or a placeholder.
How do I convert a hex number like “FF” to decimal?
F = 15, so (15 × 16) + 15 = 255. In general, multiply each digit by 16 raised to its position power and sum the results.
What is the decimal value of “10” in hex?
It is 16. The left digit is 1 × 161 = 16, and the right digit is 0 × 160 = 0.
Can I convert negative hexadecimal numbers?
The standard positional formula works for non-negative integers. Negative numbers are typically represented using two’s complement in computing, which requires a different conversion method.
Why does the letter ‘A’ equal 10 and not 1?
Because hexadecimal needs 16 symbols. After 0-9, the next six values are represented by A=10, B=11, C=12, D=13, E=14, and F=15. This is a convention that allows a single character to represent a value greater than 9.
Related
Formula used
in hex | Hexadecimal value | - | 1A | 0 out dec | Decimal value | - | 16*1 + 1*10 | 0
Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.