Open In App

Convert Decimal to Octal

Improve
Improve
Like Article
Like
Save
Share
Report

Number system is one of the ways to represent numbers. Every number system has its own base or radix. For example, Binary, Octal, Decimal, and Hexadecimal Number systems are some of the number systems and are also used in microprocessor programming.

  • Binary Numbers – Base 2
  • Octal Numbers – Base 8
  • Decimal Numbers – Base 10
  • Hexadecimal Numbers – Base 16

These numbers are easy to convert from one system to another system. One can convert decimal to binary, decimal to hex, decimal to octal, and vice versa. Here let’s learn how to convert decimal to binary number systems along with the conversion steps and examples.

Decimal to Octal Conversion

Before learning how to convert decimal to binary in a number system, let’s first understand what is a decimal number system and what is an Octal number system.

Decimal Number System

The number system that has a base value of 10 is called Decimal Number System. Decimal Numbers are consist of the following digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9.

Octal Number System

An Octal Number System is a base-3 number system that uses 8 digits ranging from 0 to 7 (i.e., 0, 1, 2, 3, 4, 5, 6, 7) to represent a number. For example: 01, 17, etc.

All the decimal numbers have their corresponding Octal numbers.

Decimal to Octal Formula

For converting Decimal numbers into Octal numbers, use different methods such as formula, division method, and so on. Here, use the remainder formula. Steps to convert decimal number to Octal number using decimal to the Octal formula are as follow,

Step 1: Divide the given decimal number by 8, find the remainder (Ri).

Step 2: Now divide the quotient (Qi) that is obtained in the above step by 8, find the remainder.

Step 3: Repeat the above steps 1 and 2, until 0 is obtained as a quotient.

Step 4: Write down the remainder in the following manner: the last remainder is written first, followed by the rest in the reverse order (Rn, R(n – 1) …. R1). thus binary conversion of the given decimal number will be obtained.

Let’s learn how to convert decimal to Octal numbers using the Decimal to Octal formula with some examples.

Sample Problems

Question 1: Using the decimal to Octal formula, convert 10 decimal into an Octal number.

Solution:

Using decimal to Octal formula,

Step 1: Divide the number 10 by 8, find the remainder:

10 ÷ 8 gives Q1 = 1, R1 = 2

Step 2: Divide Q1 by 2, find the remainder:

1 ÷ 8 gives Q2 = 0, R2 = 1

Step 3: Write down the remainder in the following manner: the last remainder is written first, followed by the rest in the reverse order (Rn, R(n – 1) …. R1), this is the Octal conversion of the given decimal number: 12

Answer: Hence, 10 as Octal is 12.

Question 2: Using the decimal to Octal formula, convert 13 decimal into an Octal number.

Solution:

Using decimal to Octal formula,

Step 1: Divide the number 13 by 8, find the remainder.

13 ÷ 8 gives Q1 = 1, R1 = 5

Step 2: Divide Q1 by 2, find the remainder.

1 ÷ 8 gives Q2 = 0, R2 = 1

Step 3: Write down the remainder in the following manner: the last remainder is written first, followed by the rest in the reverse order (Rn, R(n – 1) …. R1), this is the Octal conversion of the given decimal number: 15

Answer: Hence, 13 as Octal is 15

Question 3: Using decimal to Octal formula, convert 4 decimal into an Octal number.

Solution:

Using decimal to Octal formula,

Step 1: Divide the number 4 by 8, find the remainder.

4 ÷ 8 gives Q1 = 0, R1 = 4

Step 2: Write down the remainder in the following manner: the last remainder is written first, followed by the rest in the reverse order (Rn, R(n – 1) …. R1), this is the Octal conversion of the given decimal number: 4

Answer: Hence, 4 as Octal is 4.

Question 4: Using decimal to Octal formula, convert 5 decimal into an Octal number.

Solution:

Using decimal to Octal formula,

Step 1: Divide the number by 5, find the remainder.

5 ÷ 8 gives Q1 = 0, R1 = 5

Step 2: Write down the remainder in the following manner: the last remainder is written first, followed by the rest in the reverse order (Rn, R(n – 1) …. R1), this is the Octal conversion of the given decimal number: 5

Answer: Hence, 5 as Octal is 5

Question 5: Using decimal to Octal formula, convert 16 decimal into an Octal number.

Solution:

Using decimal to Octal formula,

Step 1: Divide the number by 16, find the remainder.

16 ÷ 8 gives Q1 = 2, R1 = 0

Step 2: Divide Q1 by 2, find the remainder.

2 ÷ 8 gives Q2 = 0, R2 = 2

Step 3: Write down the remainder in the following manner: the last remainder is written first, followed by the rest in the reverse order (Rn, R(n – 1) …. R1), this is the Octal conversion of the given decimal number: 20

Answer: Hence, 16 as Octal is 20

Question 6: Using the decimal to Octal formula, convert 127 decimal into an Octal number.

Solution:

Using decimal to Octal formula,

Step 1: Divide the number by 127, find the remainder.

127 ÷ 8 gives Q1 = 15, R1 = 7

Step 2: Divide  Q1 by 2, find the remainder.

15 ÷ 8 gives Q2 = 1, R2 = 7

Step 3: Divide Q2 by 2, find the remainder.

1 ÷ 8 gives Q3 = 0, R3 = 1

Step 4: Write down the remainder in the following manner: the last remainder is written first, followed by the rest in the reverse order (Rn, R(n – 1) …. R1), this is the Octal conversion of the given decimal number:  177

Answer: Hence, 127 as Octal is 177.

Question 7: Using decimal to Octal formula, convert 88 decimal into an Octal number.

Solution

Using decimal to Octal formula,

Step 1: Divide the number by 88, find the remainder.

88 ÷ 8 gives Q1 = 11, R1 = 0

Step 2: Divide  Q1 by 2, find the remainder.

11 ÷ 8 gives Q2 = 1, R2 = 3

Step 3: Divide  Q2 by 2, find the remainder.

1 ÷ 8 gives Q3 = 0, R3 = 1

Step 4: Write down the remainder in the following manner: the last remainder is written first, followed by the rest in the reverse order (Rn, R(n – 1) …. R1), this is the Octal conversion of the given decimal number: 130

Answer: Hence, 88 as Octal is 130



Last Updated : 24 Jan, 2024
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads