Home Conversion Number Hex to Decimal

Hex to Decimal Converter

To use hexadecimal to decimal converter, type any hex value e.g. "6C" and click on the Convert button and you will get the decimal value of "108" on right side. You can convert any value upto the range of 7FFFFFFFFFFFFFFF which is 16 hex characters.

Hex to Decimal Conversion:

Decimal = 108

Hexadecimal Numeral System (Hex Numbers)

Hexadecimal or hex numbers are a number system based on base 16, meaning they use 16 unique symbols to represent values. These symbols are:

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F

Where:

Example:

Every hex digit represents a power of 16, let's consider a hex value "3B89.1E"

Digit Position Power of 16 Value
3 163 (4096's place) 163 = 4096 3 × 4096 = 12288
B (11) 162 (256's place) 162 = 256 11 × 256 = 2816
8 161 (16's place) 161 = 16 8 × 16 = 128
9 160 (1's place) 160 = 1 9 × 1 = 9
1 16-1 (1/16's place) 16-1 = 1/16 = 0.0625 1 × 0.0625 = 0.0625
E (14) 16-2 (1/256's place) 16-2 = 1/256 = 0.00390625 14 × 0.00390625 = 0.0546875

Decimal Result: 12288 + 2816 + 128 + 9 + 0.0625 + 0.0546875 = 15241.1171875

(3B89.1E)16 = (15241.1171875)10

Decimal Numeral System

A decimal number is any number represented using the digits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 in the base-10 positional system. Each position (or place) in the number has a value based on a power of 10. The decimal point (.) separates the whole number part from the fractional part.

Example:

Decimal value "1987.654" can be expressed as power of 10:

Digit Position Power of 10 Value
1 103 (Thousands place) 103 = 1000 1 × 1000 = 1000
9 102 (Hundreds place) 102 = 100 9 × 100 = 900
8 101 (Tens place) 101 = 10 8 × 10 = 80
7 100 (Ones place) 100 = 1 7 × 1 = 7
6 10-1 (Tenths place) 10-1 = 0.1 6 × 0.1 = 0.6
5 10-2 (Hundredths place) 10-2 = 0.01 5 × 0.01 = 0.05
4 10-3 (Thousandths place) 10-3 = 0.001 4 × 0.001 = 0.004

Total = (1 × 103) + (9 × 102) + (8 × 101) + (7 × 100) + (6 × 10-1) + (5 × 10-2) + (4 × 10-3) = 1000 + 900 + 80 + 7 + 0.6 + 0.05 + 0.004 = 1987.654

How to Convert Hex to Decimal

Hexadecimal numbers are the base-16 numbers and every hex digit can be represented as powers to the base-16. For example, every digit of the hex number "6AF" represent the power to the base-16.

Considering the above scenario any hex value can be converted to decimal by using three steps below. Hex digits (0 to F) represents the decimal values from (0 to 15).

How to Convert Fractional Hex to Decimal

Follow the following steps to convert the fractional hex value to decimal:

Hex to Decimal Examples

Example 1: Convert the hex number "6AF" to the decimal value.

  • Convert hex digits to decimals.
  • Nibble-1 Nibble-2 Nibble-3
    6 A F
    6 10 15
  • Multiply every decimal value to the corresponding power of 16.
  • Position: 162 161 160
    256 16 1
    Multiply: 256 × 6 16 × 10 1 × 15
    = 1536 = 160 = 15
  • Sum all the products to get the final decimal value:
  • (6AF)16 = (1536 + 160 + 15) = (1711)10
  • Example 2: Convert the hex number "7D5E" to the decimal value.

  • Convert hex digits to decimals.
  • Nibble-1 Nibble-2 Nibble-3 Nibble-4
    7 D 5 E
    7 13 5 14
  • Multiply every decimal value by the corresponding power of 16.
  • 163 162 161 160
    4096 256 16 1
     
    7 × 4096 13 × 256 5 × 16 14 × 1
    = 28672 = 3328 = 80 = 14
  • Final decimal value is:
  • (7D5E)16 = 28672 + 3328 + 80 + 14 = (32094)10
  • Example 3: Convert the hex number "6E4D.C1" to the decimal value.

  • Convert hex digits to decimals.
  • Nibble-1 Nibble-2 Nibble-3 Nibble-4 Nibble-5 Nibble-6
    6 E 4 D C 1
    6 14 4 13 12 1
  • Multiply decimal values by the corresponding power of 16.
  • 163 162 161 160 16-1 16-2
    4096 256 16 1 1/16 1/256
     
    6 × 4096 14 × 256 4 × 16 13 × 1 12 × 1/16 1 × 1/256
    = 24576 = 3584 = 64 = 13 = 0.75 = 0.00390625
  • Final decimal value is:
  • (6E4D.C1)16 = 24576 + 3584 + 64 + 13 + 0.75 + 0.00390625 = (28237.75390625)10
  • Example 4: Convert the hex number "9AB4.EF" to the decimal value.

  • Convert hex digits to decimals.
  • Nibble-1 Nibble-2 Nibble-3 Nibble-4 Nibble-5 Nibble-6
    9 A B 4 E F
    9 10 11 4 14 15
  • Multiply decimal values by the corresponding power of 16.
  • 163 162 161 160 16-1 16-2
    4096 256 16 1 1/16 1/256
     
    9 × 4096 10 × 256 11 × 16 4 × 1 14 × 1/16 15 × 1/256
    = 36864 = 2560 = 176 = 4 = 0.875 = 0.05859375
  • Final decimal value is:
  • (9AB4.EF)16 = 36864 + 2560 + 176 + 4 + 0.875 + 0.05859375 = (39604.93359375)10
  • Frequently Ask Questions: Hex to Decimal Conversion

    Q1: Convert hex value 0xFF9A to decimal assuming 16-bit 2’s complement?

    0x notation is used to represent hexadecimal numbers.

    Since F = 1111, 9 = 1001, A = 1010, (FF9A)16 = (1111111110011010)2

    As MSB = 1, it is a negative number, take 2's complement:

    Invert bits: 0000000001100101

    As value is negative, final decimal value = -102

    Q2: What is the result in decimal for the XOR of hex numbers 0x7F and 0xC3?

    (7F)16 = (01111111)2 and (C3)16 = (11000011)2

    When we perform XOR operation we check that whether two bits are different or same. If they are different then result is 1 and if they are same then the result is 0.

    Bitwise XOR operation:

                                   X = 01111111

                                   Y = 11000011

    -------------------------------------

    X ⊕ Y (Bitwise XOR) = 10111100

    1011 = B in hex and 1100 = C, Therefore, (10111100)2 = (BC)16

    Since B = 11 in decimal and C is 12 in decimal, therefore Decimal value = (11 × 161) + (12 × 160) = 176 + 12 = (188)10

    Q3: Conver the hex value 0x1A.8 to decimal with fractional part?

    1A = (1 × 161) + (10 × 160) = (16 + 10) = 26

    0.8 = (8 × 16-1) = 8/16 = 1/2 = 0.5

    Therefore (1A.8)16 = (26.5)10

    Q4: Add two hex numbers 0xA8 and 0x3D and provide the result in decimal?

    Convert the hex numbers to decimal, (A8)16 = (168)10 and (3D)16 = (61)10

    Final decimal value is 168 + 61 = 229

    Q5: Mask the hex value 0xA with 0xF, right shift by 2 and convert the result to decimal?

    By masking we mean bitwise AND operation, therefore masking result = 0xA & 0xF = 1010 & 1111 = 1010

    While doing the right shift, 0s are padded on the left side: 1010 >> 2 = (0010)2 = (2)10

    Final decimal value = 2

    Q6: Convert unsigned hex number 0xABCDEF to decimal?

    Since (A)16 = (10)10, (B)16 = (11)10, (C)16 = (12)10, (D)16 = (13)10, (E)16 = (14)10 and (F)16 = (15)10, Therefore:

    (ABCDEF)16 = (10 × 165) + (11 × 164) + (12 × 163) + (13 × 162) + (14 × 161) + (15 × 160)

    (ABCDEF)16 = (10 × 1048576) + (11 × 65536) + (12 × 4096) + (13 × 256) + (14 × 16) + (15 × 1)

    (ABCDEF)16 = (10485760) + (720896) + (49152) + (3328) + (224) + (15)

    (ABCDEF)16 = (11259375)10

    Hex to Decimal Conversion Table

    HexadecimalDecimal
    11
    22
    33
    44
    55
    66
    77
    88
    99
    A10
    B11
    C12
    D13
    E14
    F15
    1016
    1117
    1218
    1319
    1420
    1521
    1622
    1723
    1824
    1925
    1A26
    1B27
    1C28
    1D29
    1E30
    1F31
    2032
    2133
    2234
    2335
    2436
    2537
    2638
    2739
    2840
    2941
    2A42
    2B43
    2C44
    2D45
    2E46
    2F47
    3048
    3149
    3250
    3351
    3452
    3553
    3654
    3755
    3856
    3957
    3A58
    3B59
    3C60
    3D61
    3E62
    3F63
    4064
    HexadecimalDecimal
    4165
    4266
    4367
    4468
    4569
    4670
    4771
    4872
    4973
    4A74
    4B75
    4C76
    4D77
    4E78
    4F79
    5080
    5181
    5282
    5383
    5484
    5585
    5686
    5787
    5888
    5989
    5A90
    5B91
    5C92
    5D93
    5E94
    5F95
    6096
    6197
    6298
    6399
    64100
    65101
    66102
    67103
    68104
    69105
    6A106
    6B107
    6C108
    6D109
    6E110
    6F111
    70112
    71113
    72114
    73115
    74116
    75117
    76118
    77119
    78120
    79121
    7A122
    7B123
    7C124
    7D125
    7E126
    7F127
    80128
    HexadecimalDecimal
    81129
    82130
    83131
    84132
    85133
    86134
    87135
    88136
    89137
    8A138
    8B139
    8C140
    8D141
    8E142
    8F143
    90144
    91145
    92146
    93147
    94148
    95149
    96150
    97151
    98152
    99153
    9A154
    9B155
    9C156
    9D157
    9E158
    9F159
    A0160
    A1161
    A2162
    A3163
    A4164
    A5165
    A6166
    A7167
    A8168
    A9169
    AA170
    AB171
    AC172
    AD173
    AE174
    AF175
    B0176
    B1177
    B2178
    B3179
    B4180
    B5181
    B6182
    B7183
    B8184
    B9185
    BA186
    BB187
    BC188
    BD189
    BE190
    BF191
    C0192
    HexadecimalDecimal
    C1193
    C2194
    C3195
    C4196
    C5197
    C6198
    C7199
    C8200
    C9201
    CA202
    CB203
    CC204
    CD205
    CE206
    CF207
    D0208
    D1209
    D2210
    D3211
    D4212
    D5213
    D6214
    D7215
    D8216
    D9217
    DA218
    DB219
    DC220
    DD221
    DE222
    DF223
    E0224
    E1225
    E2226
    E3227
    E4228
    E5229
    E6230
    E7231
    E8232
    E9233
    EA234
    EB235
    EC236
    ED237
    EE238
    EF239
    F0240
    F1241
    F2242
    F3243
    F4244
    F5245
    F6246
    F7247
    F8248
    F9249
    FA250
    FB251
    FC252
    FD253
    FE254
    FF255

    by Wasim Khan and it was last modified on

    Related Conversions

    Please find the related numeric conversions.