Jenny's Hobby Farm

(Previously Webelfin Design)

Jenny's Hobby Farm Home Page

I (Jenny ) used to be an assembler language programmer back in the days of the dinosaurs, nearly 50 years ago. I have written these pages for anyone who is now trying to learn the hex system of numbers that I used to have to interpret on a regular basis in the old days.

HOW TO CONVERT ANY HEX NUMBER TO DECIMAL and BINARY

Go directly to EXAMPLE CONVERSION - HEX TO BINARY

EXAMPLE CONVERSION - HEX TO DECIMAL

Dec = decimal, Dec Equi = Decimal Equivalent

Hex Decimal Equivalent
9AC3 39,619

Hex

= Decimal
Hex

 

= Dec
Comment Hexadecimal number
to be converted
Decimal Equivalent Dec Equi

0=0

1=1

2=2

4=4

5=5

6=6

7=7

8=8

9=9

A=10

B=11

C=12

D=13

E=14

F=15

Columns are numbered from right to left, starting at column zero, not column one col
3
col
2
col
1
col
0
 
Write the hex number with one digit per column 9 A C 3  
Convert the hex digit to decimal 9 10 12 3  
Multiply each digit by 16 to the power of n, where n is the column number 9 x (16^3) 10 x (16^2) 12 x (16^1) 3 x (16^0)  
Put the answer in this row, and add all the answers together 36,864 + 2,560 + 192 + 3 = 39,619

DEFINITIONS:

16^3 = 16 to the power of 3 = (16 x 16 x 16) = 4,096

16^0 = 16 to the power of 0 = 1 (anything to the power of zero equals one.)

EXPLANATION:

Each hex digit is multiplied by 16^n, where n is its column number, numbering from right to left, starting at column zero (not column 1).

Then all the answers are added together. This gives you the decimal equivalent of the hex number you started with.

A GENERAL FORMULA CAN BE DERIVED FOR THOSE FAMILIAR WITH MATHEMATICAL NOTATION

Decimal Equiavalent = Σ (Hn x 16^n) from n = 0 to n

where Σ means "sum", n is the column number, and Hn is the hex digit in the n-th column

 

EXAMPLE CONVERSION - HEX TO BINARY

Hex = Hexadecimal, Dec = decimal, Bin = Binary, Bin Equi = Binary Equivalent

Hex Binary Equivalent
9AC3 1001 1010     1100  0011

 

Hex

 

= Binary
Hex

 

= Bin
Comment Hex number
to be converted
Binary Equivalent Bin Equi

0=0000

1=0001

2=0010

3=0011

4=0100

5=0101

6=0110

7=0111

8=1000

9=1001

A=1010

B=1011

C=1100

D=1101

E=1110

F=1111

Hex is directly related to binary and the order of conversion does not matter. You can start at column 3 or column zero. col
3
col
2
col
1
col
0
 
Write the hex number with one digit per column 9 A C 3  
Convert each hex number directly into binary 1001 1010 1100 0011  
The usual use of binary is in computers where the binary digits are called bits and are grouped by 8's to make one byte (one byte = 8 bits) 1001  1010 1100  0011 1001 1010  1100 0011 1001 1010

1100 0011

These 2 rows of numbers should be written on 1 line