Difference between revisions of "Manuals/calci/BIN2HEX"
Jump to navigation
Jump to search
(Created page with "<div id="6SpaceContent" class="zcontent" align="left"> <font color="#484848"><font face="Arial, sans-serif"><font size="2">'''BIN2HEX'''</font></font></font><font color="#484...") |
|||
Line 1: | Line 1: | ||
− | + | =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 == | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
<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=" " | ''Binary Input'' |
− | + | | class=" " | ''Hexadecimal Output'' | |
− | | class=" " | | + | |
− | |||
− | |||
|- class="odd" | |- class="odd" | ||
− | + | | class="sshl_f" | 100 | |
− | + | | class="sshl_f" | 4 | |
− | | class="sshl_f" | | + | |
− | | class="sshl_f" | | ||
− | |||
|- class="even" | |- class="even" | ||
− | | class=" | + | | class="ssh1_f" | 11110 |
− | | class="sshl_f | + | | class="sshl_f" | 30 |
− | + | ||
− | |||
− | |||
− | |||
− | |||
|- class="odd" | |- class="odd" | ||
− | | | + | | class="ssh1_f" | 1010101010101010 |
− | | class=" | + | | class="sshl_f" | 42666 |
− | + | ||
− | |||
− | |||
|- class="even" | |- class="even" | ||
− | | | + | | class="ssh1_f" | 1111111111 |
− | + | | class="sshl_f" | -1 | |
− | + | ||
− | | | ||
− | | class=" | ||
|- class="odd" | |- class="odd" | ||
− | | class=" " | | + | | class="ssh1_f" | 1111000000 |
− | | | + | | class="sshl_f" | -64 |
− | + | ||
− | | | ||
− | |||
|- class="even" | |- class="even" | ||
− | | | + | | class="ssh1_f" | 1000000000 |
− | | | + | | class="sshl_f" | -512 |
− | | | + | |
− | | | ||
− | |||
|} | |} | ||
<div align="left">[[Image:calci1.gif]]</div></div> | <div align="left">[[Image:calci1.gif]]</div></div> | ||
---- | ---- |
Revision as of 12:29, 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
Binary Input | Hexadecimal Output |
100 | 4 |
11110 | 30 |
1010101010101010 | 42666 |
1111111111 | -1 |
1111000000 | -64 |
1000000000 | -512 |