Difference between revisions of "Manuals/calci/HEX2DEC"
Jump to navigation
Jump to search
Line 11: | Line 11: | ||
HEX2DEC(number) | HEX2DEC(number) | ||
− | For example, HEX2DEC() ''returns | + | For example, HEX2DEC("F") ''returns 15'' as a result. |
− | HEX2DEC() ''returns | + | HEX2DEC("01D") ''returns 29'' as a result. |
*This function is used to convert a hexadecimal number to a decimal number. | *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 | + | *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 number preceding with '0' (e.g 013) should be written in text format ("013") to avoid confusion with octal numbers. | |
− | + | *A number can be up to 10 characters (40 bits). The most significant bit is the sign bit and remaining are magnitude bits. | |
− | |||
− | |||
− | |||
− | *A number preceding with '0' (e.g | ||
− | |||
− | *A | ||
− | |||
− | |||
*If the number is not a valid number, 'Calci' returns an #ERROR message. | *If the number is not a valid number, 'Calci' returns an #ERROR message. | ||
Below are few examples that show the use of combination of functions and get the result in decimal - | Below are few examples that show the use of combination of functions and get the result in decimal - | ||
− | 1)SUM( | + | 1)SUM(HEX2DEC("FF") + HEX2DEC("57")) ''returns 342'' as a result. |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | HEX2DEC | + | 2)HEX2DEC("65")- HEX2DEC("42") ''returns 35'' as a result. |
− | + | == Examples == | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
<div id="2SpaceContent" class="zcontent" align="left"> | <div id="2SpaceContent" class="zcontent" align="left"> | ||
{| id="TABLE3" class="SpreadSheet blue" | {| id="TABLE3" class="SpreadSheet blue" | ||
|- class="even" | |- class="even" | ||
− | | class=" " | | + | | class=" " | '''HEX Input''' |
− | + | | class=" " | '''Decimal Output''' | |
− | | class=" " | | + | |
− | |||
− | |||
|- class="odd" | |- class="odd" | ||
− | |||
| class="sshl_f" | 85 | | class="sshl_f" | 85 | ||
− | | class="sshl_f" | | + | | class="sshl_f" | 133 |
− | + | ||
− | |||
|- class="even" | |- class="even" | ||
− | | class=" | + | | class="ssh1_f" | 110 |
− | | class="sshl_f" | | + | | class="sshl_f" | 272 |
− | + | ||
− | |||
− | |||
− | |||
|- class="odd" | |- class="odd" | ||
− | + | | class="ssh1_f" | FFAFFAFFA | |
− | | class=" | + | | class="sshl_f" | 68635570170 |
− | + | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | | class=" " | | ||
− | |||
− | |||
− | |||
− | |||
|- class="even" | |- class="even" | ||
− | | | + | | class="ssh1_f" | FFFFFFFFFF |
− | + | | class="sshl_f" | -1 | |
− | | | ||
− | | | ||
− | | | ||
|} | |} | ||
− | |||
− | |||
− |
Revision as of 16:42, 4 December 2013
HEX2DEC(number, places)
places argument to be included in upcoming version
- Where 'number' is the hexadecimal number to be converted to decimal number.
HEX2DEC() converts a hexadecimal number to a decimal number.
Description
HEX2DEC(number)
For example, HEX2DEC("F") returns 15 as a result.
HEX2DEC("01D") returns 29 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 number preceding with '0' (e.g 013) should be written in text format ("013") to avoid confusion with octal numbers.
- A number can be up to 10 characters (40 bits). The most significant bit is the sign bit and remaining are magnitude bits.
- If the number is not a valid number, 'Calci' returns an #ERROR message.
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.
Examples
HEX Input | Decimal Output |
85 | 133 |
110 | 272 |
FFAFFAFFA | 68635570170 |
FFFFFFFFFF | -1 |