What is Octal ?

Octal is a number system with a base of 8 i.e. it uses 8 numeric values, namely, {0, 1, 2, 3, 4, 5, 6, 7}. This number system is mostly used in the programming of computer programs. For example (32150.7642)8, (275)8, (324)8, (2243)8 are Octal numbers. In this article, we will discuss the octal number system.

What is a Number System?

A Number system is a method of representing numbers with the help of a particular amount of numeric values and a set of rules. A few of the number systems are as follows :

Table of Conversions

The table given below shows the equivalent values of some Octal numbers (0 to 7) in the Binary number system. One Octal number is the equivalent of three Binary bits.

Octal Numbers

Binary Equivalent

0

000

1

001

2

010

3

011

4

100

5

101

6

110

7

111

Octal to Binary Conversion

So the process to convert Octal to binary is a simple one. As we have established earlier an Octal number is equivalent to three binary bits. So, what we have to do is first convert each digit into its binary equivalent.

Example: Convert 2138 to a binary number.

Write the corresponding binary value of each digit of the given octal number:

2 —> 010

1 —> 001

3 —> 011

Hence we get 2138 = 0100010112

Binary to Octal Conversion

The process of converting binary into Octal is indeed a simple one. So, let’s with the example of (110011)2,

Example: Convert 1001110012 to an octal number.

Split 100111001 into sets of three digits and write its corresponding octal value

100 —> 4

111 —> 7

001 —> 1

Hence we get, 1001110012 = 4718

Octal to Decimal Conversion

The process of converting Octal to Decimal is also pretty simple. But not quite as simple as Octal to Binary. We will be using the Expansion Method.

For illustration purposes let’s take (62)8,

Octal Number

6

2

Weightage of the digit

81

80

Example: Represent 1238 as a Decimal Number.

1238 = 1 × 82 + 2 × 81 + 3 × 80

⇒ 1238 = 1 × 64 + 2 × 8 + 3 × 1

⇒ 1238 = 64 + 16 + 3

⇒ 1238 = 8310

Hence 8310 is decimal representation of 1238.

Decimal to Octal Conversion

The process of converting Decimal to Octal is a simple one.

For example let’s take (534)10

So, we will be dividing the number i.e. 534 by 8 and we will also be noting down the remainders. When we divide 534 by 8 we get 66 and 6 remainder Now we will divide 66 by 8, When we divide 66 by 8 we get 8 and 2 remainder, Now we will divide 8 by 8, when we divide 8 by 8 we get 1 and 0 remainder Now we will divide 1 by 8, when we divide 1 by 8 we get 0 and 1 remainder When we read the remainders as the number we read them from the bottom to the top So, we get (1026)8 Hence, (534)10=(1026)8

Octal to Hexadecimal Conversion

  • Step 1: Divide the decimal number by 16.
  • Step 2: Write down the quotient and remainder obtained.
  • Step 3: Divide the quotient obtained by 16.
  • Step 4: Repeat step 2 and step 3 until the quotient becomes 0.
  • Step 5: Write the obtained remainder in reverse order.
  • Step 6: Convert each obtained remainder to its corresponding hexadecimal digit.

The corresponding value of 0-9 remains the same in hexadecimal and 10-15 corresponds to A-F in hexadecimal is represented as,

10

11

12

13

14

15

A

B

C

D

E

F

Example: Convert 1748 to a hexadecimal number.

Step 1: Convert 1748 to decimal
1748 = 1 × 82 + 7 × 81 + 4 × 80
1748 = 1 × 64 + 7 × 8 + 4 × 1
174= 64 + 56 + 4 = 124
We get 1748 = 12410

Step 2: Covert 12410 to hexadecimal124/16,
Quotient = 7, Remainder = 127/16,
Quotient = 0, Remainder = 7
Converting the obtained remainders to corresponding hexadecimal number and writing it in reverse order
we get:12410 = 7C16Hence we get 1748 = 7C16

Hexadecimal to Octal Conversion

To convert a Hexadecimal number to an Octal number we have to First convert the Hexadecimal number to a Decimal number and then the Decimal number to an Octal number.

Steps to Convert Hexadecimal Number to Decimal Number

We can use the following steps to convert hexadecimal numbers to decimal numbers.

Step 1: Write the corresponding decimal value for the given hexadecimal number.

Step 2: Multiply each digit of the obtained number with an increasing power of 16 starting from the rightmost digit.

Step 3: Sum all the products obtained in step 2.

Steps to Convert Decimal Number to Octal Number

We can use the following steps to convert decimal numbers to octal numbers.

Step 1: Divide the given decimal number by 8.

Step 2: Write down the quotient and remainder obtained.

Step 3: Divide the quotient obtained by 8.

Step 4: Repeat step 2 and step 3 until the quotient becomes 0.

Step 5: Write the obtained remainder in reverse order.

Let’s consider an example for better understanding.

Example: Convert 9B16 to an Octal Number.

Step 1: First convert 9B16 to decimal number:
Corresponding decimal value of 9 and B are 9 and 11 respectively.
9B16 = 9 × 161 + 11 × 160
9B16 = 9 × 16 + 11 × 19
B16 = 144 + 11 = 155
We get 9B16 = 15510

Step 2: Convert 15510 to Octal Number
155/8, Quotient = 19, Remainder = 319/8, Quotient = 2,
Remainder = 32/8, Quotient = 0, Remainder = 2
Writing the obtained remainders in reverse order we get:15510 = 2338
Hence we get 9B16 = 2338

Some Uses of Octal

The Octal number system is widely used in computing and computer programming. It became popular when systems such as UNIVAC 1050, PDP-8, ICL 1900, and IBM mainframes started using it for 6-bit, 12-bit, 24-bit, or 36-bit words. As each Octal digit represents 3 binary bits. It is also used in Unix-like operating systems where file permissions are often represented using octal numbers. Each digit corresponds to the settings for the owner, group, and others. For instance, 755 means read, write, and execute permissions for the owner, and read and execute permissions for others.

Frequently Asked Questions on Octal – FAQs

What is the Octal Equivalent of (100)10?

(144)8 is Octal Representation of (100)10

What are the uses of the Octal Number System?

Octal Number system are used in Computer applications sectors, aviation sector and research purposes.