Convert Octal To Hexadecimal

Write a program to convert octal to hexadecimal

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.

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.

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

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

Contributors

This program is made possible by the following contributors:

harshraj8843
pramod-karkhani
Rohan-Kalgutkar
RiteshK-611
YinzeZhang
AdityaNarayanPradhan
anandfresh
joao-vitor-souza
UsmanFani
sahooankeeta
DiamonndAde
rakibul-islam-raju
ridsuteri

Heart with ribbonBecome a SponsorHeart with ribbon

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