Difference between revisions of "Manuals/calci/OCT2DEC"

From ZCubes Wiki
Jump to navigation Jump to search
Line 3: Line 3:
 
<font color="red">places argument to be included in upcoming version</font>
 
<font color="red">places argument to be included in upcoming version</font>
  
*Where 'number' is the octal number to be converted to decimal number.
+
*Where <math>number</math> is the octal number to be converted to decimal number.
  
 
OCT2DEC() converts an octal number to a decimal number.
 
OCT2DEC() converts an octal number to a decimal number.
Line 18: Line 18:
  
 
*This function is used to convert an octal number to a decimal number.
 
*This function is used to convert an octal number to a decimal number.
*The 'number' should be in the range '7777777000' for negative numbers (DEC -512) to '777' for positive numbers (DEC 511).
+
*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.
 
*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 number is not a valid number, 'Calci' returns an #N/A error message.
+
*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.  
 
*A number preceding with '0' (e.g 013) should be written in text format ("013") to avoid confusion with hexadecimal numbers.  
*If number is not an integer, Calci truncates the value to calculate the output.   
+
*If <math>number</math> is not an integer, Calci truncates the value to calculate the output.   
 
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 -
  

Revision as of 13:30, 13 December 2013

OCT2DEC(number, places)

places argument to be included in upcoming version

  • Where is the octal number to be converted to decimal number.

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

Description

OCT2DEC(number)

For example,

OCT2DEC("100") returns 64 as a result.

OCT2DEC("500") returns '320' 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.

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") 32
OCT2DEC("-55") -45

See Also

References