|NO.Z.00024|——————————|BigDataEnd|——|Java&变量数据类型.V08|——|Java.v08|数据类型.v03|正二进制转换为十进制|

一、正二进制转换为十进制
### --- 正二进制转换为十进制

~~~     ——> # 加权法:
~~~     使用二进制中的每个数据乘以当前位的权重再累加起来
二、二进制101101转换为十进制
### --- 二进制:101101 转换为十进制的结果是:二进制的每个数字乘以当前位的权重

101101=>    0*2^7 + 0*2^6   +   1*2^5   +   0*2^4   +   1*2^3   +   1*2^2   +   0*2^1   +   1*2^0
101101=>    0   +   0   +   32  +   0   +   8   +   4   +   0   1
101101=>    45

 
 
 
 
 
 
 
 
 

Walter Savage Landor:strove with none,for none was worth my strife.Nature I loved and, next to Nature, Art:I warm'd both hands before the fire of life.It sinks, and I am ready to depart
                                                                                                                                                   ——W.S.Landor

 

 

posted on 2022-04-02 22:47  yanqi_vip  阅读(49)  评论(0)    收藏  举报

导航