当前位置:网站首页>二进制转十进制,十进制转二进制
二进制转十进制,十进制转二进制
2022-07-03 08:24:00 【佳美不ERROR】
二进制转十进制
十进制转二进制
规则
一 、其他进制转十进制
1. 二进制转十进制
规则: 从最低位开始(右边),将每个位上的数提取出来,乘以2的(位数-1)次方,然后求和
示例:1010 转换为十进制
1010 ===> 0X2 1-1 + 1X22-1 + 0X23-1 + 1X24-1 = 10
2. 八进制转十进制
规则: 从最低位开始(右边),将每个位上的数提取出来,乘以8的(位数-1)次方,然后求和
示例: 17 转换为十进制
17 ===> 7X81-1 + 1X82-1 = 7 + 8 = 15
3. 十六进制转十进制
规则: 从最低位开始(右边),将每个位上的数提取出来,乘以16的(位数-1)次方,然后求和
示例:1AF转换为 十进制
1AF ===> 15X161-1 + 10X162-1 + 1X 163-1 = 15+160+256= 431
二、十进制转其他进制
规则:将需要转换的数不断除以2/8/16(二进制/八进制/十六进制),直到商为0, 然后将每一步的余数倒过来就是对应的进制数
边栏推荐
- [linear table] basic operation of bidirectional linked list specify node exchange
- P1596 [USACO10OCT]Lake Counting S
- Storage of data
- 数据库应用技术课程设计之商城管理系统
- 简易入手《SOM神经网络》的本质与原理
- Simply start with the essence and principle of SOM neural network
- L'installateur a été installé avec une erreur inattendue
- Wpf: solve the problem that materialdesign:dialoghost cannot be closed
- Yolo series --- xml2txt script
- LinkList
猜你喜欢
【云原生】微服务之Feign的介绍与使用
MAE
C#课程设计之员工信息管理系统
Introduction to Base64 coding
Cloudcompare learning (1) - cloudcompare compilation and common plug-in implementation
P1596 [USACO10OCT]Lake Counting S
Simply start with the essence and principle of SOM neural network
数据库应用技术课程设计之商城管理系统
Dealing with duplicate data in Excel with xlwings
Notes on understanding applets 2022/7/3
随机推荐
About Wireshark's unsuccessful installation of npcap
Development material set
Haproxy+kept build 01
P1596 [USACO10OCT]Lake Counting S
P2704 [noi2001] artillery position (shape pressure DP)
GIS实战应用案例100篇(七十八)-多规合一数据库设计及数据入库
【音视频】ijkplayer错误码
Gradle's method of dynamically modifying APK package name
php-fpm软件的安装+openresty高速缓存搭建
Puhua PLM empowers the whole scene product lifecycle management and helps the enterprise digital transformation of the main line of products
Dotween plug-in
redis集群系列四
Transplantation of tslib Library
matlab神經網絡所有傳遞函數(激活函數)公式詳解
Unity4.3.1 engine source code compilation process
Luaframwrok handles resource updates
Go resolve ID card
Mxone Pro adaptive 2.0 film and television template watermelon video theme apple cmsv10 template
Osganimation library parsing
About the problem that the editor and the white screen of the login interface cannot be found after the location of unityhub is changed