2
$\begingroup$

Convert Hexadecimal number to Octal - $(FD56.52A)_{16}$ to octal

My answer - $(176526.2452)_8$

Convert Octal to Hexadecimal $(37.27)_8$

My answer - $(1F.5C)_{16}$.

Correct or incorrect?

Please help.

$\endgroup$
0
0
$\begingroup$

First of all, use $ {inline formula} $ and $$ {paragraph formula} $$ to typeset mathematics, to get proper subscripts.

One strategy is to just convert to decimal and back, but a much better strategy is to remember that in hexadecimal each digit corresponds to four binary digits ($2^4=16$) and in octal each digit is three bits ($2^3=8$).

$$ ({\rm FD56.52A})_{16} = (1111'1101'0101'0110\,.0101'0010'1010)_2 $$

Then we regroup to three digits and pad with zeros:

$$ (001'111'110'101'010'110\,.010'100'101'010)_2 = (176526.2452)_8 $$

You can use this method the other around way too.

$\endgroup$
0
1
$\begingroup$

The easiest way to do that is perhaps to go trought binary

$ FD56.52A_{16}= 1111\ 1101\ 0101\ 0110.0101\ 0010\ 1010_2 $

and then to form groups of 3 digits left and right from the decimal point and padding with zeros the extremes if necessary

$ FD56.52A16_{16}= 001\ 111\ 110\ 101\ 010\ 110.010\ 100\ 101\ 010_2 =176526.2452_8$

So I think your answer is correct.

The other is the same but reversed .

$\endgroup$
2
  • $\begingroup$ Can you please tell me - Why in calculator Im not able to input a Hexadecimal number with a DOT in it? $\endgroup$ – CuriousBeing Oct 27 '13 at 9:28
  • 1
    $\begingroup$ @user2923027 This is by convetion in computer science, in most programming languages libraries exist to parse integers in a variety of bases (usually from 2 to 36) but not usually for floating point numbers. $\endgroup$ – Karl Damgaard Asmussen Oct 27 '13 at 22:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.