[ Home ] [ Products ] [ Data Sheets ] [ Support ] [ FAQ ] [ Sales Offices ] [ Request Catalog ] [ Contact duTec ]
The data field of instructions and their responses are in hexadecimal.
Hexadecimal/Decimal Equivalents:
Decimal  0  1  2  3  4  5  6  7  8  9  10  11  12  13  14  15 
Hexadecimal  0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F 
The two examples demonstrate the calculations that convert base 16 hexadecimal numbers to decimal and vice versa.
Example 1: HextoDecimal  

Decimal = (1st hex digit * 4096) + (2nd hex digit * 256) +
(3rd hex digit * 16) + (4th hex digit)
Where each hex digit is the actual decimal equivalent of the hex digit. 

Hex in =  0 
F 
E 
D 
Decimal Equivalent  
      _____  ______  13 * 1 = 
13 

    _____  ______  ______  14 * 16 = 
224 

  _____  ______  _____  ______  15 * 256 = 
2840 

_____  ______  ______  ______  ______  0 * 4096 = 
0 

____ 

4077_{D} 

Therefore, 0FED_{H} = 4077_{D} 
Example 2: DecimaltoHex



This method works by calculating the most signifcant hex digit first and working down to the least significant hex digit. The formula shown only works for a maximum of four hex digits. Any whole number results are converted to hex and the remainder is carried over to determine the next hex digit.  
Decimal in = 4077_{D} 

Most significant hex digit: 
4077/4096 < 1 therefore the most signifcant hex digit is 0. 
2nd hex digit: 
4077/256 = 15+ therefore the 2nd hex digit is F. 
3rd hex digit: 
237 / 16 = 14+ therefore the 3rd hex digit is E. 
4th hex digit: 
therefore the least significant digit is 13 = D. 
OFED_{H} is the hex equivalent 
Copyright 19962001 duTec
email comments or questions to
webmaster@dutec.net