My Math Forum  

Go Back   My Math Forum > College Math Forum > Number Theory

Number Theory Number Theory Math Forum


Reply
 
LinkBack Thread Tools Display Modes
October 1st, 2011, 12:15 AM   #1
Newbie
 
Joined: Oct 2011

Posts: 2
Thanks: 0

Ways of STRAIGHTLY converting hexadecimal to octal & inverse

how can i convert octal numbers to hexadecimal numbers straightly (Means not the one we first convert to decimal and nor the one we convert to binary then to the other) just hexadecimal to octal and octal to hexadecimal ... THANK YOU!!!
sciencexboy is offline  
 
October 1st, 2011, 02:30 AM   #2
Member
 
Joined: Apr 2010

Posts: 65
Thanks: 0

Re: Ways of STRAIGHTLY converting hexadecimal to octal & inv

Code:
                             B1A53                                // hex
               0B1             |             A53                  // 3 digits
   0 0 0 0 | 1 0 1 1 | 0 0 0 1 | 1 0 1 0 | 0 1 0 1 | 0 0 1 1      // binary
        |       |       |      |      |       |       |           // 3 bits
     0      2       6      1      5       1       2      3        // octal

B1A53 (hex) == 2615123(oct)

3 digits hex <==> 4 digits oct tabble
Xitami is offline  
October 1st, 2011, 05:01 AM   #3
Newbie
 
Joined: Oct 2011

Posts: 2
Thanks: 0

Re: Ways of STRAIGHTLY converting hexadecimal to octal & inv

Thanks for the reply, but i was looking for other ways to convert octal to hexadecimal straightly...not octal > binary >hexa and hexa > binary > octal.
Just hexa > octal and octal > hexa....May i know of anyways please?Thanks
sciencexboy is offline  
October 1st, 2011, 08:32 AM   #4
Global Moderator
 
CRGreathouse's Avatar
 
Joined: Nov 2006
From: UTC -5

Posts: 16,046
Thanks: 938

Math Focus: Number theory, computational mathematics, combinatorics, FOM, symbolic logic, TCS, algorithms
Re: Ways of STRAIGHTLY converting hexadecimal to octal & inv

You can use a lookup table or calculation to make the conversion "direct" as you say, but using binary as an intermediate will be at least as fast. Generally, if you're converting from base b^x to base b^y, converting to base b^gcd(x,y) is a good first step.
CRGreathouse is offline  
Reply

  My Math Forum > College Math Forum > Number Theory

Tags
converting, hexadecimal, inverse, octal, straightly, ways



Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Signed hexadecimal computation! eChung00 Computer Science 3 March 4th, 2013 02:59 PM
Binary to hexadecimal Igo Computer Science 3 September 7th, 2012 03:58 AM
Hexadecimal Addition... Primalscientist Computer Science 13 April 20th, 2011 12:41 PM
Hexadecimal Notation Primalscientist Computer Science 3 April 17th, 2011 03:31 AM
I need some help on binary, hexadecimal and decimal numbers! johnny Computer Science 2 October 13th, 2007 02:00 PM





Copyright © 2018 My Math Forum. All rights reserved.