(PHP 4, PHP 5, PHP 7)
decbin — ʮ����ת��Ϊ������
$number
) : string
����һ�ַ����������и���
number
�����Ķ����Ʊ�ʾ������ת���������ֵΪʮ���Ƶ�
4294967295������Ϊ 32 �� 1 ���ַ�����
number
Decimal value to convert
positive number |
negative number |
return value |
---|---|---|
0 | 0 | |
1 | 1 | |
2 | 10 | |
... normal progression ... | ||
2147483646 | 1111111111111111111111111111110 | |
2147483647 (largest signed integer) | 1111111111111111111111111111111 (31 1's) | |
2147483648 | -2147483648 | 10000000000000000000000000000000 |
... normal progression ... | ||
4294967294 | -2 | 11111111111111111111111111111110 |
4294967295 (largest unsigned integer) | -1 | 11111111111111111111111111111111 (32 1's) |
positive number |
negative number |
return value |
---|---|---|
0 | 0 | |
1 | 1 | |
2 | 10 | |
... normal progression ... | ||
9223372036854775806 | 111111111111111111111111111111111111111111111111111111111111110 | |
9223372036854775807 (largest signed integer) | 111111111111111111111111111111111111111111111111111111111111111 (63 1's) | |
-9223372036854775808 | 1000000000000000000000000000000000000000000000000000000000000000 | |
... normal progression ... | ||
-2 | 1111111111111111111111111111111111111111111111111111111111111110 | |
-1 | 1111111111111111111111111111111111111111111111111111111111111111 (64 1's) |
Binary string representation of number
Example #1 decbin() ����
<?php
echo decbin(12) . "\n";
echo decbin(26);
?>
�������̻������
1100 11010