What Each System Is

Octal is a base-8 number system. It uses eight digits — 0, 1, 2, 3, 4, 5, 6, 7 — and each place is worth a power of 8 (1, 8, 64, 512, …). Because 8 = 2³, one octal digit represents exactly 3 binary bits. Octal numbers are sometimes written with a leading 0 (for example 0755) or a subscript, like 755₈, to show they are not decimal.

Hexadecimal (often shortened to "hex") is a base-16 system. It needs sixteen digit symbols, so after 0–9 it borrows letters: A = 10, B = 11, C = 12, D = 13, E = 14, F = 15. Each place is worth a power of 16 (1, 16, 256, 4096, …), and because 16 = 2⁴, one hex digit represents exactly 4 binary bits. Hex values are commonly prefixed with 0x (as in 0x1ED) or a # in color codes.

The practical effect of the group size: hex packs more information into each digit, so hex numbers are shorter. The value 493 in decimal is 755 in octal (three digits) and 1ED in hex (also three digits here) — but for larger values hex pulls ahead quickly, which is one reason it dominates modern computing.

Side-by-Side Comparison

FeatureOctalHexadecimal
Base816
Digits0–7 (8 symbols)0–9, A–F (16 symbols)
Bits per digit3 bits4 bits
Place values1, 8, 64, 512…1, 16, 256, 4096…
Common markersLeading 0 (e.g. 0755)0x prefix, # for colors
Typical usesUnix file permissions, older computingColors, memory addresses, MAC addresses, bytes

Where Octal Is Used

Octal's most famous surviving job is Unix and Linux file permissions. When you run chmod 755 file, those three digits are octal. Each digit encodes three permission bits — read (4), write (2) and execute (1) — for one class of user. So 7 = 4 + 2 + 1 means read, write and execute; 5 = 4 + 1 means read and execute. In 755, the owner gets 7 (full access), while the group and everyone else get 5 (read and execute only). The fit is perfect precisely because one octal digit is 3 bits, and there are exactly 3 permission bits per class.

Beyond permissions, octal shows up in older computing: early machines such as the PDP series had word sizes divisible by 3 (12, 24 or 36 bits), which made octal the natural shorthand. You may also meet octal in some digital electronics, aviation transponder codes, and escape sequences like \101 in older programming contexts. It is a niche tool today — but on any Linux or macOS terminal, permissions alone guarantee you will keep meeting it.

Where Hexadecimal Is Used

Hexadecimal is everywhere, mainly because of one convenient fact: a byte is 8 bits, and 8 bits is exactly two hex digits (4 + 4). That makes hex the natural language for anything byte-sized:

  • Colors on the web. A CSS color like #FF5733 is three hex bytes: FF (255) red, 57 (87) green, 33 (51) blue.
  • Memory addresses. Debuggers, error messages and documentation write addresses in hex, e.g. 0x7FFF5FBFF710, because the values are huge but the digits stay compact.
  • MAC addresses. Network hardware addresses are six hex bytes separated by colons, such as 3C:7A:9F:12:AB:04 — each pair is one byte.
  • Data inspection. Hex editors, file signatures, Unicode code points (U+1F600), color pickers, and encoding work all default to hex.

Converting Between Octal and Hexadecimal via Binary

There is no tidy direct shortcut between base 8 and base 16, but there is an elegant route: binary. Since an octal digit is exactly 3 bits and a hex digit is exactly 4 bits, you only have to regroup the same bits — no arithmetic at all. The steps:

  1. Octal → binary: replace each octal digit with exactly 3 bits (pad with leading zeros to keep every group at 3 bits).
  2. Regroup by 4: starting from the right, split the bit string into groups of 4; pad the leftmost group with zeros if needed.
  3. Binary → hex: write each 4-bit group as one hex digit.

Worked example: convert octal 755 to hexadecimal.

First expand each octal digit to 3 bits: 7 → 111, 5 → 101, 5 → 101. Joined together: 111 101 101, a 9-bit string. Now regroup into 4s from the right: 1 1110 1101 — the leftmost group has just one bit, and padding it to 0001 doesn't change the value. Finally convert each group: 0001 = 1, 1110 = 14 = E, 1101 = 13 = D. The result is 755₈ = 1ED₁₆. A quick sanity check through decimal confirms it: 755₈ = 7×64 + 5×8 + 5 = 493₁₀, and 1ED₁₆ = 1×256 + 14×16 + 13 = 493₁₀. Same value, both ways. ✓

Which One Should You Learn First?

Start with hexadecimal. It appears in far more places — web colors, debugging, networking, file formats — so the practice you get from everyday exposure reinforces it constantly, and its 4-bits-per-digit rule aligns perfectly with the byte-based design of modern hardware. Once hex feels natural, octal takes very little extra effort: the concepts are identical, only the group size changes from 4 bits to 3, and in practice you mainly need it for Unix permissions. If your work is heavy on Linux server administration, though, learn the permission digits (0–7 and what each combination allows) early — you will use them daily.

Put It Into Practice

Ready to convert without the manual regrouping? Our Octal to Hexadecimal Converter on the homepage handles the conversion instantly, and the dedicated Octal to Hex tool shows every grouping step. If you are still building the basics, start with our step-by-step guide on how to convert decimal to octal, then come back and try the worked example above on your own.

Frequently Asked Questions

Why does hexadecimal use the letters A to F?

Base 16 needs sixteen distinct digit symbols, but decimal only provides ten (0–9). The letters A, B, C, D, E and F fill the gap, representing the values 10, 11, 12, 13, 14 and 15 as single digits.

What does chmod 755 mean in octal?

Each octal digit encodes three permission bits: read (4), write (2) and execute (1). In 755, the owner gets 7 (4+2+1, read/write/execute), while the group and everyone else get 5 (4+1, read/execute). So chmod 755 makes a file fully usable by its owner and readable and executable by everyone else.

How do I convert octal to hexadecimal quickly?

Go through binary. Expand each octal digit into exactly 3 bits, then regroup the same bit string into sets of 4 from the right and write each group as a hex digit. For example, octal 755 becomes binary 111 101 101, which regroups as 1 1110 1101 and reads as hex 1ED.

Which is more common today, octal or hexadecimal?

Hexadecimal is far more common in modern computing because it maps cleanly onto bytes: two hex digits are exactly one byte (8 bits). Octal survives mainly in Unix file permissions and older systems, but you will still meet it regularly on Linux and macOS.