Difference between revisions of "Manuals/calci/OCT2DEC"

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="2SpaceContent" align="left"><div class="ZEditBox" align=...")
 
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<div id="16SpaceContent" align="left"><div class="ZEditBox" align="justify">
+
=OCT2DEC(number, places)=
  
Syntax
+
*Where <math>number</math> is the octal number to be converted to decimal number.
  
</div></div>
+
*<math>places</math> is the number of characters to display the output.
----
 
<div id="2SpaceContent" align="left"><div class="ZEditBox" align="justify">
 
  
Examples
+
OCT2DEC() converts an octal number to a decimal number.
  
</div></div>
+
== Description ==
----
 
<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>
+
OCT2DEC(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 decimal.</font></font></font>
+
*OCT2DEC("100") ''returns 64'' as a result.
  
</div></div>
+
*OCT2DEC("500",4) ''returns '0320' as a result.
----
 
<div id="10SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify"><font size="6">OCT2DEC</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>
+
*This function is used to convert an octal number to a decimal number.
 +
*The <math>number</math> should be in the range '7777777000' for negative numbers (DEC -512) to '777' for positive numbers (DEC 511).
 +
*A 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 <math>number</math> is not a valid number, 'Calci' returns an #N/A error message.
 +
*A number preceding with '0' (e.g 013) should be written in text format ("013") to avoid confusion with hexadecimal numbers.
 +
*If <math>number</math> is not an integer, Calci truncates the value to calculate the output.
 +
*<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.
 +
 
 +
Below are few examples that show the use of combination of functions and get the result in decimal -
  
<font color="#484848"><font face="Tahoma, sans-serif"><font size="1"><nowiki>=OCT2DEC(67) is 55</nowiki></font></font></font>
+
1)SUM(OCT2DEC("65"), OCT2DEC("11")) ''returns 62'' as a result.
  
</div></div>
+
2)OCT2DEC("654") - OCT2DEC("54") ''returns 384'' as a result.
----
 
<div id="4SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify"
 
  
<font color="#484848"><font face="Arial, sans-serif"><font size="2">'''OCT2DEC'''</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">)</font></font></font>
+
== Examples ==
  
<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 that is to be convert. </font></font></font>
+
<div id="2SpaceContent" class="zcontent" align="left">
  
</div></div>
+
{| id="TABLE3" class="SpreadSheet blue"
----
+
|- class="even"
<div id="6SpaceContent" class="zcontent" align="left">
+
| class=" " | '''Octal Input'''
 +
| class=" " | '''Decimal Output'''
  
{| id="TABLE1" class="SpreadSheet blue"
 
|- class="even"
 
| class=" " |
 
| Column1
 
| Column2
 
| Column3
 
| Column4
 
 
|- class="odd"
 
|- class="odd"
| class=" " | Row1
+
| class="sshl_f" | OCT2DEC("15")
| class="sshl_f" | 55
+
| class="sshl_f" | 13
| class="                   " |
+
 
| class=" " |
 
| class=" " |
 
 
|- class="even"
 
|- class="even"
| class=" " | Row2
+
| class="ssh1_f" | OCT2DEC("40.44")
| class="f52543                    " |
+
| class="sshl_f" | #NUM!
| class=" sshl_f 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=" sshl_f" |
 
| class=" sshl_f" |
 
 
|- class="odd"
 
|- class="odd"
| Row3
+
| class="ssh1_f" | OCT2DEC("55",4)
| class="  " |
+
| class="sshl_f" | 0045
| class=" " |
 
| class=" " |
 
| class=" " |
 
|- class="even"
 
| Row4
 
| class=" " |
 
| class=" " |
 
| class=" " |
 
| class=" " |
 
|- class="odd"
 
| class=" " | Row5
 
| class=" " |
 
| class=" " |
 
| class=" " |
 
| class=" " |
 
|- class="even"
 
| Row6
 
| class=" " |
 
| class=" " |
 
| class=" " |
 
| class=" " |
 
 
|}
 
|}
  
<div align="left">[[Image:calci1.gif]]</div></div>
+
==Related Videos==
----
+
 
 +
{{#ev:youtube|QIkfAkcfy0w|280|center|OCT2DEC}}
 +
 
 +
== See Also ==
 +
 
 +
*[[Manuals/calci/DEC2OCT| DEC2OCT]]
 +
 
 +
*[[Manuals/calci/OCT2BIN| OCT2BIN]]
 +
 
 +
*[[Manuals/calci/OCT2HEX| OCT2HEX]]
 +
 
 +
==References==
 +
 
 +
*[http://simple.wikipedia.org/wiki/Octal_numeral_system#Octal_and_decimal Octal to Decimal Conversion]

Latest revision as of 10:49, 13 May 2015

OCT2DEC(number, places)

  • Where is the octal number to be converted to decimal number.
  • is the number of characters to display the output.

OCT2DEC() converts an octal number to a decimal number.

Description

OCT2DEC(number, places)

  • For example,
  • OCT2DEC("100") returns 64 as a result.
  • OCT2DEC("500",4) returns '0320' as a result.
  • This function is used to convert an octal number to a decimal number.
  • The should be in the range '7777777000' for negative numbers (DEC -512) to '777' for positive numbers (DEC 511).
  • A 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 is not a valid number, 'Calci' returns an #N/A error message.
  • A number preceding with '0' (e.g 013) should be written in text format ("013") to avoid confusion with hexadecimal numbers.
  • If is not an integer, Calci truncates the value to calculate the output.
  • 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(OCT2DEC("65"), OCT2DEC("11")) returns 62 as a result.

2)OCT2DEC("654") - OCT2DEC("54") returns 384 as a result.

Examples

Octal Input Decimal Output
OCT2DEC("15") 13
OCT2DEC("40.44") #NUM!
OCT2DEC("55",4) 0045

Related Videos

OCT2DEC

See Also

References