Home Conversion Number Hex to Octal

Hex to Octal Converter

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

Hex to Octal Conversion:

Octal = 173

Hexadecimal Numeral System (Hex Numbers)

Hexadecimal numbers (often called hex numbers) are a base-16 number system used in mathematics and computer science. Unlike the decimal system (base-10), which uses 10 digits (0–9), hexadecimal uses 16 symbols:

Digits in hexadecimal:

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

The symbols A, B, C, D, E, F represent decimal values 10, 11, 12, 13, 14, and 15 respectively. Once F is reached, the next number continues like decimal but in base 16: 10hex = 16decimal and 11hex = 17decimal and so on.

Example:

Every hex digit position represents a power of 16, hex value "A79D.F5" can be broken down as powers to the base 16:

Digit Position Power of 16 Value
A (10) 163 (4096's place) 163 = 4096 10 × 4096 = 40960
7 162 (256's place) 162 = 256 7 × 256 = 1792
9 161 (16's place) 161 = 16 9 × 16 = 144
D (13) 160 (1's place) 160 = 1 13 × 1 = 13
F (15) 16-1 (1/16's place) 16-1 = 1/16 = 0.0625 15 × 0.0625 = 0.9375
5 16-2 (1/256's place) 16-2 = 1/256 = 0.00390625 5 × 0.00390625 = 0.01953125

Decimal Result: 40960 + 1792 + 144 + 13 + 0.9375 + 0.01953125 = 42,909.95703125

(A79D.F5)16 = (42909.95703125)10

Octal Numeral System

Octal numbers are represented in the base-8 number system. Unlike the decimal system (base-10) which uses 10 digits (0–9) and hexadecimal (base-16) which uses 16 symbols (0–9, A–F), the octal number system uses only 8 digits:

Digits used in octal system:

0, 1, 2, 3, 4, 5, 6, 7

Example:

Each position in an octal number represents a power of 8, therefore octal value "7167.57" can be expressed as powers to the base 8:

Digit Position Power of 8 Value
7 83 place 83 = 512 7 × 512 = 3584
1 82 place 82 = 64 1 × 64 = 64
6 81 place 81 = 8 6 × 8 = 48
7 80 place 80 = 1 7 × 1 = 7
5 8-1 place 8-1 = 0.125 5 × 0.125 = 0.625
7 8-2 place 8-2 = 0.015625 7 × 0.015625 = 0.109375

(7167.57)8 = (7 × 83) + (1 × 82) + (6 × 81) + (7 × 80) + (5 × 8-1) + (7 × 8-2)
= 3584 + 64 + 48 + 7 + 0.625 + 0.109375
= (3703.734375)10

How to Convert Hex to Octal

As discussed above the digits of hexadecimal number are represented in nibbles or four bits while the digits of octal number are represented in three bits. Therefore, follow the steps below to convert the hex value to octal. Hex digits from 0 to F are represented in binary from 0000 to 1111.

How to Convert Fractional Hex to Octal

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

Hex to Octal Examples

Example 1: Convert the hexadecimal value "1F" to octal value.

  • Split the hex digits into binary 4-bits or nibbles.
  • Nibble-1 Nibble-2
    Hex: 1 F
    Decimal: 1 15

    Binary: 23 22 21 20 23 22 21 20
    0 0 0 1 1 1 1 1
  • Make a group of 3-bits, and add zeros on the leftmost side if required.
  • In this example, zeros are padded on the leftmost side.
  • Group-1 Group-2 Group-3
    0 0 0 0 1 1 1 1 1
  • Convert the 3-bit binary numbers to octal equivalents.
  • Group-1 Group-2 Group-3
    0 3 7
  • Final octal value is:
  • Octal value = (037)8 = (37)8
  • Example 2: Convert hex value "2DC7" to octal.

  • Split the hex digits into binary 4-bits or nibbles.
  • Nibble-1 Nibble-2 Nibble-3 Nibble-4
    Hex: 2 D C 7
    Decimal: 2 13 12 7
     
    Binary: 23222120 23222120 23222120 23222120
    0010 1101 1100 0111
  • Make 3-bit groups and do zero padding on the left side.
  • Group-1     Group-2     Group-3     Group-4     Group-5
    001     010     110     001     111
  • Convert 3-bit binary groups to octal equivalents.
  • Group-1     Group-2     Group-3     Group-4     Group-5
    1     2     6     1     7
  • Final octal value is:
  • (2DC7)16 = (12617)8
  • Example 3: Convert hex value "4F9D" to octal.

  • Split the hex digits into binary 4-bits or nibbles.
  • Nibble-1 Nibble-2 Nibble-3 Nibble-4
    Hex: 4 F 9 D
    Decimal: 4 15 9 13
     
    Binary: 23222120 23222120 23222120 23222120
    0100 1111 1001 1101
  • Make 3-bit groups and do zero padding on the left side.
  • Group-1     Group-2     Group-3     Group-4     Group-5
    100     111     111     001     110
  • Convert 3-bit binary groups to octal equivalents.
  • Group-1     Group-2     Group-3     Group-4     Group-5
    4     7     7     1     6
  • Final octal value is:
  • (4F9D)16 = (47716)8
  • Example 4: Convert the hexadecimal value "2F.D" to octal value.

  • Split hex digits into 4-bits groups.
  • Nibble-1 Nibble-2 Nibble-3
    Hex: 2 F. D
    Decimal: 2 15. 13
     
    Binary: 23 22 21 20 23 22 21 20 23 22 21 20
    0 0 1 0 1 1 1 1. 1 1 0 1
  • Make a group of 3-bits, add zeros on the left side for the integral part and on the rightmost side for the fractional part to complete 3-bit groups.
  • Group-1     Group-2     Group-3     Group-4     Group-5
    0 0 0 1 0 1 1 1 1. 1 1 0 1 0 0
  • Convert the 3-bit binary numbers to decimal values and combine them to get the final octal value.
  • Group-1     Group-2     Group-3     Group-4     Group-5
    0     5     7.     6     4
  • Octal value is:
  • (2F.D)16 = (057.64)8 = (57.64)8
  • Example 5: Convert the hex value "3FD4.C3" to octal value.

  • Split hex digits into 4-bits groups.
  • Nibble-1     Nibble-2     Nibble-3     Nibble-4     Nibble-5     Nibble-6
    Hex: 3 F D 4. C 3
    Decimal: 3 15 13 4. 12 3

    Binary: 23 22 21 20 23 22 21 20 23 22 21 20 23 22 21 20 23 22 21 20 23 22 21 20
    0011 1111 1101 0100. 1100 0011
  • Make a group of 3-bits, add zeros on the left side for the integral part and on the rightmost side for the fractional part to complete 3-bit groups.
  • Group-1     Group-2     Group-3     Group-4     Group-5     Group-6     Group-7     Group-8     Group-9
    000 011 111 111 010 100. 110 000 110
  • Convert the 3-bit binary numbers to decimal values and combine them to get the final octal value.
  • Group-1     Group-2     Group-3     Group-4     Group-5     Group-6     Group-7     Group-8     Group-9
    0     3     7     7     2     4.     6     0     6
  • Octal value is:
  • (3FD4.C3)16 = (037724.606)8 = (37724.606)8
  • Frequently Ask Questions: Hex to Octal Conversion

    Q1: Mask the hex value 0x3FD4 with 0xF0FF and provide the result in octal value?

    By masking we mean bitwise AND operation:

    0x3FD4 = (0011 1111 1101 0100)2 and 0xF0FF = (1111 0000 1111 1111)2

                                   X = 0011 1111 1101 0100

                                   Y = 1111 0000 1111 1111

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

    X & Y (Bitwise AND) = 0011 0000 1101 0100

    Make a group of 3 bits and do zero padding on left side: 000 011 000 011 010 100

    011 = 3, 000 = 0, 011 = 3, 010 = 2, 100 = 4, therefore octal value = (30324)8

    Q2: Right shift the hex value 0xF8D3 by 4 and provide the result in octal?

    Right shift operation is represented by ">>", while doing the right shift, do the zero padding on the left side:

    0xF8D3 = (1111 1000 1101 0011)2

    (0xF8D3 >> 4) = (1111 1000 1101 0011)2 >> 4 = (0000 1111 1000 1101)2

    Group bits to 3-bits: 000 000 111 110 001 101

    111 = 7, 110 = 6, 001 = 1, 101 = 5

    Octal value is: (7615)8

    Q3: Convert hex value 0xFF.F to octal?

    "0x" is the notation used to represent the hexadecimal numbers.

    Since F = 1111, 0xFF.F = (11111111.1111)2

    Arrange bits into 3-bits group, add zero padding on the left side before hex point and add trailing zeros on the right side after hex point.

    3-bits groups = 011 111 111. 111 100

    Convert them to octal value: 011 = 3, 111 = 7, 111 = 7, 111 = 7 and 100 = 4

    0xFF.F = (377.74)8

    Q4: Convert hex value 0x1.1 to octal?

    0x1.1 = (0001.0001)2

    Arrange bits into 3-bits group: 000 001. 000 100

    000 = 0, 001 = 1, 000 = 0, 100 = 4

    0x1.1 = (1.04)8

    Q5: Convert hex value 0x9.5 to octal?

    0x9.5 = (1001.0101)2

    Arrange bits into 3-bits group: 001 001. 010 100

    001 = 1, 001 = 1, 010 = 2, 100 = 4

    0x9.5 = (9.5)16 = (11.24)8

    Hex to Octal Conversion Table

    HexadecimalOctal
    11
    22
    33
    44
    55
    66
    77
    810
    911
    A12
    B13
    C14
    D15
    E16
    F17
    1020
    1121
    1222
    1323
    1424
    1525
    1626
    1727
    1830
    1931
    1A32
    1B33
    1C34
    1D35
    1E36
    1F37
    2040
    2141
    2242
    2343
    2444
    2545
    2646
    2747
    2850
    2951
    2A52
    2B53
    2C54
    2D55
    2E56
    2F57
    3060
    3161
    3262
    3363
    3464
    3565
    3666
    3767
    3870
    3971
    3A72
    3B73
    3C74
    3D75
    3E76
    3F77
    40100
    HexadecimalOctal
    41101
    42102
    43103
    44104
    45105
    46106
    47107
    48110
    49111
    4A112
    4B113
    4C114
    4D115
    4E116
    4F117
    50120
    51121
    52122
    53123
    54124
    55125
    56126
    57127
    58130
    59131
    5A132
    5B133
    5C134
    5D135
    5E136
    5F137
    60140
    61141
    62142
    63143
    64144
    65145
    66146
    67147
    68150
    69151
    6A152
    6B153
    6C154
    6D155
    6E156
    6F157
    70160
    71161
    72162
    73163
    74164
    75165
    76166
    77167
    78170
    79171
    7A172
    7B173
    7C174
    7D175
    7E176
    7F177
    80200
    HexadecimalOctal
    81201
    82202
    83203
    84204
    85205
    86206
    87207
    88210
    89211
    8A212
    8B213
    8C214
    8D215
    8E216
    8F217
    90220
    91221
    92222
    93223
    94224
    95225
    96226
    97227
    98230
    99231
    9A232
    9B233
    9C234
    9D235
    9E236
    9F237
    A0240
    A1241
    A2242
    A3243
    A4244
    A5245
    A6246
    A7247
    A8250
    A9251
    AA252
    AB253
    AC254
    AD255
    AE256
    AF257
    B0260
    B1261
    B2262
    B3263
    B4264
    B5265
    B6266
    B7267
    B8270
    B9271
    BA272
    BB273
    BC274
    BD275
    BE276
    BF277
    C0300
    HexadecimalOctal
    C1301
    C2302
    C3303
    C4304
    C5305
    C6306
    C7307
    C8310
    C9311
    CA312
    CB313
    CC314
    CD315
    CE316
    CF317
    D0320
    D1321
    D2322
    D3323
    D4324
    D5325
    D6326
    D7327
    D8330
    D9331
    DA332
    DB333
    DC334
    DD335
    DE336
    DF337
    E0340
    E1341
    E2342
    E3343
    E4344
    E5345
    E6346
    E7347
    E8350
    E9351
    EA352
    EB353
    EC354
    ED355
    EE356
    EF357
    F0360
    F1361
    F2362
    F3363
    F4364
    F5365
    F6366
    F7367
    F8370
    F9371
    FA372
    FB373
    FC374
    FD375
    FE376
    FF377

    by Wasim Khan and it was last modified on

    Related Conversions

    Please find the related numeric conversions.