Difference between revisions of "Manuals/calci/DEC2BIN"

From ZCubes Wiki
Jump to navigation Jump to search
Line 21: Line 21:
 
DEC2BIN(100) is 100100
 
DEC2BIN(100) is 100100
  
</div>
+
== Examples ==
----
 
<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="5SpaceContent" class="zcontent" align="left">
 
 
 
<font color="#000000"><font face="Arial, sans-serif"><font size="2">This function converts a decimal number to binary number.</font></font></font>
 
 
 
</div>
 
----
 
 
<div id="1SpaceContent" class="zcontent" align="left">
 
<div id="1SpaceContent" class="zcontent" align="left">
  
 
{| id="TABLE1" class="SpreadSheet blue"
 
{| id="TABLE1" class="SpreadSheet blue"
 
|- class="even"
 
|- class="even"
| class="  " |
+
| '''Decimal Input'''
<div id="1Space_Copy" title="Click and Drag over to AutoFill other cells."></div>
+
| class="  " | '''Binary Output'''
| Column1
+
 
| class="  " | Column2
 
| class="  " | Column3
 
| class="  " | Column4
 
 
|- class="odd"
 
|- class="odd"
| class=" " | Row1
 
 
| class="sshl_f" | 1010
 
| class="sshl_f" | 1010
 
| class="sshl_f" | 1100100
 
| class="sshl_f" | 1100100
| class="sshl_f" |
+
 
| class="sshl_f" |
 
 
|- class="even"
 
|- class="even"
| class="  " | Row2
 
| class="sshl_f" |
 
| class="sshl_f SelectTD SelectTD" |
 
<div id="1Space_Handle" title="Click and Drag to resize CALCI Column/Row/Cell. It is EZ!"></div><div id="1Space_Copy" title="Click and Drag over to AutoFill other cells."></div>
 
 
| class="sshl_f" |
 
| class="sshl_f" |
 
| class="sshl_f" |
 
| class="sshl_f" |
 +
 
|- class="odd"
 
|- class="odd"
| Row3
 
| class="sshl_f" |
 
| class="sshl_f" |
 
 
| class="sshl_f" |
 
| class="sshl_f" |
 
| class="sshl_f" |
 
| class="sshl_f" |
 +
 
|- class="even"
 
|- class="even"
| Row4
 
| class="sshl_f" |
 
| class="sshl_f" |
 
 
| class="sshl_f" |
 
| class="sshl_f" |
 
| class="sshl_f" |
 
| class="sshl_f" |
 +
 
|- class="odd"
 
|- class="odd"
| class=" " | Row5
 
| class="sshl_f" |
 
| class="sshl_f" |
 
| class="sshl_f" |
 
| class="sshl_f" |
 
|- class="even"
 
| Row6
 
| class="sshl_f" |
 
| class="sshl_f" |
 
 
| class="sshl_f" |
 
| class="sshl_f" |
 
| class="sshl_f" |
 
| class="sshl_f" |
 
|}
 
|}
 
<div align="left">[[Image:calci1.gif]]</div></div>
 
----
 

Revision as of 06:36, 14 November 2013

DEC2BIN(number, padding)

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


DEC2BIN() function converts a decimal number to its binary equivalent.


Description

DEC2BIN(number, padding)

  • DEC2BIN returns the NAN(error) value, when number is negative or nonnumeric.
  • DEC2BIN returns the NAN(error) value, whenever the padding is nonnumeric, zero or negative.

Lets see an example,

DEC2BIN(10, 5) is 1010

DEC2BIN(100) is 100100

Examples

Decimal Input Binary Output
1010 1100100