Skip to main content
MedCalc
Mail a PDF copy of this page to:
(Your email address will not be added to a mailing list)
working
Show menu Show menu

DEC2HEX function

Description

Hexadecimal representation of a number. DEC2HEX(x) returns the hexadecimal representation of the integer number x.

The hexadecimal numeral system, shortened to HEX, is a numeral system made up of 16 symbols (base 16). The symbols are the 10 decimal numbers 0 to 9 and and six extra symbols taken from the Latin alphabet: specifically A, B, C, D, E and F, where Hexadecimal A = decimal 10, and hexadecimal F = decimal 15.

For example, the hexadecimal number 2AF2 equals the decimal number:

2 × 163 + 10 × 162 + 16 × 161 + 2 × 160 = 10994.

Example

DEC2HEX(255) returns the string value "FF"

Calculator

DEC2HEX(  

Related functions