Convert octal to hex, w/out converting to Binary

  • Thread starter Thread starter dk702
  • Start date Start date
  • Tags Tags
    Binary Convert
AI Thread Summary
To convert octal to hexadecimal without using binary, the method of repeated division is employed. The example of converting 173 octal (which is 123 decimal) to hex shows that mixing bases can lead to incorrect results if not handled properly. The correct conversion involves recognizing that the hexadecimal base is 20 in the octal system, allowing for the interpretation of remainders as single hexadecimal digits. The accurate conversion yields 7B hex, derived from the correct application of the repeated division method. Understanding the base representation and remainder interpretation is crucial for successful conversions.
dk702
Messages
6
Reaction score
0
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
 
Physics news on Phys.org
dk702 said:
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


answer should be 7B Hex

You can not mix octal and decimal numbers, and that "16" was decimal. Apply the repeated division on the decimal form of octal 173:

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
 
  • Like
Likes Parmi
dk702 said:
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

You can get this to work if you 1) Use the correct representation of the hexadecimal base (20 oct) and 2) Interpret remainders as single hexadecimal digits (which they must be).

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
 
I multiplied the values first without the error limit. Got 19.38. rounded it off to 2 significant figures since the given data has 2 significant figures. So = 19. For error I used the above formula. It comes out about 1.48. Now my question is. Should I write the answer as 19±1.5 (rounding 1.48 to 2 significant figures) OR should I write it as 19±1. So in short, should the error have same number of significant figures as the mean value or should it have the same number of decimal places as...
Thread 'A cylinder connected to a hanging mass'
Let's declare that for the cylinder, mass = M = 10 kg Radius = R = 4 m For the wall and the floor, Friction coeff = ##\mu## = 0.5 For the hanging mass, mass = m = 11 kg First, we divide the force according to their respective plane (x and y thing, correct me if I'm wrong) and according to which, cylinder or the hanging mass, they're working on. Force on the hanging mass $$mg - T = ma$$ Force(Cylinder) on y $$N_f + f_w - Mg = 0$$ Force(Cylinder) on x $$T + f_f - N_w = Ma$$ There's also...

Similar threads

Back
Top