当前位置:网站首页>Binary to decimal, decimal to binary
Binary to decimal, decimal to binary
2022-07-03 08:37:00 【Jiamei no error】
Hexadecimal conversion
Binary to decimal

Decimal to binary


The rules
One 、 Other decimal system to decimal system
1. Binary to decimal
The rules : Let's start at the lowest point ( On the right ), Extract the number in each bit , multiply 2 Of ( digit -1) Power , Then sum it
Example :1010 Convert to decimal
1010 ===> 0X2 1-1 + 1X22-1 + 0X23-1 + 1X24-1 = 10
2. Octal to decimal
The rules : Let's start at the lowest point ( On the right ), Extract the number in each bit , multiply 8 Of ( digit -1) Power , Then sum it
Example : 17 Convert to decimal
17 ===> 7X81-1 + 1X82-1 = 7 + 8 = 15
3. Hexadecimal to decimal
The rules : Let's start at the lowest point ( On the right ), Extract the number in each bit , multiply 16 Of ( digit -1) Power , Then sum it
Example :1AF Convert to Decimal system
1AF ===> 15X161-1 + 10X162-1 + 1X 163-1 = 15+160+256= 431
Two 、 Decimal to other bases
The rules : Divide the number that needs to be converted by 2/8/16( Binary system / octal / Hexadecimal ), Until Shang Wei 0, Then reverse the remainder of each step to the corresponding hexadecimal number
边栏推荐
- Location of package cache downloaded by unity packagemanager
- Monotonic stack -503 Next bigger Element II
- OpenGL learning notes
- [rust notes] 08 enumeration and mode
- Graphics_ Learnopongl learning notes
- Golang string segmentation, substitution and interception
- 简易入手《SOM神经网络》的本质与原理
- [rust note] 10 operator overloading
- Message pack in C deserializes array objects
- Swagger document configuration
猜你喜欢

Unity editor expansion - controls, layouts

Unity interactive water ripple post-treatment

UE4 source code reading_ Mobile synchronization

Explain sizeof, strlen, pointer, array and other combination questions in detail

Redis data structure

數據庫應用技術課程設計之商城管理系統
![[cloud native] introduction and use of feign of microservices](/img/39/05cf7673155954c90e75a8a2eecd96.jpg)
[cloud native] introduction and use of feign of microservices
![[concurrent programming] Table hopping and blocking queue](/img/b7/023991a00956e469af855e7a81e126.jpg)
[concurrent programming] Table hopping and blocking queue

注解简化配置与启动时加载

Ue5 opencv plug-in use
随机推荐
MySQL 8
Downward compatibility and upward compatibility
Osgearth starry background
producer consumer problem
[audio and video] ijkplayer error code
[concurrent programming] synchronization container, concurrent container, blocking queue, double ended queue and work secret
Golang string segmentation, substitution and interception
【云原生】微服务之Feign的介绍与使用
Un système de gestion de centre commercial pour la conception de cours de technologie d'application de base de données
[rust notes] 08 enumeration and mode
Unity Editor Extension - drag and drop
Map的实现类的顺序性
Exe file running window embedding QT window
【音视频】ijkplayer错误码
Redis cluster series 4
animation
Constraintlayout's constraintset dynamically modifies constraints
Intersectionpicker in osgearth
Simple demo of solving BP neural network by gradient descent method
Ue5 opencv plug-in use