Register to reply 
Convert octal to hex, w/out converting to Binary 
Share this thread: 
#1
Aug2504, 08:11 PM

P: 6

I have been trying to convert a from octal to hex and hex to octal without using binary. I believe the method is called repeated divison.
Example of problem I am trying to solve, Convert 173 octal(123 dec) to hex 173 oct / 16 oct = 10 oct remainder 13 oct 10 oct / 16 oct = 0 oct remainder 10 oct Reading up (1st division remainder is less sig. digit, and last is most sig.) answer 1013 hex = 4115 dec. WRONG answer should be 7B Hex 


#2
Aug2604, 09:06 AM

HW Helper
Thanks
P: 10,366

123=7*16 +11 which is 7B in hexadecimal form. The conversion is possible also without using decimal form. Working in the "hexadecimal word" 8=10/2 173 (oct) = 3+7*8+1*8*8 =3+7*10/2+1*10/2*10/2= =3+(6*10/2+10/2) + 10/2*8= =3+(3*10+8)+(4*10)=(3+4)*10+(3+8)=7*10 + B = 7B (It is similar backwards. You know that the base of the hexadecimal numbers is 20 in your octal system. If you have 173(hex), for example, it is 3+7*20+1*20^2=3+(7*2)*10+4*100= 3+(10+6)*10+4*100=3+6*10+5*100=563.) ehild 


#3
Aug2604, 09:47 AM

P: 499

173 oct / 20 oct = 7 oct remainder 13 oct (B hex) 7 oct / 20 oct = 0 oct remainder 7 Reading up (1st division remainder is less sig. digit, and last is most sig.) answer 7B hex 


Register to reply 
Related Discussions  
Decimal to binary, Decimal to Octal confusion!  Electrical Engineering  10  
Converting decimal to binary  Calculus & Beyond Homework  5  
Octal Multiplication confusion  Engineering, Comp Sci, & Technology Homework  5  
Questions about octal buffer  Electrical Engineering  4  
Question on binary stars & binary stars  Introductory Physics Homework  1 