Difference between revisions of "Manuals/calci/OCT2BIN"

From ZCubes Wiki
Jump to navigation Jump to search
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
=OCT2BIN(number, places)=
 
=OCT2BIN(number, places)=
  
*Where 'number' is the octal integer to be converted and
+
*Where <math>number</math> is the octal integer to be converted and
  
*'places' is the number of characters to display the output.
+
*<math>places</math> is the number of characters to display the output.
  
 
OCT2BIN() function converts an octal number to its binary equivalent.
 
OCT2BIN() function converts an octal number to its binary equivalent.
Line 11: Line 11:
 
OCT2BIN(number, places)
 
OCT2BIN(number, places)
  
*The 'number' should be in the range '7777777000' to '777'. If it exceeds the limit, Calci gives a #NUM! error.
+
For example,
  
*Calci returns an #ERROR, when the 'number' is nonnumeric.
+
OCT2BIN(15, 4) ''returns 1101''
  
*'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.
+
OCT2BIN(7.5,5) ''returns 00111''
  
*If 'places' is negative, Calci ignores the places and displays a 10 bit binary output. Most significant bit is the sign bit and remaining are magnitude bits.
+
OCT2BIN(30,5.5) ''returns 011000''  
  
*If 'places' is not an integer, Calci truncates the value and uses the integer part as input.
+
*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.
  
*A number preceding with '0' (e.g. 0377) should be written in text format ("0377") to avoid confusion with octal numbers.
+
*If <math>number</math> is not an integer, Calci truncates the value and uses the integer part as input.
  
For example,
+
*Calci returns an #N/A error, when the <math>number</math> is nonnumeric.
  
DEC2BIN(10, 4) ''returns 1010''
+
*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.
  
DEC2BIN(100) ''returns 0001100100''
+
*<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.
  
DEC2BIN(30,5.5) ''returns 011110''
+
*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="16SpaceContent" align="left"><div class="ZEditBox" align="justify">
+
<div id="1SpaceContent" class="zcontent" align="left">
  
Syntax
+
{| id="TABLE1" class="SpreadSheet blue"
 +
|- class="even"
 +
| class="  " | '''Function'''
 +
| class="  " | '''Binary Output'''
  
</div></div>
+
|- class="odd"
----
+
| class="sshl_f" | OCT2BIN(75,8)
<div id="2SpaceContent" align="left"><div class="ZEditBox" align="justify">
+
| class="sshl_f" | 00111101
  
Examples
+
|- class="even"
 +
| class="sshl_f" | OCT2BIN(10.5,4)
 +
| class="sshl_f" | 1000
  
</div></div>
+
|- class="odd"
----
+
| class="sshl_f" | OCT2BIN(100)
<div id="8SpaceContent" align="left"><div class="ZEditBox" align="justify">'''<font face="Times New Roman">''''''''''''<font size="6"> </font>''' '''''''''</font>'''</div></div>
+
| class="sshl_f" | 0001000000
----
 
<div id="11SpaceContent" align="left"><div class="ZEditBox mceEditable" align="justify">
 
  
<font size="5">Description</font>
+
|- class="even"
 +
| class="sshl_f" | OCT2BIN(-56)
 +
| class="sshl_f" | 1111010010
  
</div></div>
+
|- class="odd"
----
+
| class="sshl_f" | OCT2BIN(757,-10)
<div id="5SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify"> 
+
| class="sshl_f" | 111101111
 +
|}
  
<font color="#484848"><font face="Arial, sans-serif"><font size="2">This function converts an octal number to binary.</font></font></font>
+
==Related Videos==
  
</div></div>
+
{{#ev:youtube|2Ieo9i2zwVw|280|center|OCT2BIN}}
----
 
<div id="10SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify"><font size="6">OCT2BIN</font></div></div>
 
----
 
<div id="4SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify"> 
 
  
<font color="#484848"><font face="Arial, sans-serif"><font size="2">'''OCT2BIN'''</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">,'''p''')</font></font></font>
+
== See Also ==
  
<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 and p is the number of characters to use. </font></font></font>
+
*[[Manuals/calci/OCT2HEX| OCT2HEX]]
  
</div></div>
+
*[[Manuals/calci/BIN2OCT| BIN2OCT]]
----
 
<div id="6SpaceContent" class="zcontent" align="left">
 
 
 
{| id="TABLE1" class="SpreadSheet blue"
 
|- class="even"
 
| class=" " |
 
| Column1
 
| Column2
 
| Column3
 
| Column4
 
|- class="odd"
 
| class=" " | Row1
 
| class="sshl_f" | 101
 
| class="                              " |
 
|
 
|
 
|- class="even"
 
| class="  " | Row2
 
| class="f52543                                                                                  " |
 
| class="SelectTD" |
 
|
 
|
 
|- class="odd"
 
| Row3
 
|
 
|
 
|
 
|
 
|- class="even"
 
| Row4
 
|
 
|
 
|
 
|
 
|- class="odd"
 
| class=" " | Row5
 
|
 
|
 
|
 
|
 
|- class="even"
 
| Row6
 
|
 
|
 
|
 
|
 
|}
 
 
 
<div align="left">[[Image:calci1.gif]]</div></div>
 
----
 
<div id="1SpaceContent" class="zcontent" align="left">
 
  
Let's see an example
+
*[[Manuals/calci/DEC2OCT| DEC2OCT]]
  
I.e. =OCT2BIN(5,3) is 101
+
==References==
  
</div>
+
*[http://en.wikipedia.org/wiki/Octal Octal Number Conversion]
----
 

Latest revision as of 20: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

Related Videos

OCT2BIN

See Also

References