当前位置:网站首页>二进制转十进制,十进制转二进制
二进制转十进制,十进制转二进制
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, 然后将每一步的余数倒过来就是对应的进制数
边栏推荐
- Map的实现类的顺序性
- Use of ue5 QRcode plug-in
- [audio and video] ijkplayer error code
- 基于SSM的校园失物招领平台,源码,数据库脚本,项目导入运行视频教程,论文撰写教程
- Gradle's method of dynamically modifying APK package name
- LinkList
- Puhua PLM empowers the whole scene product lifecycle management and helps the enterprise digital transformation of the main line of products
- MAE
- Abstract classes and interfaces
- Easy touch plug-in
猜你喜欢

Oracle insert single quotation mark

图像处理8-CNN图像分类

Basic operation and process control

十六进制编码简介

Get to know unity2 for the first time

Multi traveling salesman problem -- overview of formula and solution process

animation

L'installateur a été installé avec une erreur inattendue

Haproxy+kept cluster setup 02

Installation of PHP FPM software +openresty cache construction
随机推荐
Ilruntime learning - start from scratch
Jupyter remote server configuration and server startup
Compilation error: "not in executable format: file format not recognized"“
Golang's range
Unity change default editor
Go resolve ID card
Detailed explanation of all transfer function (activation function) formulas of MATLAB neural network
MySQL 8
Golang中删除字符串的最后一个字符
【音视频】ijkplayer错误码
KunlunBase MeetUP 等您来!
String class
Base64和Base64URL
详解sizeof、strlen、指针和数组等组合题
ArrayList
Mxone Pro adaptive 2.0 film and television template watermelon video theme apple cmsv10 template
Storage of data
Vscode, idea, VIM development tool shortcut keys
Osganimation library parsing
OpenGL learning notes