Difference between revisions of "Manuals/calci/BIN2OCT"

From ZCubes Wiki
Jump to navigation Jump to search
Line 14: Line 14:
 
*Calci returns an #ERROR message if 'number' contains more than 10 characters (10 bits).
 
*Calci returns an #ERROR message if 'number' contains more than 10 characters (10 bits).
  
*If 'number' is negative, BIN2HEX shows an #ERROR message.
+
*If 'number' is negative, Calci displays an #ERROR message.
  
 
*If 'places' is not an integer, it is truncated.
 
*If 'places' is not an integer, it is truncated.
Line 29: Line 29:
 
|- class="even"
 
|- class="even"
 
| class="  " | '''Formula'''
 
| class="  " | '''Formula'''
| class="  " | '''Hex Output'''
+
| class="  " | '''Octal Output'''
  
 
|- class="odd"
 
|- class="odd"
| class="sshl_f" | BIN2HEX(100)
+
| class="sshl_f" | BIN2OCT(100)
 
| class="sshl_f" | 4
 
| class="sshl_f" | 4
  
 
|- class="even"
 
|- class="even"
| class="ssh1_f" | BIN2HEX(110011,4)
+
| class="ssh1_f" | BIN2OCT(110011,4)
| class="sshl_f" | 0033
+
| class="sshl_f" |  
  
 
|- class="odd"
 
|- class="odd"
| class="ssh1_f" | BIN2HEX(11001100,6)
+
| class="ssh1_f" | BIN2OCT(11001100,6)
| class="sshl_f" | 0000CC
+
| class="sshl_f" |  
  
 
|- class="even"
 
|- class="even"
| class="ssh1_f" | BIN2HEX(11110000)  
+
| class="ssh1_f" | BIN2OCT(11110000)  
| class="sshl_f" | F0
+
| class="sshl_f" |  
  
 
|}
 
|}
Line 53: Line 53:
 
*[[Manuals/calci/BIN2DEC| BIN2DEC]]
 
*[[Manuals/calci/BIN2DEC| BIN2DEC]]
  
*[[Manuals/calci/BIN2OCT| BIN2OCT]]
+
*[[Manuals/calci/BIN2HEX| BIN2HEX]]
  
*[[Manuals/calci/HEX2BIN| HEX2BIN]]
+
*[[Manuals/calci/OCT2BIN| OCT2BIN]]
  
 
==References==
 
==References==
  
*[http://en.wikipedia.org/wiki/Binary_number#Hexadecimal Conversion to Hexadecimal Number]
+
*[http://en.wikipedia.org/wiki/Binary_number#Octal Conversion to Octal Number]

Revision as of 22:17, 15 November 2013

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.
  • Calci returns an #ERROR message if 'number' contains more than 10 characters (10 bits).
  • If 'number' is negative, Calci displays an #ERROR message.
  • If 'places' is not an integer, it is truncated.
  • Calci returns an #ERROR message if 'places' are nonnumeric or negative.

BIN2OCT(1100100) returns 144

Examples

Formula Octal Output
BIN2OCT(100) 4
BIN2OCT(110011,4)
BIN2OCT(11001100,6)
BIN2OCT(11110000)

See Also

References