当前位置:网站首页>二进制转十进制,十进制转二进制
二进制转十进制,十进制转二进制
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, 然后将每一步的余数倒过来就是对应的进制数
边栏推荐
- VIM learning notes from introduction to silk skating
- C语言-入门-精华版-带你走进编程(一)
- Golang's range
- C language - Introduction - essence Edition - take you into programming (I)
- Creation and content of mapnode -- osgearth rendering engine series (2)
- Golang 字符串分割,替换和截取
- Compilation error: "not in executable format: file format not recognized"“
- Storage of data
- LinkList
- 2021-10-19
猜你喜欢

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

Dotween plug-in

Dealing with duplicate data in Excel with xlwings

Puhua PLM empowers the whole scene product lifecycle management and helps the enterprise digital transformation of the main line of products

MAE

About the problem that the editor and the white screen of the login interface cannot be found after the location of unityhub is changed
![P1596 [USACO10OCT]Lake Counting S](/img/a7/07a84c93ee476788d9443c0add808b.png)
P1596 [USACO10OCT]Lake Counting S

Abstract classes and interfaces

数据库应用技术课程设计之商城管理系统

數據庫應用技術課程設計之商城管理系統
随机推荐
Osgearth topographic shading map drawing
Thymeleaf 404 reports an error: there was unexpected error (type=not found, status=404)
Introduction to Base64 coding
Simple demo of solving BP neural network by gradient descent method
the installer has encountered an unexpected error installing this package
Cesium service deployment, and import and display local 3dfiles data
GIS实战应用案例100篇(七十八)-多规合一数据库设计及数据入库
C language - Introduction - essence Edition - take you into programming (I)
MySQL containerization (1) docker installation MySQL
VIM learning notes from introduction to silk skating
A tunnel to all ports of the server
Notes on understanding applets 2022/7/3
【K&R】中文第二版 个人题解 Chapter1
Constraintlayout's constraintset dynamically modifies constraints
Introduction to hexadecimal coding
Vscode, idea, VIM development tool shortcut keys
Transmit pictures with Base64 encoding
Golang string segmentation, substitution and interception
Go resolve ID card
Golang中删除字符串的最后一个字符