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:
Convert Decimal to Octal
Next article icon

Convert Decimal to Octal

Last Updated : 15 Jul, 2024
Comments
Improve
Suggest changes
Like Article
Like
Report

Number system is one of the ways to represent numbers. Every number system has its base or radix. For example, Binary, Octal, Decimal, and Hexadecimal Number systems are some number systems 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.

Table of Content

  • Decimal to Octal Conversion
    • Decimal Number System
    • Octal Number System
  • Decimal to Octal Formula
  • Decimal to Octal Calculator

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 the Decimal Number System. Decimal Numbers 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.

Decimal to Octal Calculator


People Also Read:

  • Program for Decimal to Octal Conversion
  • C Program to Convert Decimal to Octal
  • Octal Number System - Definition, Conversion Table

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


Next Article
Convert Decimal to Octal

S

SHUBHAMSINGH10
Improve
Article Tags :
  • Mathematics
  • School Learning
  • Maths MAQ
  • Maths-Formulas
  • Maths-Calculators

Similar Reads

    Hex to Decimal Conversion
    Hex to Decimal Conversion is a fundamental operation in computer science and digital electronics. The operation requires converting numerals from one number system to another, specifically from the Hexadecimal Number System to the Decimal Number System. As we know, a number system is used to represe
    12 min read
    Binary to Decimal Converter
    Binary to Decimal Converter is a free online tool to convert binary to decimal. Converting between binary to decimal is a common task in everyday life. Here, GeeksforGeeks provides a free user-friendly, and efficient online binary decimal Conversion tool to simplify this process and ensure accuracy.
    8 min read
    Decimal to Binary Converter
    The Decimal to Binary Converter is a free, online tool designed to quickly and accurately convert decimal numbers (base 10) to binary numbers (base 2). This tool is especially useful for computer science students, programmers, and anyone who frequently deals with number system conversions.Also, Chec
    8 min read
    How to convert Binary to Hexadecimal?
    A number system is a way of expressing numbers using a consistent set of symbols or digits. The most common number systems are based on different "bases" or "radices," which determine how numbers are represented.Here are some common types of number systems:Decimal Number System (base 10; uses digits
    6 min read
    Binary to Octal Conversion
    Number system is an important part of mathematics. The number system and its conversion is used in various fields of mathematics and computer science. In this article we will explore binary, octal and conversion of binary to octal number system. What is Binary Number System?Number system with its ba
    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