Changes

Jump to navigation Jump to search
81 bytes removed ,  17:56, 22 April 2015
no edit summary
Line 1: Line 1:  
=BIN2DEC(number,places)=
 
=BIN2DEC(number,places)=
   −
<font color="red">places argument to be included in upcoming version</font>
+
*Where 'number' is the binary number to be converted to decimal number.
   −
*Where 'number' is the binary number to be converted to decimal number.
+
*'places' is the number of characters to display the output.  
    
BIN2DEC() converts a binary number to a decimal number.
 
BIN2DEC() converts a binary number to a decimal number.
Line 9: Line 9:  
== Description ==
 
== Description ==
   −
BIN2DEC(number)
+
BIN2DEC(number,places)
   −
For example, BIN2DEC(101) ''returns 5'' as a result.
+
For example, BIN2DEC(101,3) ''returns 005'' as a result.
    
             BIN2DEC(11110) ''returns 30'' as a result.  
 
             BIN2DEC(11110) ''returns 30'' as a result.  
Line 25: Line 25:  
*Positive numbers may be from 0 (000000000) to 130046 (11111111111111110) and negative numbers from -1 (1111111111) to -512 (1000000000).
 
*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.  
+
*A number preceding with '0' (e.g 01111111111) should be written in text format ("01111111111") to avoid confusion with octal numbers.  
 +
 
 +
*'places' argument can be omitted. Then, Calci displays the octal output with minimum number of characters necessary.
 +
 
 +
*'places' is used for padding the output with leading '0's.
    
*A binary number (e.g '101') is converted to decimal number (base 2) as -
 
*A binary number (e.g '101') is converted to decimal number (base 2) as -
Line 54: Line 58:     
|- class="even"
 
|- class="even"
| class="ssh1_f" | 11110
+
| class="ssh1_f" | 11110,3
| class="sshl_f" | 30
+
| class="sshl_f" | 030
    
|- class="odd"
 
|- class="odd"
 
| class="ssh1_f" | 1010101010101010
 
| class="ssh1_f" | 1010101010101010
| class="sshl_f" | 42666
+
| class="sshl_f" | 43690
    
|- class="even"
 
|- class="even"
 
| class="ssh1_f" | 1111111111  
 
| class="ssh1_f" | 1111111111  
| class="sshl_f" | -1
+
| class="sshl_f" | 1023
    
|- class="odd"
 
|- class="odd"
 
| class="ssh1_f" | 1111000000
 
| class="ssh1_f" | 1111000000
| class="sshl_f" | -64
+
| class="sshl_f" | 960
    
|- class="even"
 
|- class="even"
 
| class="ssh1_f" | 1000000000  
 
| class="ssh1_f" | 1000000000  
| class="sshl_f" | -512
+
| class="sshl_f" | 512
    
|}
 
|}
   −
===ZOS Examples===
+
==Related Videos==
DEC2BIN(0..10)
+
{{#ev:youtube|tfKe8PPI2zs|280|center|BIN2DEC}}
 
  −
{| class="wikitable"
  −
|-
  −
! number !! DEC2BIN
  −
|-
  −
| 0 || 0000000000
  −
|-
  −
| 1 || 0000000001
  −
|-
  −
| 2 || 0000000010
  −
|-
  −
| 3 || 0000000011
  −
|-
  −
| 4 || 0000000100
  −
|-
  −
| 5 || 0000000101
  −
|-
  −
| 6 || 0000000110
  −
|-
  −
| 7 || 0000000111
  −
|-
  −
| 8 || 0000001000
  −
|-
  −
| 9 || 0000001001
  −
|-
  −
| 10 || 0000001010
  −
|}
      
== See Also ==
 
== See Also ==
writer
2,661

edits

Navigation menu