Convert octal to hex, w/out converting to Binary

In summary: CORRECTIn summary, the conversation discusses the process of converting from octal to hexadecimal and vice versa without using binary. The method used is repeated division and the correct representation of the hexadecimal base must be used for the conversion to work. The remainder must also be interpreted as a single hexadecimal digit.
  • #1
dk702
6
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
  • #2
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
  • #3
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
 

Related to Convert octal to hex, w/out converting to Binary

1. How do you convert octal to hex without converting to binary?

To convert octal to hex without converting to binary, you can use the following steps:

1. Start by writing down the octal number.

2. Group the octal digits into groups of 3, starting from the right. If there are not enough digits to form a group of 3, add a 0 to the left.

3. Convert each group of 3 octal digits into a single hex digit according to the following table:

Octal Hex
0 0
1 1
2 2
3 3
4 4
5 5
6 6
7 7
10 8
11 9
12 A
13 B
14 C
15 D
16 E
17 F

4. Combine the converted hex digits together to get the final hex number.

2. What is the difference between octal and hex?

Octal and hex are both number systems that are commonly used to represent binary numbers in a more compact and easier to read format. Octal uses a base of 8, while hex uses a base of 16. This means that octal numbers have 8 possible digits (0-7), while hex numbers have 16 possible digits (0-9, A-F).

3. Can you convert a large octal number to hex without converting it to binary first?

Yes, you can convert a large octal number to hex without converting it to binary first by following the same steps as mentioned in the first question. The only difference is that you will have to group the octal digits into groups of 3 starting from the right, instead of starting from the left.

4. How do you convert a negative octal number to hex?

To convert a negative octal number to hex, you can follow these steps:

1. Start by writing down the absolute value of the negative octal number.

2. Convert the absolute value to hex using the steps mentioned in the first question.

3. Add a negative sign to the converted hex number.

5. What is the quickest way to convert octal to hex without a calculator?

The quickest way to convert octal to hex without a calculator is to use the following trick:

1. Start by writing down the octal number.

2. Group the octal digits into groups of 4 starting from the right. If there are not enough digits to form a group of 4, add a 0 to the left.

3. Convert each group of 4 octal digits into a single hex digit according to the following table:

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
3
Views
925
  • Engineering and Comp Sci Homework Help
Replies
2
Views
4K
Replies
4
Views
1K
  • Introductory Physics Homework Help
Replies
2
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
4K
  • Engineering and Comp Sci Homework Help
Replies
13
Views
4K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
10K
  • Engineering and Comp Sci Homework Help
Replies
6
Views
6K
  • Electrical Engineering
Replies
10
Views
16K
  • Engineering and Comp Sci Homework Help
Replies
7
Views
9K
Top
Octal Hex