Difference between revisions of "Manuals/calci/BIN2HEX"

From ZCubes Wiki
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...")
 
 
(11 intermediate revisions by the same user not shown)
Line 1: Line 1:
<div id="6SpaceContent" class="zcontent" align="left"> <font color="#484848"><font face="Arial, sans-serif"><font size="2">'''BIN2HEX'''</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">'''num'''</font></font></font><font color="#484848"><font face="Arial, sans-serif"><font size="2">, p)</font></font></font>
+
=BIN2HEX(number,places)=
  
<font color="#484848"><font face="Arial, sans-serif"><font size="2">Where 'num' is the binary number to convert and 'p' is the number of characters to use. </font></font></font>
+
*Where 'number' is the binary number to be converted and  
 +
*'places' is the number of characters to display the output.
  
</div>
+
BIN2HEX() converts a binary number to its hexadecimal equivalent.
----
 
<div id="1SpaceContent" class="zcontent" align="left"> <font color="#484848"><font face="Arial, sans-serif"><font size="2">Converts a binary number to hexadecimal.</font></font></font></div>
 
----
 
<div id="7SpaceContent" class="zcontent" align="left">
 
  
<font color="#484848"><font face="Arial, sans-serif"><font size="2">num' must be a binary number.</font></font></font>
+
== Description ==
  
<font color="#484848"><font face="Arial, sans-serif"><font size="2">BIN2HEX returns the error value, when 'num' contains more than 10 characters (10 bits).</font></font></font>
+
BIN2HEX(number, places)
  
<font color="#484848"><font face="Arial, sans-serif"><font size="2">If number is negative, BIN2HEX shows NAN(error) value.</font></font></font>
+
This function is used to convert a binary number to its hexadecimal equivalent.
  
<font color="#484848"><font face="Arial, sans-serif"><font size="2">BIN2HEX returns the error value, when places are nonnumeric or negative.</font></font></font>
+
*'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").
  
</div>
+
*The most significant bit represents the 'sign' of the number (0=positive, 1=negative). Negative numbers are represented using 2's complement notation.
----
 
<div id="12SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="left">
 
  
BIN2HEX
+
*Positive numbers may be from 0 (000000000) to 130046 (11111111111111110) and negative numbers from -1 (1111111111) to -512 (1000000000).
  
</div></div>
+
*A number preceding with '0' (e.g 01111111111) should be written in text format ("01111111111") to avoid confusion with octal numbers. 
----
 
<div id="8SpaceContent" class="zcontent" align="left"> [javascript:ToggleDiv('divExpCollAsst_4') <font color="#000000"><font face="Arial, sans-serif"><font size="2">Lets see an example,</font></font></font>]
 
  
[javascript:ToggleDiv('divExpCollAsst_4') <font color="#000000"><font face="Arial, sans-serif"><font size="2">BIN2HEX(num, p)</font></font></font>]
+
*If the 'number' exceeds the limit, Calci returns an #ERROR message.
  
<font face="Tahoma, sans-serif"><font size="1">[javascript:ToggleDiv('divExpCollAsst_4') <font color="#000000"><font face="Arial, sans-serif"><font size="2"><nowiki>=BIN2HEX(11111011, 3) is 0FB</nowiki></font></font></font>]</font></font>
+
*If the 'number' is negative, Calci ignores the places and displays 10 digit hexadecimal number.
  
<font face="Tahoma, sans-serif"><font size="1">[javascript:ToggleDiv('divExpCollAsst_4') <font color="#000000"><font face="Arial, sans-serif"><font size="2"><nowiki>=BIN2HEX(1110) is E</nowiki></font></font></font>]</font></font>
+
*If the 'number' is invalid, Calci returns an #ERROR message.
 +
UNIQ45fda82a140a653d-item-3--QINU*If 'places' is not an integer, Calci truncates the value and uses integer part.
  
<br /><br />
+
For Example,
 +
 
 +
BIN2HEX(11111011, 3) ''returns 0FB''
 +
 
 +
BIN2HEX(1110) ''returns E''
 +
 
 +
BIN2HEX(11001100,6.6) ''returns 00000CC''
 +
 
 +
== 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="  " | '''Hex Output'''
| class="  " | Column2
+
 
| Column3
 
| Column4
 
 
|- class="odd"
 
|- class="odd"
| class=" " | Row1
+
| class="sshl_f" | BIN2HEX(100)
| class="sshl_f" | 11111011
+
| class="sshl_f" | 4
| class="sshl_f" | 0FB
+
 
| class="sshl_f" | E
 
| class="sshl_f" |
 
 
|- class="even"
 
|- class="even"
| class=" " | Row2
+
| class="ssh1_f" | BIN2HEX(110011,4)
| class="sshl_f " |
+
| class="sshl_f" | 0033
<div id="2Space_Copy" title="Click and Drag over to AutoFill other cells."></div>
+
 
|
 
| 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" | BIN2HEX(11001100,6)
| class="                                       sshl_f                 " |
+
| class="sshl_f" | 0000CC
|
+
 
|
 
|
 
 
|- class="even"
 
|- class="even"
| Row4
+
| class="ssh1_f" | BIN2HEX(11110000)
|
+
| class="sshl_f" | F0
|
+
 
|
 
| class=" " |
 
|- class="odd"
 
| class=" " | Row5
 
|
 
|
 
|
 
|
 
|- class="even"
 
| Row6
 
|
 
|
 
|
 
|
 
 
|}
 
|}
  
<div align="left">[[Image:calci1.gif]]</div></div>
+
==Related Videos==
----
+
 
 +
{{#ev:youtube|8T4F7WboWPQ|280|center|BIN2HEX}}
 +
 
 +
== See Also ==
 +
 
 +
*[[Manuals/calci/BIN2DEC| BIN2DEC]]
 +
 
 +
*[[Manuals/calci/BIN2OCT| BIN2OCT]]
 +
 
 +
*[[Manuals/calci/HEX2BIN| HEX2BIN]]
 +
 
 +
==References==
 +
 
 +
*[http://en.wikipedia.org/wiki/Binary_number#Hexadecimal Conversion to Hexadecimal Number]

Latest revision as of 14:54, 18 April 2015

BIN2HEX(number,places)

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

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

Description

BIN2HEX(number, places)

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

  • '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.
  • Positive numbers may be from 0 (000000000) to 130046 (11111111111111110) and negative numbers from -1 (1111111111) to -512 (1000000000).
  • A number preceding with '0' (e.g 01111111111) should be written in text format ("01111111111") to avoid confusion with octal numbers.
  • If the 'number' exceeds the limit, Calci returns an #ERROR message.
  • If the 'number' is negative, Calci ignores the places and displays 10 digit hexadecimal number.
  • If the 'number' is invalid, Calci returns an #ERROR message.

?UNIQ45fda82a140a653d-item-3--QINU?*If 'places' is not an integer, Calci truncates the value and uses integer part.

For Example,

BIN2HEX(11111011, 3) returns 0FB

BIN2HEX(1110) returns E

BIN2HEX(11001100,6.6) returns 00000CC

Examples

Formula Hex Output
BIN2HEX(100) 4
BIN2HEX(110011,4) 0033
BIN2HEX(11001100,6) 0000CC
BIN2HEX(11110000) F0

Related Videos

BIN2HEX

See Also

References