Difference between revisions of "Manuals/calci/BIN2OCT"

From ZCubes Wiki
Jump to navigation Jump to search
 
(8 intermediate revisions by the same user not shown)
Line 8: Line 8:
 
== Description ==
 
== Description ==
  
*'number' must be a binary number.
+
BIN2OCT(number,places)
  
*Calci returns an #ERROR message if 'number' contains more than 10 characters (10 bits).
+
*'number' must be a binary number. Binary number is represented using digits 1 or 0 only. The number can also be entered in text format (e.g "101").
  
*If 'number' is negative, BIN2HEX shows an #ERROR message.
+
*The most significant bit represents the 'sign' of the number (0=positive, 1=negative). Negative numbers are represented using 2's complement notation.
 +
 
 +
*A number preceding with '0' (e.g 0111111111) should be written in text format ("0111111111") to avoid confusion with octal numbers.
 +
 
 +
*Calci returns an #ERROR message if 'number' contains more than 10 characters (10 bits).
 +
 
 +
*If 'number' is negative, Calci ignores the places, if any and displays the octal output.
  
 
*If 'places' is not an integer, it is truncated.
 
*If 'places' is not an integer, it is truncated.
  
*Calci returns an #ERROR message if 'places' are nonnumeric or negative.
+
*If 'places' are nonnumeric, Calci returns an #ERROR message.  
  
</div>
+
*If 'places' is negative, Calci ignores the places and displays the octal output.
----
 
<div id="12SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="left">
 
  
BIN2OCT
+
For Example,
  
</div></div>
+
BIN2OCT(1100100) ''returns 144''
----
 
<div id="8SpaceContent" class="zcontent" align="left"> 
 
  
<font color="#000000"><font face="Arial, sans-serif"><font size="2">BIN2OCT(num, p)</font></font></font>
+
BIN2OCT(100100100,4) ''returns 0444''
  
<font color="#000000"><font face="Arial, sans-serif"><font size="2"><nowiki>=BIN2OCT(1100100) is 144</nowiki></font></font></font>
+
BIN2OCT("00111",1.3) ''returns 07''
 +
 
 +
== Examples ==
  
</div>
 
----
 
<div id="10SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify">Syntax </div><div class="ZEditBox"><center></center></div></div>
 
----
 
<div id="4SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify">Remarks </div></div>
 
----
 
<div id="3SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify">Examples </div></div>
 
----
 
<div id="11SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify">Description </div></div>
 
----
 
 
<div id="2SpaceContent" class="zcontent" align="left">
 
<div id="2SpaceContent" class="zcontent" align="left">
  
 
{| id="TABLE3" class="SpreadSheet blue"
 
{| id="TABLE3" class="SpreadSheet blue"
 
|- class="even"
 
|- class="even"
| class=" " |
+
| class=" " | '''Formula'''
| Column1
+
| class="  " | '''Octal Output'''
| class="  " | Column2
+
 
| Column3
 
| Column4
 
 
|- class="odd"
 
|- class="odd"
| class=" " | Row1
+
| class="sshl_f" | BIN2OCT(100)
| class="sshl_f" | 1100100
+
| class="sshl_f" | 4
| class="sshl_f" | 144
+
 
| class="sshl_f" |
 
| class="sshl_f" |
 
 
|- class="even"
 
|- class="even"
| class=" " | Row2
+
| class="ssh1_f" | BIN2OCT(110011,4)
| class="sshl_f" |
+
| class="sshl_f" | 0063
| class=" SelectTD SelectTD" |
+
 
<div id="2Space_Handle" title="Click and Drag to resize CALCI Column/Row/Cell. It is EZ!"></div><div id="2Space_Copy" title="Click and Drag over to AutoFill other cells."></div>
 
|
 
|
 
 
|- class="odd"
 
|- class="odd"
| Row3
+
| class="ssh1_f" | BIN2OCT(11001100,6)
| class="                                       sshl_f                 " |
+
| class="sshl_f" | 000314
|
+
 
|
 
|
 
 
|- class="even"
 
|- class="even"
| Row4
+
| class="ssh1_f" | BIN2OCT(111111111)
|
+
| class="sshl_f" | 777
|
+
 
|
 
| class=" " |
 
|- class="odd"
 
| class=" " | Row5
 
|
 
|
 
|
 
|
 
|- class="even"
 
| Row6
 
|
 
|
 
|
 
|
 
 
|}
 
|}
  
<div align="left">[[Image:calci1.gif]]</div></div>
+
==Related Videos==
----
+
 
 +
{{#ev:youtube|FDuofN1MX0Y|280|center|BIN2OCT}}
 +
 
 +
== See Also ==
 +
 
 +
*[[Manuals/calci/BIN2DEC| BIN2DEC]]
 +
 
 +
*[[Manuals/calci/BIN2HEX| BIN2HEX]]
 +
 
 +
*[[Manuals/calci/OCT2BIN| OCT2BIN]]
 +
 
 +
==References==
 +
 
 +
*[http://en.wikipedia.org/wiki/Binary_number#Octal Conversion to Octal Number]

Latest revision as of 15:07, 18 April 2015

BIN2OCT(number,places)

  • Where 'number' is a binary number to be converted and
  • 'places' is the number of characters to be used to display the output.

BIN2OCT converts a binary number to its octal equivalent.

Description

BIN2OCT(number,places)

  • 'number' must be a binary number. Binary number is represented using digits 1 or 0 only. The number can also be entered in text format (e.g "101").
  • The most significant bit represents the 'sign' of the number (0=positive, 1=negative). Negative numbers are represented using 2's complement notation.
  • A number preceding with '0' (e.g 0111111111) should be written in text format ("0111111111") to avoid confusion with octal numbers.
  • Calci returns an #ERROR message if 'number' contains more than 10 characters (10 bits).
  • If 'number' is negative, Calci ignores the places, if any and displays the octal output.
  • If 'places' is not an integer, it is truncated.
  • If 'places' are nonnumeric, Calci returns an #ERROR message.
  • If 'places' is negative, Calci ignores the places and displays the octal output.

For Example,

BIN2OCT(1100100) returns 144

BIN2OCT(100100100,4) returns 0444

BIN2OCT("00111",1.3) returns 07

Examples

Formula Octal Output
BIN2OCT(100) 4
BIN2OCT(110011,4) 0063
BIN2OCT(11001100,6) 000314
BIN2OCT(111111111) 777

Related Videos

BIN2OCT

See Also

References