Difference between revisions of "Manuals/calci/BIN2HEX"

From ZCubes Wiki
Jump to navigation Jump to search
Line 32: Line 32:
 
{| id="TABLE3" class="SpreadSheet blue"
 
{| id="TABLE3" class="SpreadSheet blue"
 
|- class="even"
 
|- class="even"
| class="  " | ''Binary Input''
+
| class="  " | ''Formula''
| class="  " | ''Hexadecimal Output''
+
| class="  " | ''Hex Output''
  
 
|- class="odd"
 
|- class="odd"
| class="sshl_f" | 100
+
| class="sshl_f" | BIN2HEX(100)
 
| class="sshl_f" | 4
 
| class="sshl_f" | 4
  
 
|- class="even"
 
|- class="even"
| class="ssh1_f" | 11110
+
| class="ssh1_f" | BIN2HEX(110011,4)
| class="sshl_f" | 30
+
| class="sshl_f" | 0033
  
 
|- class="odd"
 
|- class="odd"
| class="ssh1_f" | 1010101010101010
+
| class="ssh1_f" | BIN2HEX(11001100,4)
| class="sshl_f" | 42666
+
| class="sshl_f" | 00CC
  
 
|- class="even"
 
|- class="even"
| class="ssh1_f" | 1111111111
+
| class="ssh1_f" | BIN2HEX(101000000000000)
| class="sshl_f" | -1
+
| class="sshl_f" | 4C00
  
 
|- class="odd"
 
|- class="odd"
| class="ssh1_f" | 1111000000
+
| class="ssh1_f" |  
| class="sshl_f" | -64
+
| class="sshl_f" |  
  
 
|- class="even"
 
|- class="even"
| class="ssh1_f" | 1000000000
+
| class="ssh1_f" |  
| class="sshl_f" | -512
+
| class="sshl_f" |  
  
 
|}
 
|}
 
<div align="left">[[Image:calci1.gif]]</div></div>
 
----
 

Revision as of 12:36, 15 November 2013

BIN2HEX(number,padding)

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

BIN2HEX() converts a binary number to its hexadecimal equivalent.

Description

BIN2HEX(number, padding)

This function is used to convert a binary number to its hexadecimal equivalent.

  • 'number' must be a binary number.
  • BIN2HEX returns the error value, when 'num' contains more than 10 characters (10 bits).
  • If the number is negative, Calci returns a NAN(error) value.
  • Calci returns an error, if 'padding' is nonnumeric or negative.

For Example,

BIN2HEX(11111011, 3) returns 0FB

BIN2HEX(1110) returns E

Examples

Formula Hex Output
BIN2HEX(100) 4
BIN2HEX(110011,4) 0033
BIN2HEX(11001100,4) 00CC
BIN2HEX(101000000000000) 4C00