Convert Hexadecimal To Octal

Write a program to convert hexadecimal to octal

Hexadecimal is a base-16 number system. It uses sixteen digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, and F. The digits are called hexits. A hexit is the smallest unit of information in a computer. A hexit can be used to represent a single value, such as 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, or F, or it can be used to represent a single state, such as on or off.

Octal is a base-8 number system. It uses only eight digits: 0, 1, 2, 3, 4, 5, 6, and 7. The digits are called octits. An octit is the smallest unit of information in a computer. An octit can be used to represent a single value, such as 0, 1, 2, 3, 4, 5, 6, or 7, or it can be used to represent a single state, such as on or off.

To convert a hexadecimal number to octal, we can use the following algorithm:

  1. Convert the hexadecimal number to decimal.
  2. Convert the decimal number to octal.
Input : A Output : 12

Contributors

This program is made possible by the following contributors:

AMiracle-creator
harshraj8843
madhusgowda
anandfresh
RiteshK-611
AdityaNarayanPradhan
ohad1s
joao-vitor-souza
UsmanFani
CodingWithHardik
jyotik09
rahmat-dev
amoghrajesh
Anuj-Rathore24

Heart with ribbonBecome a SponsorHeart with ribbon

Become a sponsor and help us maintain and improve this project. Every contribution counts. Thank you!