1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Convert octal to hex, w/out converting to Binary

  1. Aug 7, 2008 #1
    I am trying trying to convert a from octal to hex and hex to octal without using binary/dec transform using repeated divison... Logically I thought I could use the hex base in octal for repeat division which is 20 oct

    Example of problem I am trying to solve,

    Convert 326 octal to hex (ans 0xD6)


    326 oct / 20 oct = 16 oct remainder 6 oct = 0x6

    16 oct / 20 oct = 0 oct remainder 16 oct = 14 dec = 0xE!!??

    Reading UP^ most sig to least gives me 0xE6 not D6 i.e. im off by 1 hex char..?

    Another example 372 oct

    372oct /20 oct = 18 r 12
    18/20 = invalid octal number lol!

    Also how would I do hex straight to octal I.e. E7C -> oct?



    Please help...
     
    Last edited: Aug 7, 2008
  2. jcsd
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Can you offer guidance or do you also need help?
Draft saved Draft deleted



Similar Discussions: Convert octal to hex, w/out converting to Binary
Loading...