当前位置:网站首页>[embedded C foundation] Part 2: binary conversion and BCD coding
[embedded C foundation] Part 2: binary conversion and BCD coding
2022-07-28 13:01:00 【Black cat senior】
1 Preface
D Decimal system
B Binary system
H Hexadecimal
What is power ?
power : Weight refers to the basic unit of each bit in the data .
For example, numbers in decimal 123, that 3 It's everybody , take a temporary measure 1,2 It's ten , take a temporary measure 10,1 It's a hundred , Right is 100.
Decimal system 10 Of i Power (i What's the number )
Binary system 2 Of i Power
Others in the same way
2 Non decimal to decimal

3 Decimal to non decimal
3.1 Decimal to binary
The integer part is converted to binary number by “ except 2 Remainder ” Methods , That is, continuous division 2 And take the remainder as the result , Until business is 0, The remainder obtained is arranged in sequence from low to high, that is, the integer part of the converted binary number ;
For the decimal part , Then use “ ride 2 integer ” Methods , That is, the decimal part is used continuously 2 ride , Take the integer part of the first product as the highest bit , Until the required precision is achieved or the decimal part is 0 until .
边栏推荐
- 黑猫带你学UFS协议第2篇:UFS相关名词释义
- MySQL limit paging optimization
- 机器学习实战-逻辑回归-19
- Scala transformation, filtering, grouping, sorting
- Leetcode 1518. wine change
- What if the right button of win11 start menu doesn't respond
- The 'name' attribute value associated with the element type 'item' cannot contain '& lt;' Character solution
- Jetpack Compose 完全脱离 View 系统了吗?
- BiliBili Yang Zhou: above efficiency, efficient delivery
- [base] what is the optimization of optimization performance?
猜你喜欢

【嵌入式C基础】第4篇:运算符的使用

Phpstudy steps to quickly build a website (teach you to build it by hand)

The largest rectangle in leetcode84 histogram

Which big model is better? Openbmb releases bmlist to give you the answer!

LeetCode94. 二叉树的中序遍历

机器学习实战-集成学习-23

Review the IO stream again, and have an in-depth understanding of serialization and deserialization
![[pictures and texts] detailed tutorial of one click reinstallation of win11 system](/img/cc/749fe4095fc5afb1fc2c65df43d06c.png)
[pictures and texts] detailed tutorial of one click reinstallation of win11 system

CTO of youhaoda, MVP of Huawei cloud, and Zhang Shanyou: build cloud native applications based on kubernetes and dapr

机器学习实战-决策树-22
随机推荐
Li FuPan: application practice of kata safety container in ant group
黑猫带你学eMMC协议第27篇:什么是eMMC的动态容量(Dynamic Capacity)?
[embedded explanation] key scanning based on finite state machine and stm32
LeetCode84 柱状图中最大的矩形
2020-12-27
[pictures and texts] detailed tutorial of one click reinstallation of win11 system
区块反转(暑假每日一题 7)
leetcode 1518. 换酒问题
Qt 信号和槽机制( 详解 )
Leetcode 1518. wine change
Fundamentals of machine learning - principal component analysis pca-16
C# 泛型是什么、泛型缓存、泛型约束
Solution to using json.tojsonstring to display question marks in Chinese in Servlet
Leetcode:704 binary search
CCF201912-2 回收站选址
FutureWarning: Indexing with multiple keys (implicitly converted to a tuple of keys) will be depreca
Sliding Window
How many times can the WordPress user name be changed? Attach the method of changing user name
【嵌入式C基础】第1篇:基本数据类型
MySQL总是安装不成功,这样处理就好啦