Difference between revisions of "Manuals/calci/OCT2BIN"
Jump to navigation
Jump to search
Line 73: | Line 73: | ||
==References== | ==References== | ||
− | *[http://en.wikipedia.org/wiki/ | + | *[http://en.wikipedia.org/wiki/Octal Octal Numbers] |
Revision as of 16:49, 10 December 2013
OCT2BIN(number, places)
- Where 'number' is the octal integer to be converted and
- 'places' is the number of characters to display the output.
OCT2BIN() function converts an octal number to its binary equivalent.
Description
OCT2BIN(number, places)
For example,
OCT2BIN(15, 4) returns 1101
OCT2BIN() returns
OCT2BIN(30,5.5) returns
- The 'number' should be in the range '7777777000' to '777'. If it exceeds the limit, Calci gives a #NUM! error.
- Calci returns an #ERROR, when the 'number' is nonnumeric.
- For a negative number, Calci ignores the places and displays a 10 bit binary output. Most significant bit is the sign bit and remaining are magnitude bits.
- 'places' argument is used to return the output with leading zeros. If 'places' argument is not used, 'Calci' uses the minimum number of characters required to display the binary output.
- If 'places' is negative, Calci ignores the places and displays a 10 bit binary output.
- If 'places' is not an integer, Calci truncates the value and uses the integer part as input.
- A number preceding with '0' (e.g. 077) should be written in text format ("077") to avoid confusion with hexadecimal numbers.
Examples
Function | Binary Output |
OCT2BIN(75,8) | |
OCT2BIN(10.5,4) | |
OCT2BIN(100) | |
OCT2BIN(-56) | |
OCT2BIN(757575,-9) |