Difference between revisions of "Manuals/calci/HEX2DEC"

From ZCubes Wiki
Jump to navigation Jump to search
(Created page with "<div id="6SpaceContent" class="zcontent" align="left"> <font color="#000000"><font face="Arial, sans-serif"><font size="2">'''HEX2DEC'''</font></font><font face="Arial, san...")
 
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
<div id="6SpaceContent" class="zcontent" align="left">
+
=HEX2DEC(number, places)=
  
<font color="#000000"><font face="Arial, sans-serif"><font size="2">'''HEX2DEC'''</font></font><font face="Arial, sans-serif"><font size="2">(</font></font><font face="Arial, sans-serif"><font size="2">'''num'''</font></font><font face="Arial, sans-serif"><font size="2">)</font></font></font>
+
*Where <math>number</math> is the hexadecimal number to be converted to decimal number.
  
<font color="#000000"><font face="Arial, sans-serif"><font size="2">Where 'num' is the hexadecimal number.</font></font></font>
+
*<math>places</math> is the number of characters to display the output.
  
</div>
+
HEX2DEC() converts a hexadecimal number to a decimal number.
----
 
<div id="1SpaceContent" class="zcontent" align="left">
 
  
<font color="#000000"><font face="Arial, sans-serif"><font size="2">This function ronverts a hexadecimal number to decimal.</font></font></font>
+
== Description ==
  
</div>
+
HEX2DEC(number, places)
----
 
<div id="12SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="left">
 
  
HEX2DEC
+
For example,
  
</div></div>
+
HEX2DEC("F") ''returns 15'' as a result.
----
 
<div id="8SpaceContent" class="zcontent" align="left"> <font color="#000000"><font face="Arial, sans-serif"><font size="2">Lets see an example,</font></font></font>
 
  
<font color="#000000"><font face="Arial, sans-serif"><font size="2">HEX2DEC(num)</font></font></font>
+
HEX2DEC("01D",3) ''returns 029'' as a result.
  
<font color="#000000"><font face="Arial, sans-serif"><font size="2"><nowiki>=HEX2DEC("55") is 85</nowiki></font></font></font>
+
*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 <math>number</math> preceding with '0' (e.g 013) should be written in text format ("013") to avoid confusion with octal numbers. 
 +
*A <math>number</math> 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 <math>number</math> is not a valid number, 'Calci' returns an #ERROR message.
 +
*<math>places</math> argument is used to return the output with leading zeros. If <math>places</math> argument is not used, 'Calci' uses the minimum number of characters required to display the output.
 +
*If <math>places</math> is not an integer, Calci rounds the value and uses the integer part as input.
 +
*If <math>places</math> is less than the number of output characters, Calci ignores the places and uses the minimum number of characters required to display the output.
  
<font color="#000000"><font face="Arial, sans-serif"><font size="2"><nowiki>=HEX2DEC("3DA408B") is 64635019</nowiki></font></font></font>
+
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 ==
  
</div>
 
----
 
<div id="10SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify">Syntax </div><div class="ZEditBox"><center></center></div></div>
 
----
 
<div id="3SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify">Examples </div></div>
 
----
 
<div id="11SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify">Description </div></div>
 
----
 
 
<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'''
| Column1
+
| class="  " | '''Decimal Output'''
| class="  " | Column2
+
 
| Column3
 
| Column4
 
 
|- class="odd"
 
|- class="odd"
| class=" " | Row1
 
 
| class="sshl_f" | 85
 
| class="sshl_f" | 85
| class="sshl_f" |
+
| class="sshl_f" | 133
|
+
 
| class="                                                            sshl_f  " |
 
 
|- class="even"
 
|- class="even"
| class=" " | Row2
+
| class="ssh1_f" | 110,3.5
| class="sshl_f" | 64635019
+
| class="sshl_f" | 0272
| class="SelectTD SelectTD " |
+
 
<div id="2Space_Handle" title="Click and Drag to resize CALCI Column/Row/Cell. It is EZ!"></div><div id="2Space_Copy" title="Click and Drag over to AutoFill other cells."></div>
 
|
 
|
 
 
|- class="odd"
 
|- class="odd"
| Row3
+
| class="ssh1_f" | FFAFFAFFA
| class="                                       sshl_f      " |
+
| class="sshl_f" | 68635570170
|
+
 
|
 
|
 
|- class="even"
 
| Row4
 
|
 
|
 
|
 
| class="  " |
 
|- class="odd"
 
| class=" " | Row5
 
|
 
|
 
|
 
|
 
 
|- class="even"
 
|- class="even"
| Row6
+
| class="ssh1_f" | FFFFFFFFFF
|
+
| class="sshl_f" | 109951162775
|
 
|
 
|
 
 
|}
 
|}
  
<div align="left">[[Image:calci1.gif]]</div></div>
+
==Related Videos==
----
+
 
 +
{{#ev:youtube|Ts6mw16YSlQ|280|center|HEX2DEC}}
 +
 
 +
== See Also ==
 +
 
 +
*[[Manuals/calci/DEC2HEX| DEC2HEX]]
 +
 
 +
*[[Manuals/calci/HEX2BIN| HEX2BIN]]
 +
 
 +
*[[Manuals/calci/HEX2OCT| HEX2OCT]]
 +
 
 +
*[[Manuals/calci/BIN2HEX| BIN2HEX]]
 +
 
 +
*[[Manuals/calci/OCT2HEX| OCT2HEX]]
 +
 
 +
==References==
 +
*[http://simple.wikipedia.org/wiki/Hexadecimal_numeral_system#Hexadecimal_and_decimal Hexadecimal to Decimal Conversion]

Latest revision as of 14:10, 22 April 2015

HEX2DEC(number, places)

  • Where is the hexadecimal number to be converted to decimal number.
  • 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 preceding with '0' (e.g 013) should be written in text format ("013") to avoid confusion with octal numbers.
  • A 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 is not a valid number, 'Calci' returns an #ERROR message.
  • argument is used to return the output with leading zeros. If argument is not used, 'Calci' uses the minimum number of characters required to display the output.
  • If is not an integer, Calci rounds the value and uses the integer part as input.
  • If 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.

Examples

HEX Input Decimal Output
85 133
110,3.5 0272
FFAFFAFFA 68635570170
FFFFFFFFFF 109951162775

Related Videos

HEX2DEC

See Also

References