Difference between revisions of "Manuals/calci/BIN2DEC"
Jump to navigation
Jump to search
Line 5: | Line 5: | ||
== Description == | == Description == | ||
− | |||
− | |||
BIN2DEC(number) | BIN2DEC(number) | ||
Line 39: | Line 37: | ||
3)BIN2DEC(110)+BIN2DEC(101)-BIN2DEC(100) that displays the result as ''7''. | 3)BIN2DEC(110)+BIN2DEC(101)-BIN2DEC(100) that displays the result as ''7''. | ||
− | |||
== Examples == | == Examples == | ||
Line 74: | Line 71: | ||
|} | |} | ||
+ | |||
+ | == See Also == | ||
+ | |||
+ | *[[Manuals/calci/BIN2HEX| BIN2HEX]] | ||
+ | |||
+ | *[[Manuals/calci/BIN2OCT| BIN2OCT]] | ||
+ | |||
+ | *[[Manuals/calci/DEC2BIN| DEC2BIN]] | ||
+ | |||
+ | *[[Manuals/calci/OCT2BIN | OCT2BIN]] | ||
+ | |||
+ | ==References== | ||
+ | *[http://en.wikipedia.org/wiki/Binary_number#Conversion_to_and_from_other_numeral_systems Conversion of Binary Numbers] |
Revision as of 15:43, 13 November 2013
BIN2DEC(number)
- Where 'number' is the binary number to be converted to decimal number.
Description
BIN2DEC(number)
For example, BIN2DEC(101) returns 5 as a result.
BIN2DEC(11110) returns 30 as a result.
- BIN2DEC() converts a binary number to decimal number.
- Binaray number is represented using digits 1 or 0 only. The number can also be entered in text format (e.g "101").
- The conversion can be obtained for a binary number upto 17 bits for positive numbers and 10 bits for negative numbers.
- 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.
- A binary number (e.g '101') is converted to decimal number (base 2) as -
(1*2^2)+(0*2^1)+(1*2^0)=4+0+1= 5
- If the number is not a valid number, 'Calci' returns an #ERROR message.
- Below are few examples that show the use of combination of functions and get the result in decimal -
1)SUM(BIN2DEC(100) + BIN2DEC(101)) that displays the result as 9.
2)AVERAGE(BIN2DEC(100) + BIN2DEC(101))that displays the result as 4.5.
3)BIN2DEC(110)+BIN2DEC(101)-BIN2DEC(100) that displays the result as 7.
Examples
Binary Input | Decimal Output |
100 | 4 |
11110 | 30 |
1010101010101010 | 42666 |
1111111111 | -1 |
1111000000 | -64 |
1000000000 | -512 |