Dec2Bin Formula
|
Decimal
Number
|
Binary
Equivalent
|
|
|
|
|
|
0
|
0
|
=DEC2BIN(C4)
|
|
|
|
|
1
|
1
|
=DEC2BIN(C5)
|
|
|
|
|
2
|
10
|
=DEC2BIN(C6)
|
|
|
|
|
3
|
11
|
=DEC2BIN(C7)
|
|
|
|
|
511
|
111111111
|
=DEC2BIN(C8)
|
|
|
|
|
512
|
#NUM!
|
=DEC2BIN(C9)
|
|
|
|
|
-1
|
1111111111
|
=DEC2BIN(C10)
|
|
|
|
|
-2
|
1111111110
|
=DEC2BIN(C11)
|
|
|
|
|
-3
|
1111111101
|
=DEC2BIN(C12)
|
|
|
|
|
-511
|
1000000001
|
=DEC2BIN(C13)
|
|
|
|
|
-512
|
1000000000
|
=DEC2BIN(C14)
|
|
|
|
|
|
|
|
|
|
|
|
Decimal
Number
|
Places To Pad
|
Binary
Equivalent
|
|
|
|
|
1
|
1
|
1
|
=DEC2BIN(C17,D17)
|
||
|
1
|
2
|
01
|
=DEC2BIN(C18,D18)
|
||
|
1
|
3
|
001
|
=DEC2BIN(C19,D19)
|
||
|
1
|
9
|
000000001
|
=DEC2BIN(C20,D20)
|
||
|
-1
|
1
|
1111111111
|
=DEC2BIN(C21,D21)
|
||
|
|
|
|
|
|
|
What Does It Do ?
|
|
|
|
|
||
This
function converts a decimal number to its binary equivalent.
|
|
|
||||
It can
only cope with decimals ranging from -512 to 511.
|
|
|
||||
The
result can be padded with leading 0 zeros, although this is ignored for
negatives.
|
||||||
|
|
|
|
|
|
|
Syntax
|
|
|
|
|
|
|
=DEC2BIN(DecimalNumber,PlacesToPad)
|
|
|
|
|||
The
PlacesToPad is optional.
|
|
|
|
|||
|
|
|
|
|
|
|
Formatting
|
|
|
|
|
||
No
special formatting is needed.
|
|
|
|