Home Conversion Number Octal to Hex

Octal to Hex Converter

To use octal to hex converter, type any octal value e.g. "73" and click on the Convert button and you will get the hexadecimal value of "3B" on right side.

Octal to Hexadecimal Conversion:

Hexadecimal = 3B

Octal Numeral System

The octal number system, also known as base-8, is a numeral system that uses eight distinct digits: 0, 1, 2, 3, 4, 5, 6, and 7. Each position in an octal number represents a power of 8.

Example:

Octal number "1775.64" represented as power of 8:

Digit Position Power of 8 Value
1 83 place 83 = 512 1 × 512 = 512
7 82 place 82 = 64 7 × 64 = 448
7 81 place 81 = 8 7 × 8 = 56
5 80 place 80 = 1 5 × 1 = 5
6 8-1 place 8-1 = 0.125 6 × 0.125 = 0.75
4 8-2 place 8-2 = 0.015625 4 × 0.015625 = 0.0625

(1775.64)8 = (1 × 83) + (7 × 82) + (7 × 81) + (5 × 80) + (6 × 8-1) + (4 × 8-2) = 512 + 448 + 56 + 5 + 0.75 + 0.0625 = (1021.8125)10

Hexadecimal Numeral System (Hex Numbers)

The hexadecimal number system, often shortened to "hex," is a base-16 numeral system. Unlike the decimal (base-10) system which uses digits 0-9, hexadecimal uses 16 unique symbols: the digits 0-9 and the letters A-F or a-f. The letters A through F represent the decimal values 10 through 15, respectively. Every hex digit in a hex number represents a power of 16.

Example:

Hex value "FD79.A6E" can be written as power of 16:

Digit Position Power of 16 Value
F (15) 163 (4096's place) 163 = 4096 15 × 4096 = 61440
D (13) 162 (256's place) 162 = 256 13 × 256 = 3328
7 161 (16's place) 161 = 16 7 × 16 = 112
9 160 (1's place) 160 = 1 9 × 1 = 9
A (10) 16-1 place 16-1 = 1/16 = 0.0625 10 × 0.0625 = 0.625
6 16-2 place 16-2 = 1/256 = 0.00390625 6 × 0.00390625 = 0.0234375
E (14) 16-3 place 16-3 = 1/4096 = 0.00024414 14 × 0.00024414 = 0.00341797

(FD79.A6E)16 = (15 × 163) + (13 × 162) + (7 × 161) + (9 × 160) + (10 × 16-1) + (6 × 16-2) + (14 × 16-3) = 61440 + 3328 + 112 + 9 + 0.625 + 0.0234375 + 0.00341797 = (64889.65185547)10

How to Convert the Octal to Hex

To convert the octal value to hexadecimal value consider the following steps:

How to Convert Fractional Octal to Hex

We can also convert the fractional octal value to the corresponding hex value using the following steps:

Octal to Hex Examples

Example 1: Convert the octal value "731" to hex.

  • Given the octal number "731", convert the octal digits to binary format.
  • Group-1 Group-2 Group-3
    Octal Digits: 7 3 1

    Position: 22 21 20 22 21 20 22 21 20
    4 2 1 4 2 1 4 2 1
    Bits: 1 1 1 0 1 1 0 0 1
  • Make 4-bit groups and add zero padding if necessary.
  • Nibble-1 Nibble-2 Nibble-3
    4-Bits Group: 0 0 0 1 1 1 0 1 1 0 0 1
  • Convert 4-bit groups to the corresponding hex digits and combine them.
  • Nibble-1 Nibble-2 Nibble-3
    Hex Digits: 1 D 9
  • (731)8 = (1D9)16
  • Example 2: Convert the octal value "7627" to hex.

  • Given the octal number "7627", convert the octal digits to binary format.
  • Group-1 Group-2 Group-3 Group-4
    Octal Digits: 7 6 2 7

    Position: 22 21 20 22 21 20 22 21 20 22 21 20
    4 2 1 4 2 1 4 2 1 4 2 1
    Bits: 1 1 1 1 1 0 0 1 0 1 1 1
  • Make 4-bit groups and add zero padding if necessary.
  • Nibble-1 Nibble-2 Nibble-3
    4-Bits Group: 0 1 1 1 0 1 1 0 1 1 1 1
  • Convert 4-bit groups to the corresponding hex digits and combine them.
  • Nibble-1 Nibble-2 Nibble-3
    Hex Digits: 7 6 F
  • (7627)8 = (76F)16
  • Example 3: Convert the octal value "77356" to hex.

  • Given the octal number "77356", convert the octal digits to binary format.
  • Group-1 Group-2 Group-3 Group-4 Group-5
    Octal Digits: 7 7 3   5 6

    Position: 22 21 20 22 21 20 22 21 20 22 21 20 22 21 20
    4 2 1 4 2 1 4 2 1 4 2 1 4 2 1
    Bits: 1 1 1 1 1 1 0 1 1 1 0 1 1 1 0
  • Make 4-bit groups and add zero padding if necessary.
  • Nibble-1 Nibble-2 Nibble-3 Nibble-4
    4-Bits Group: 0 1 1 1 1 1 1 0 1 1 1 0 1 1 1 0
  • Convert 4-bit groups to the corresponding hex digits and combine them.
  • Nibble-1 Nibble-2 Nibble-3 Nibble-4
    Hex Digits: 7 E E E
  • (77356)8 = (7EEE)16
  • Example 4: Convert (23.17)8 to hexadecimal.

  • Given the octal number, convert the octal digits to binary format.
  • Group-1 Group-2 Group-3 Group-4
    Octal Digit: 2 3. 1 7

    Position: 22 21 20 22 21 20 22 21 20 22 21 20
    4 2 1 4 2 1 4 2 1 4 2 1
    Bits: 0 1 0 0 1 1. 0 0 1 1 1 1
  • Make 4-bit groups. Add zeros on the leftmost side (MSB) for the integral part and add trailing zeros on the rightmost side (LSB) for the fractional part.
  • Nibble-1 Nibble-2 Nibble-3 Nibble-4
    4-Bits Group: 0 0 0 1 0 0 1 1. 0 0 1 1 1 1 0 0
  • Convert the 4-bit binary numbers to hex values and combine them to get the final hexadecimal value.
  • Nibble-1 Nibble-2 Nibble-3 Nibble-4
    Hex Digits: 1 3. 3 C
  • (23.17)8 = (13.3C)16
  • Example 5: Convert (7726.756)8 to hexadecimal.

  • Given the octal number, convert the octal digits to binary format.
  • Group-1 Group-2 Group-3 Group-4 Group-5 Group-6 Group-7
    Octal Digit: 7 7 2 6. 7 5 6

    Position: 222120 222120 222120 222120 222120 222120 222120
    421 421 421 421 421 421 421
    Bits: 111 111 010 110. 111 101 110
  • Make 4-bit groups. Add zeros on the leftmost side (MSB) for the integral part and add trailing zeros on the rightmost side (LSB) for the fractional part.
  • Nibble-1 Nibble-2 Nibble-3 Nibble-4 Nibble-5 Nibble-6
    4-Bits Group: 1111 1101 0110. 1111 0111 0000
  • Convert the 4-bit binary numbers to hex values and combine them to get the final hexadecimal value.
  • Nibble-1 Nibble-2 Nibble-3 Nibble-4 Nibble-5 Nibble-6
    Hex Digits: F D 6. F 7 0
  • (7726.756)8 = (FD6.F70)16 = (FD6.F7)16
  • Frequently Ask Questions: Octal to Hex Conversion

    Q1: A network subnet mask is given as 377777700 in octal. Convert it to hexadecimal notation?

    Let's convert every octal digit to binary, 3 = 011, 7 = 111, 0 = 000, therefore:

    (377777700)8 = (011 111 111 111 111 111 111 000 000)2, Now we group all these bits into 4-bits group from left side.

    4-bit groups: 0011 1111 1111 1111 1111 1100 0000, now converting it back to hex digits, 0011 = 3, 1111 = F, 1100 = C, 0000 = 0

    (377777700)8 = (3FFFFC0)16

    Q2: Convert the octal memory address 677777 to hexadecimal for addressing in a 24-bit system.

    Convert every octal digit to binary: 6 = 110, 7 = 111

    (677777)8 = (110 111 111 111 111 111)2, make 4-bits group for 24-bit addressing:

    Make 4-bit groups with zero padding on the left side: 0011 0111 1111 1111 1111, converting it to hex digits, 0011 = 3, 0111 = 7, 1111 = F

    (677777)8 = (37FFF)16

    Q3: Apply a mask (0x3F) to the octal value (7653)8 and convert the result to hexadecimal?

    In binary 7 = 111, 6 = 110, 5 = 101, 3 = 011

    (7653)8 = (111 110 101 011)2, and masking with 0x3F = (0011 1111)2

    By masking we mean bit-wise AND operation and mask in 12-bit is 0x03F:

                                   A = 111110101011

                                   B = 000000111111

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

    A & B (Bitwise AND) = 000010101011

    4-bit groups for hex digits: 0000,1010 and 1011, Convert them to hex digits, 0000 = 0 (hex digit), 1010 = A (hex digit) and 1011 = B (hex digit)

    Final hex value is: (0AB)16 = (AB)16

    Q4: How to convert octal (1.1)8 to hex value?

    (1.1)8 = (001.001)2 in binary

    Make 4-bit groups: 0001.0010, hex value is: 1.216

    Q5: How to convert octal (7.7)8 to hex value?

    As 7 = 111, (7.7)8 = (111.111)2 in binary

    Make 4-bit groups by padding zeros on the MSB side of integral part and trailing zeros on the fractional part: 0111.1110, hex value is: 7.E16

    Q6: Convert octal (77.77)8 to hex value?

    As 7 = 111, (77.77)8 = (111111.111111)2 in binary

    4-bit groups: 0011 1111.1111 1100, converting nibbles to hex digits, 0011 = 3, 1111 = F, 1100 = C, hex value is: 3F.FC16

    Q7: Why we used hex number system more commonly compared to octal?

    Hexadecimal is widely used in computing because it provides a more human-readable way to represent data. Since 16 is a power of 2 i.e.(24), a single hexadecimal digit can represent four binary digits (bits) compared to octal which can represent only three. This makes it much easier to read and work with large numbers. Hex numbers are widely used in various fields of computer science and technology, for example, in web design (HTML and CSS), color codes are often defined using a six-digit hex code, e.g. #FF0012. Similarly, they are also used to represent memory addresses in embedded electronics and MAC (Media Access Control) addresses in networking using 12 hex digits e.g. 00:1B:44:11:3A:B7.

    Octal to Hex Conversion Table

    OctalHexadecimal
    11
    22
    33
    44
    55
    66
    77
    108
    119
    12A
    13B
    14C
    15D
    16E
    17F
    2010
    2111
    2212
    2313
    2414
    2515
    2616
    2717
    3018
    3119
    321A
    331B
    341C
    351D
    361E
    371F
    4020
    4121
    4222
    4323
    4424
    4525
    4626
    4727
    5028
    5129
    522A
    532B
    542C
    552D
    562E
    572F
    6030
    6131
    6232
    6333
    6434
    6535
    6636
    6737
    7038
    7139
    723A
    733B
    743C
    753D
    763E
    773F
    10040
    OctalHexadecimal
    10141
    10242
    10343
    10444
    10545
    10646
    10747
    11048
    11149
    1124A
    1134B
    1144C
    1154D
    1164E
    1174F
    12050
    12151
    12252
    12353
    12454
    12555
    12656
    12757
    13058
    13159
    1325A
    1335B
    1345C
    1355D
    1365E
    1375F
    14060
    14161
    14262
    14363
    14464
    14565
    14666
    14767
    15068
    15169
    1526A
    1536B
    1546C
    1556D
    1566E
    1576F
    16070
    16171
    16272
    16373
    16474
    16575
    16676
    16777
    17078
    17179
    1727A
    1737B
    1747C
    1757D
    1767E
    1777F
    20080
    OctalHexadecimal
    20181
    20282
    20383
    20484
    20585
    20686
    20787
    21088
    21189
    2128A
    2138B
    2148C
    2158D
    2168E
    2178F
    22090
    22191
    22292
    22393
    22494
    22595
    22696
    22797
    23098
    23199
    2329A
    2339B
    2349C
    2359D
    2369E
    2379F
    240A0
    241A1
    242A2
    243A3
    244A4
    245A5
    246A6
    247A7
    250A8
    251A9
    252AA
    253AB
    254AC
    255AD
    256AE
    257AF
    260B0
    261B1
    262B2
    263B3
    264B4
    265B5
    266B6
    267B7
    270B8
    271B9
    272BA
    273BB
    274BC
    275BD
    276BE
    277BF
    300C0
    OctalHexadecimal
    301C1
    302C2
    303C3
    304C4
    305C5
    306C6
    307C7
    310C8
    311C9
    312CA
    313CB
    314CC
    315CD
    316CE
    317CF
    320D0
    321D1
    322D2
    323D3
    324D4
    325D5
    326D6
    327D7
    330D8
    331D9
    332DA
    333DB
    334DC
    335DD
    336DE
    337DF
    340E0
    341E1
    342E2
    343E3
    344E4
    345E5
    346E6
    347E7
    350E8
    351E9
    352EA
    353EB
    354EC
    355ED
    356EE
    357EF
    360F0
    361F1
    362F2
    363F3
    364F4
    365F5
    366F6
    367F7
    370F8
    371F9
    372FA
    373FB
    374FC
    375FD
    376FE
    377FF

    by Wasim Khan and it was last modified on

    Related Conversions

    Please find the related numeric conversions.