BIN2DEC (binary number to decimal number)

<< Click to Display Table of Contents >>

BIN2DEC (binary number to decimal number)

Syntax:

BIN2DEC(Number)

Description:

This converts the given binary number (base 2) to a decimal number (base 10).

Number is the number to be converted.

Negative numbers must be represented in the 32-bit two's complement (see last example).

Number must not contain more than 32 places, thus the permissible value range is:

-(2^31) ≤ Number ≤ (2^31)-1

Example:

BIN2DEC("101010") returns 42

BIN2DEC("00101010") also returns 42

BIN2DEC("11111111111111111111111111010110") returns -42

See also:

DEC2BIN, BIN2HEX, BIN2OCT, DECIMAL