bindec

PHP 4, PHP 5, PHP 7, PHP 8
bindec - Binary to decimal
Bindec Online Tool
Manual
Code Examples

Example #1 bindec interprets input as unsigned integers

Result: input: 1073741823 binary: 00111111111111111111111111111111 bindec(): 1073741823 input: 1073741824 binary: 01000000000000000000000000000000 bindec(): 1073741824 NOTE: See the rollover? Watch it next time around... input: 2147483647 binary: 01111111111111111111111111111111 bindec(): 2147483647 NOTE: PHP_INT_MAX input: -2147483648 binary: 10000000000000000000000000000000 bindec(): 2147483648 NOTE: interpreted to be one more than PHP_INT_MAX input: -1 binary: 11111111111111111111111111111111 bindec(): 4294967295 NOTE: interpreted to be the largest unsigned integer
PHP Version:

Example #2 bindec example

Result: 51 51 7
PHP Version:


Example #3 of bindec

PHP Version:


Function bindec:

Mathematical Functions Functions

Most used PHP functions