Home > php教程 > PHP源码 > 十进制数的次方

十进制数的次方

PHP中文网
Release: 2016-05-26 08:19:36
Original
1327 people have browsed it

十进制数是多少次方

<?php
//十进制转成2进制
$a =16384;
$i=0;
for(;;){
    $a = $a/2;
    var_dump($a);
    $i = $i+1;
    var_dump($i);
    if($a==1){
        echo $i;
        break;
    }
}
//2进制转成十进制
var_dump(pow(2,7));
Copy after login
Related labels:
php
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template