Difference between revisions of "Manuals/calci/OCT2BIN"
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=...") |
|||
(7 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | + | =OCT2BIN(number, places)= | |
− | + | *Where <math>number</math> is the octal integer to be converted and | |
− | < | + | *<math>places</math> 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(7.5,5) ''returns 00111'' | |
− | |||
− | |||
− | |||
− | |||
− | + | OCT2BIN(30,5.5) ''returns 011000'' | |
− | < | + | *The <math>number</math> should be in the range '7777777000' for negative numbers to '777' for positive numbers. If it exceeds the limit, Calci gives a #NUM! error. |
− | </ | + | *If <math>number</math> is not an integer, Calci truncates the value and uses the integer part as input. |
− | + | ||
− | <div id=" | + | *Calci returns an #N/A error, when the <math>number</math> 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. | ||
+ | |||
+ | *<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 binary output. | ||
+ | |||
+ | *If <math>places</math> is negative, Calci ignores the places and displays a 10 bit binary output. | ||
+ | |||
+ | *If <math>places</math> 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 == | ||
+ | |||
+ | <div id="1SpaceContent" class="zcontent" align="left"> | ||
{| id="TABLE1" class="SpreadSheet blue" | {| id="TABLE1" class="SpreadSheet blue" | ||
|- class="even" | |- class="even" | ||
− | | class=" " | | + | | class=" " | '''Function''' |
− | | | + | | class=" " | '''Binary Output''' |
− | + | ||
− | | | ||
− | |||
|- class="odd" | |- class="odd" | ||
− | | class=" " | | + | | class="sshl_f" | OCT2BIN(75,8) |
− | | class="sshl_f" | | + | | class="sshl_f" | 00111101 |
− | + | ||
− | |||
− | |||
|- class="even" | |- class="even" | ||
− | | class=" | + | | class="sshl_f" | OCT2BIN(10.5,4) |
− | | class=" | + | | class="sshl_f" | 1000 |
− | + | ||
− | |||
− | |||
|- class="odd" | |- class="odd" | ||
− | | | + | | class="sshl_f" | OCT2BIN(100) |
− | | | + | | class="sshl_f" | 0001000000 |
− | | | + | |
− | | | ||
− | |||
|- class="even" | |- class="even" | ||
− | | | + | | class="sshl_f" | OCT2BIN(-56) |
− | | | + | | class="sshl_f" | 1111010010 |
− | | | + | |
− | | | ||
− | |||
|- class="odd" | |- class="odd" | ||
− | | class=" " | | + | | class="sshl_f" | OCT2BIN(757,-10) |
− | + | | class="sshl_f" | 111101111 | |
− | |||
− | |||
− | | | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | | | ||
|} | |} | ||
− | + | ==Related Videos== | |
− | + | ||
− | + | {{#ev:youtube|2Ieo9i2zwVw|280|center|OCT2BIN}} | |
+ | |||
+ | == See Also == | ||
+ | |||
+ | *[[Manuals/calci/OCT2HEX| OCT2HEX]] | ||
+ | |||
+ | *[[Manuals/calci/BIN2OCT| BIN2OCT]] | ||
− | + | *[[Manuals/calci/DEC2OCT| DEC2OCT]] | |
− | + | ==References== | |
− | + | *[http://en.wikipedia.org/wiki/Octal Octal Number Conversion] | |
− |
Latest revision as of 19:32, 26 April 2015
OCT2BIN(number, places)
- Where is the octal integer to be converted and
- 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(7.5,5) returns 00111
OCT2BIN(30,5.5) returns 011000
- The should be in the range '7777777000' for negative numbers to '777' for positive numbers. If it exceeds the limit, Calci gives a #NUM! error.
- If is not an integer, Calci truncates the value and uses the integer part as input.
- Calci returns an #N/A error, when the 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.
- 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 binary output.
- If is negative, Calci ignores the places and displays a 10 bit binary output.
- If 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) | 00111101 |
OCT2BIN(10.5,4) | 1000 |
OCT2BIN(100) | 0001000000 |
OCT2BIN(-56) | 1111010010 |
OCT2BIN(757,-10) | 111101111 |