hi,im stucking in the program c about to write a programe to convert a 4-digit octal number X into the corresponding hexadecimal number Y. i know exactly how octmal convert to hexa numbers but i dont know how to write them out
The Octal numbering goes from 0 to 7 (each number is 3 bits).
The Hex numbering goes from 0 to F (each number is 4 bits).
When you write out the numbers, the 4 digit Octal has 4 X 3 bits = 12 bits.
When you write out 12 bits in Hex it wil be 12 / 4 = 3 digits.