Difference between revisions of "Manuals/calci/OCT2HEX"

From ZCubes Wiki
Jump to navigation Jump to search
(Created page with "<div id="16SpaceContent" align="left"><div class="ZEditBox" align="justify"> Syntax </div></div> ---- <div id="8SpaceContent" align="left"><div class="ZEditBox" align=...")
 
Line 1: Line 1:
<div id="16SpaceContent" align="left"><div class="ZEditBox" align="justify">
+
=OCT2HEX(number, places)=
  
Syntax
+
*Where 'number' is an octal number to be converted and
 +
*'places' is the number of characters to be used to display the output.
  
</div></div>
+
OCT2HEX() converts an octal number to its hexadecimal equivalent.
----
 
<div id="8SpaceContent" align="left"><div class="ZEditBox" align="justify">'''<font face="Times New Roman">''''''''''''<font size="6"> </font>''' '''''''''</font>'''</div></div>
 
----
 
<div id="11SpaceContent" align="left"><div class="ZEditBox mceEditable" align="justify">
 
  
<font size="5">Description</font>
+
== Description ==
 +
OCT2HEX(number, places)
  
</div></div>
+
For Example,
----
 
<div id="5SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify"> 
 
  
<font color="#484848"><font face="Arial, sans-serif"><font size="2">This function converts an octal number to hexadecimal.</font></font></font>
+
OCT2HEX("300,4") ''returns 00C0''
  
</div></div>
+
OCT2HEX() ''returns ''
----
 
<div id="10SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify"><font size="6">OCT2HEX</font></div></div>
 
----
 
<div id="9SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify"> 
 
  
<font color="#484848"><font face="Arial, sans-serif"><font size="2">Let's see an example</font></font></font>
+
OCT2HEX() ''returns ''
  
<font color="#000080"><font face="Arial, sans-serif"><font size="2"><nowiki>=OCT2HEX(300,4) is 00C0</nowiki></font></font></font>
+
*The 'number' can be
 +
*Output is a 40 bit number. The most significant bit is the sign bit and remaining bits are magnitude bits.
 +
*If 'number' is negative, Calci ignores the places and returns a 10 character (40 bit) hexadecimal number.
 +
*If the 'number' is not an integer, Calci considers the integer part, and displays the output.
 +
*Calci displays an error message, if the 'number' is an invalid decimal number.
 +
*'places' argument can be omitted. Calci displays the hexadecimal output with minimum number of characters necessary.
 +
*'places' is used for padding the output with leading '0's'.
 +
*Calci ignores the 'places', if the output is more than mentioned 'places'.
 +
*Calci ignores the 'places', if the 'places' is non-numeric or negative.
 +
*If 'places' is not an integer, Calci truncates the 'places' value.
 +
*A number preceding with '0' (e.g. 0377) should be written in text format ("0377") to avoid confusion with hexadecimal numbers.
  
</div></div>
+
== Examples ==
----
 
<div id="4SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify"> 
 
  
'''<font color="#484848"><font face="Arial, sans-serif"><font size="2">OCT2HEX</font></font></font><font color="#484848"><font face="Arial, sans-serif"><font size="2">(</font></font></font><font color="#484848"><font face="Arial, sans-serif"><font size="2">N</font></font></font><font color="#484848"><font face="Arial, sans-serif"><font size="2">,p)</font></font></font>'''
+
<div id="1SpaceContent" class="zcontent" align="left">
 
 
<font color="#484848"><font face="Arial, sans-serif"><font size="2">where N</font></font></font><font color="#484848"><font face="Arial, sans-serif"><font size="2">   is the octal number and p is the number of characters to use. </font></font></font>
 
 
 
</div></div>
 
----
 
<div id="6SpaceContent" class="zcontent" align="left">
 
  
 
{| id="TABLE1" class="SpreadSheet blue"
 
{| id="TABLE1" class="SpreadSheet blue"
 
|- class="even"
 
|- class="even"
| class=" " |
+
| class=" " | '''Function'''
| Column1
+
| class="  " | '''HEX Output'''
| Column2
+
 
| Column3
 
| Column4
 
 
|- class="odd"
 
|- class="odd"
| class=" " | Row1
+
| class="sshl_f" | OCT2HEX("511")
| class="sshl_f" | 00C0
+
| class="sshl_f" |  
| class="                             " |
+
 
| class=" " |
 
| class=" " |
 
 
|- class="even"
 
|- class="even"
| class=" " | Row2
+
| class="sshl_f" | OCT2HEX("433,3")
| class="f52543                                          " |
+
| class="sshl_f" |  
| class=" SelectTD" |
+
 
<div id="6Space_Handle" title="Click and Drag to resize CALCI Column/Row/Cell. It is EZ!"></div><div id="6Space_Copy" title="Click and Drag over to AutoFill other cells."></div>
 
| class=" " |
 
| class=" " |
 
 
|- class="odd"
 
|- class="odd"
| Row3
+
| class="sshl_f" | OCT2HEX("78,-4")
| class=" " |
+
| class="sshl_f" |  
| class=" " |
+
 
| class=" " |
 
| class=" " |
 
 
|- class="even"
 
|- class="even"
| Row4
+
| class="sshl_f" | OCT2HEX("78.78")
| class=" " |
+
| class="sshl_f" |  
| class=" " |
+
 
| class=" " |
 
| class=" " |
 
 
|- class="odd"
 
|- class="odd"
| class=" " | Row5
+
| class="sshl_f" | OCT2HEX("-364")
| class=" " |
+
| class="sshl_f" |  
| class=" " |
 
| class=" " |
 
| class=" " |
 
|- class="even"
 
| Row6
 
| class=" " |
 
| class=" " |
 
| class=" " |
 
| class=" " |
 
 
|}
 
|}
  
<div align="left">[[Image:calci1.gif]]</div></div>
+
== See Also ==
----
+
 
 +
*[[Manuals/calci/HEX2OCT| HEX2OCT]]
 +
 
 +
*[[Manuals/calci/BIN2HEX| BIN2HEX]]
 +
 
 +
*[[Manuals/calci/DEC2HEX| DEC2HEX]]
 +
 
 +
==References==
 +
 
 +
*[http://en.wikipedia.org/wiki/Octal Octal to Hexadecimal Conversion]

Revision as of 09:14, 11 December 2013

OCT2HEX(number, places)

  • Where 'number' is an octal number to be converted and
  • 'places' is the number of characters to be used to display the output.

OCT2HEX() converts an octal number to its hexadecimal equivalent.

Description

OCT2HEX(number, places)

For Example,

OCT2HEX("300,4") returns 00C0

OCT2HEX() returns

OCT2HEX() returns

  • The 'number' can be
  • Output is a 40 bit number. The most significant bit is the sign bit and remaining bits are magnitude bits.
  • If 'number' is negative, Calci ignores the places and returns a 10 character (40 bit) hexadecimal number.
  • If the 'number' is not an integer, Calci considers the integer part, and displays the output.
  • Calci displays an error message, if the 'number' is an invalid decimal number.
  • 'places' argument can be omitted. Calci displays the hexadecimal output with minimum number of characters necessary.
  • 'places' is used for padding the output with leading '0's'.
  • Calci ignores the 'places', if the output is more than mentioned 'places'.
  • Calci ignores the 'places', if the 'places' is non-numeric or negative.
  • If 'places' is not an integer, Calci truncates the 'places' value.
  • A number preceding with '0' (e.g. 0377) should be written in text format ("0377") to avoid confusion with hexadecimal numbers.

Examples

Function HEX Output
OCT2HEX("511")
OCT2HEX("433,3")
OCT2HEX("78,-4")
OCT2HEX("78.78")
OCT2HEX("-364")

See Also

References