Skip to content
geeksforgeeks
  • Tutorials
    • Python
    • Java
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
    • Practice Coding Problems
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Number System and Arithmetic
  • Algebra
  • Set Theory
  • Probability
  • Statistics
  • Geometry
  • Calculus
  • Logarithms
  • Mensuration
  • Matrices
  • Trigonometry
  • Mathematics
Open In App
Next Article:
Octal Number System
Next article icon

Octal Number System

Last Updated : 11 Mar, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report

Octal Number System is a number system with base 8 as it uses eight symbols (or digits) namely 0, 1, 2, 3, 4, 5, 6, and 7. For example, 228, 138, 178, etc. are octal numbers. This number system is mainly used in computer programming as it is a compact way of representing binary numbers with each octal number corresponding to three binary digits.

In this article, we will discuss Octal Number System, Octal Number System Conversions, Octal Number System Examples, and Others in detail.

Octal-Number-System

Table of Content

  • What is Number System?
  • What is an Octal Number System?
  • Octal to Decimal Conversion
  • Decimal to Octal Conversion
  • Octal to Hexadecimal Conversion
  • Hexadecimal to Octal Number
  • Octal to Binary Number
  • Binary to Octal Number
  • Octal Multiplication Table
  • Examples on Octal Numbers System
  • Practice Questions on Octal Number System

What is Number System?

A number system is a method of expressing numbers. It contains sets of symbols (or digits) combined with a set of rules to represent a particular quantity. The number system is mainly classified into four types:

  • Decimal number system (with base 10 and symbols ranging between 0-9)
  • Binary Number system (with base 2 and symbols 0 and 1)
  • Hexadecimal number system (with base 16 and symbols raging between 0-9 and from A to F )
  • Octal Number system (with base 8 and symbols ranging between 0-7)

What is an Octal Number System?

The octal number system is a base-8 system using digits 0-7, where each position represents a power of 8. It is commonly used in computing for easy conversion to binary.

'OCTAL' is derived from the Latin word 'OCT' which means Eight. The number system with base 8 and symbols ranging between 0-7 is known as the Octal Number System. Each digit of an octal number represents a power of 8. It is widely used in computer programming and digital systems. Octal number system can be converted to other number systems and visa versa.

For example, an octal number (10)8 is equivalent to 8 in the decimal number system, 001000 in the binary number system and 8 in the hexadecimal number system.

Octal Numbers System Table

The table added below, shows the Octal Number and Decimal Number. 3 bits of Binary Number System is equivalent to one octal numbers.

Octal Numbers

Binary Equivalent

0

000

1

001

2

010

3

011

4

100

5

101

6

110

7

111

Now, we will learn about the conversion of octal number system to other number systems one by one. So let's get started.

Octal to Decimal Conversion

A decimal number system has a base 10 consisting of digits 0-9. We can easily convert an octal number to a decimal number by following these simple steps:

  • Step 1: Write the octal number.
  • Step 2: Multiply each digit of the given octal number with an increasing power of 8 starting from the rightmost digit.
  • Step 3: Sum all the products obtained in step 2.

Example 1: Represent 1238 as a Decimal Number.

Solution:

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

To convert a decimal number to an octal number follow these simple steps:

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 2: Represent 16410 as Octal Number.

Solution:

164/8 , Quotient = 20 and Remainder = 4

20/8 , Quotient = 2 and Remainder = 4

2/8 , Quotient = 0 and Remainder = 2

Now, By writing obtained remainders in reverse order we get, 244.

Hence 2448 is octal representation of 16410

The image added below shows binary to octal conversion.

Decimal to Octal Conversion

Octal to Hexadecimal Conversion

A hexadecimal number system has a base 16 and it is an alphanumeric number system consisting of digits from 0 to 9 and alphabets from A to F. To convert an octal number to a hexadecimal number: First convert the octal number to the decimal number; Then convert the obtained decimal number to the hexadecimal number.

Steps to Convert Octal Number to Decimal Number

  • Step 1: Write the octal number.
  • Step 2: Multiply each digit of the given octal number with an increasing power of 8 starting from the rightmost digit.
  • Step 3: Sum all the products obtained in step 2.

Steps to Convert Decimal Number to Hexadecimal Number

  • 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.

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

10

11

12

13

14

15

A

B

C

D

E

F

Example 3: Convert 1748 to a hexadecimal number.

Solution:

Step 1: Convert 1748 to decimal

1748 = 1 × 82 + 7 × 81 + 4 × 80

1748 = 1 × 64 + 7 × 8 + 4 × 1

1748 = 64 + 56 + 4 = 124

We get 1748 = 12410

Step 2: Covert 12410 to hexadecimal

124/16, Quotient = 7, Remainder = 12

7/16, Quotient = 0, Remainder = 7

Converting the obtained remainders to corresponding hexadecimal number and writing it in reverse order we get:

12410 = 7C16

Hence we get 1748 = 7C16

Hexadecimal to Octal Number

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 following steps to convert hexadecimal number 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 following steps to convert decimal number 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 4: Convert 9B16 to Octal Number.

Solution:

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 × 1

9B16 = 144 + 11 = 155

We get 9B16 = 15510

Step 2: Convert 15510 to Octal Number

155/8, Quotient = 19, Remainder = 3

19/8, Quotient = 2, Remainder = 3

2/8, Quotient = 0, Remainder = 2

Writing the obtained remainders in reverse order we get:

15510 = 2338

Hence we get 9B16 = 2338

Octal to Binary Number

The conversion of an octal number to a binary number is very simple, we have to simply write the corresponding binary value of each digit of the given octal number. Corresponding values of octal and binary numbers are as follows:

Octal Number

Corresponding Binary Number

0

000

1

001

2

010

3

011

4

100

5

101

6

110

7

111

Example 5: Convert 2138 to a binary number.

Solution:

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 Number

We can easily convert a binary number to an octal number by following these steps:

  • Step 1: Split the binary number into sets of three digits, starting from the right.
  • Step 2: Write the corresponding octal value of each binary triplet obtained in step 1.

Example 6: Convert 1001110012 to an octal number.

Solution:

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

100 ---> 4
111 ---> 7
001 ---> 1

Hence we get, 1001110012 = 4718

The binary-to-decimal conversion is added in the image below,

Binary to Octal Conversion

Octal Multiplication Table

Octal Multiplication table is added below,

×

0

1

2

3

4

5

6

7

0

0

0

0

0

0

0

0

0

1

0

1

2

3

4

5

6

7

2

0

2

4

6

10

12

14

16

3

0

3

6

11

14

17

22

25

4

0

4

10

14

20

24

30

34

5

0

5

12

17

24

31

36

43

6

0

6

14

22

30

36

44

52

7

0

7

16

25

34

43

52

61

Read More,

  • Whole Numbers
  • Natural Numbers
  • Irrational Numbers

Solved Examples on Octal Numbers System

Example 1: What is Decimal Equivalent of 11218?

Solution:

11218 = 1 × 83 + 1 × 82 + 2 × 81 + 1 × 80

11218 = 1 × 512 + 1 × 64 + 2 × 8 + 1 × 1

11218 = 512 + 64 + 16 + 1 = 593

Hence 11218 = 59310

Example 2: Convert 278 into the binary number.

Solution:

Write binary equivalent of each digit of 278

2 ---> 010
7 ---> 111

Hence 278 = 0101112

Example 3: Find the octal equivalent of 10010012

Solution:

Breaking 10101111 into groups of three starting from rightmost digit and adding leading zeroes we get:

001, 001, 001

Write the octal equivalent of the groups formed

001 -> 1
001 -> 1
001 -> 1

Answer is (111)8

Practice Questions on Octal Number System

Q1: Convert 12110 to an octal number.

Q2: What is Octal Value of 1000100002?

Q3: Find the Decimal Equivalent of 558.

Q4: Convert 12F16 to Octal number.

Q5: What will be the binary value of 578?


Next Article
Octal Number System

D

disha_batra
Improve
Article Tags :
  • Mathematics
  • School Learning
  • Number System - MAQ
  • PCM

Similar Reads

    Number System in Maths
    Number System is a method of representing numbers on the number line with the help of a set of Symbols and rules. These symbols range from 0-9 and are termed as digits. Let's learn about the number system in detail, including its types, and conversion.Number System in MathsNumber system in Maths is
    13 min read
    What is a Number System?
    A number system is a way of writing numbers using specific symbols or digits. It helps us represent numbers mathematically. There are different types of number systems, such as the decimal system, binary system, octal system, and hexadecimal system.Here, we will discuss the types of number systems i
    4 min read
    What are the subsets of rational numbers?
    A number is a fundamental concept in mathematics. Numbers are used to count, measure, maintain things in order, index, and so on. Natural numbers, whole numbers, rational and irrational numbers, integers, real numbers, complex numbers, even and odd numbers, and so on are examples of different sorts
    6 min read
    Is 3 a whole number?
    The number system includes different types of numbers for example prime numbers, odd numbers, even numbers, rational numbers, whole numbers, etc. These numbers can be expressed in the form of figures as well as words accordingly. For example, the numbers like 40 and 65 expressed in the form of figur
    4 min read
    Is 5 a whole number?
    The number system includes different types of numbers for example prime numbers, odd numbers, even numbers, rational numbers, whole numbers, etc. These numbers can be expressed in the form of figures as well as words accordingly. For example, the numbers like 40 and 65 expressed in the form of figur
    4 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences