当前位置:网站首页>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
边栏推荐
- UE4 source code reading_ Bone model and animation system_ Animation node
- Ue5 opencv plug-in use
- Redis cluster series 4
- 如何应对数仓资源不足导致的核心任务延迟
- 【Rust 笔记】09-特型与泛型
- Talking about: is the HashSet set ordered or disordered /hashset set unique, why can we store elements with the same content
- Mall management system of database application technology course design
- Pit & ADB wireless debugging of vivo real machine debugging
- Base64 and base64url
- Unity editor expansion - the design idea of imgui
猜你喜欢
Unity Editor Extension - drag and drop
UE4 source code reading_ Bone model and animation system_ Animation compression
Display terrain database on osgearth ball
【云原生】微服务之Feign的介绍与使用
Monotonic stack -503 Next bigger Element II
[concurrent programming] Table hopping and blocking queue
Campus lost and found platform based on SSM, source code, database script, project import and operation video tutorial, Thesis Writing Tutorial
详解sizeof、strlen、指针和数组等组合题
Unity4.3.1 engine source code compilation process
Redis data structure
随机推荐
Some understandings of 3dfiles
Redis data structure
[rust notes] 11 practical features
animation
UE4 source code reading_ Bone model and animation system_ Animation node
[rust notes] 06 package and module
单调栈-503. 下一个更大元素 II
Golang time format sorting
P1596 [USACO10OCT]Lake Counting S
Go resolve ID card
Location of package cache downloaded by unity packagemanager
Unity interactive water ripple post-treatment
How to deal with the core task delay caused by insufficient data warehouse resources
详解sizeof、strlen、指针和数组等组合题
[cloud native] introduction and use of feign of microservices
Pit & ADB wireless debugging of vivo real machine debugging
Cesium for unreal quick start - simple scenario configuration
UE4 call DLL
【Rust 笔记】09-特型与泛型
UE4 source code reading_ Bone model and animation system_ Animation compression