Difference between revisions of "Manuals/calci/DEC2OCT"
Jump to navigation
Jump to search
Line 32: | Line 32: | ||
{| id="TABLE3" class="SpreadSheet blue" | {| id="TABLE3" class="SpreadSheet blue" | ||
|- class="even" | |- class="even" | ||
− | | class=" " | | + | | class=" " | '''Function''' |
− | | | + | | class=" " | '''Octal Output''' |
− | + | ||
− | | | ||
− | |||
|- class="odd" | |- class="odd" | ||
− | | class=" " | | + | | class="sshl_f" | DEC2OCT(512) |
− | | class="sshl_f" | | + | | class="sshl_f" | 0000000200 |
− | + | ||
− | |||
− | |||
|- class="even" | |- class="even" | ||
− | | class=" | + | | class="sshl_f" | DEC2OCT(512,3) |
− | | class=" | + | | class="sshl_f" | 200 |
− | + | ||
− | |||
− | |||
− | |||
|- class="odd" | |- class="odd" | ||
− | + | | class="sshl_f" | DEC2OCT(2378,-4) | |
− | | class="sshl_f | + | | class="sshl_f" | 94A |
− | | | + | |
− | | | ||
− | |||
|- class="even" | |- class="even" | ||
− | | | + | | class="sshl_f" | DEC2OCT(7878.78) |
− | | | + | | class="sshl_f" | 0000001EC6 |
− | | | + | |
− | | | ||
− | |||
|- class="odd" | |- class="odd" | ||
− | | class=" " | | + | | class="sshl_f" | DEC2OCT("-364") |
− | + | | class="sshl_f" | FFFFFFFE94 | |
− | | | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | | | ||
|} | |} | ||
− | + | == See Also == | |
− | + | ||
+ | *[[Manuals/calci/DEC2BIN| DEC2BIN]] | ||
+ | |||
+ | *[[Manuals/calci/DEC2HEX| DEC2HEX]] | ||
+ | |||
+ | *[[Manuals/calci/OCT2DEC| OCT2DEC]] | ||
+ | |||
+ | ==References== | ||
+ | |||
+ | *[http://en.wikipedia.org/wiki/Octal Octal Numbers] |
Revision as of 16:27, 17 November 2013
DEC2OCT(number, places)
- Where 'number' is the decimal number to be converted, and
- 'places' is the number of characters to display the output.
DEC2OCT() is used to convert decimal number to its octal equivalent.
Description
DEC2OCT(number, places)
- The 'number' can be up to 20 digits (i.e. in-between -99999999999999999999 and -99999999999999999999).
- 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.
- 'places' argument can be omitted. Then, Calci displays the hexadecimal output with minimum number of characters necessary.
- 'places' is used for padding the output with leading '0's'.
For Example, DEC2OCT(68,3) DEC2OCT( DEC2OCT(
- Calci displays an error message, if the 'number' is an invalid decimal number.
- If the 'number' is not an integer, Calci considers the integer part, and displays the output.
- Calci ignores the 'places' to display the output, if the output is more than mentioned 'places'.
- Calci ignores the 'places' to display the output, if the 'places' is non-numeric or negative.
- If 'places' is not an integer, Calci truncates the 'places' value.
Function | Octal Output |
DEC2OCT(512) | 0000000200 |
DEC2OCT(512,3) | 200 |
DEC2OCT(2378,-4) | 94A |
DEC2OCT(7878.78) | 0000001EC6 |
DEC2OCT("-364") | FFFFFFFE94 |