Manuals/calci/HEX2DEC
Jump to navigation
Jump to search
HEX2DEC(number, places)
- Where Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle number} is the hexadecimal number to be converted to decimal number.
- Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle places} is the number of characters to display the output.
HEX2DEC() converts a hexadecimal number to a decimal number.
Description
HEX2DEC(number, places)
For example,
HEX2DEC("F") returns 15 as a result.
HEX2DEC("01D",3) returns 029 as a result.
- This function is used to convert a hexadecimal number to a decimal number.
- Hexadecimal number uses digits from 0 to 9 and characters from A to F. The number can also be entered in text format (e.g "1F").
- A Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle number} preceding with '0' (e.g 013) should be written in text format ("013") to avoid confusion with octal numbers.
- A Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle number} can be up to 10 characters (40 bits). The most significant bit is the sign bit and remaining are magnitude bits. A negative number is represented in 2's complement format.
- If the Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle number} is not a valid number, 'Calci' returns an #ERROR message.
- Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle places} argument is used to return the output with leading zeros. If Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle places} argument is not used, 'Calci' uses the minimum number of characters required to display the output.
- If Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle places} is not an integer, Calci rounds the value and uses the integer part as input.
- If Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle places} is less than the number of output characters, Calci ignores the places and uses the minimum number of characters required to display the output.
Below are few examples that show the use of combination of functions and get the result in decimal -
1)SUM(HEX2DEC("FF"),HEX2DEC("57")) returns 342 as a result.
2)HEX2DEC("65") - HEX2DEC("42") returns 35 as a result.