BIN2DEC

Syntax:

BIN2DEC ( number )

Description: Makes the decimal equivalent of number.

Arguments:

Name

Type

Description

number

number

A 10-digit binary number that is to be converted to a decimal string. If number has less than 10 digits, leading zero digits are implied until it has exactly 10 digits. The 10 digits use twos-complement representation with the left-most bit (10th bit from the right) representing the sign bit.

Return Type and Value: number – The decimal equivalent of number.

However, if

  • number contains one or more non-binary digits, #NUM! is returned.

  • number contains more than 10 binary digits; that is, number is outside the range 1000000000 (-512 decimal) to 0111111111 (511 decimal), inclusive, #NUM! is returned.

example: