当前位置:网站首页>[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 .
边栏推荐
- 机器学习基础-主成分分析PCA-16
- Xampp Chinese tutorial guide
- Science 重磅:AI设计蛋白质再获突破,可设计特定功能性蛋白质
- Connected Block & food chain - (summary of parallel search set)
- LeetCode每日一题(2196. Create Binary Tree From Descriptions)
- Scala transformation, filtering, grouping, sorting
- mysql limit 分页优化
- [basic teaching of Bi design] detailed explanation of OLED screen use - single chip microcomputer Internet of things
- BiliBili Yang Zhou: above efficiency, efficient delivery
- 云原生—运行时环境
猜你喜欢

Siemens docking Leuze BPS_ 304i notes

Problem solving during copilot trial

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

Monotonic stack

Zurich Federal Institute of technology | reference based image super resolution with deformable attention transformer (eccv2022))
![[graduation design teaching] ultrasonic ranging system based on single chip microcomputer - Internet of things embedded stm32](/img/27/58fd175753b21dc21bd2d950cf5f15.png)
[graduation design teaching] ultrasonic ranging system based on single chip microcomputer - Internet of things embedded stm32

Installation and reinstallation of win11 system graphic version tutorial

01 introduction to pyechars features, version and installation

Full disclosure! Huawei cloud distributed cloud native technology and Practice

机器学习基础-决策树-12
随机推荐
Installation and reinstallation of win11 system graphic version tutorial
Solution to using json.tojsonstring to display question marks in Chinese in Servlet
[base] what is the optimization of optimization performance?
leetcode 376. Wiggle Subsequence
面试必问,敲重点!讲一下 Android Application 启动流程及其源码?
Uncover why devaxpress WinForms, an interface control, discards the popular maskbox property
Introduction to border border attribute
Understanding of vite2
归并排序
机器学习基础-贝叶斯分析-14
LeetCode 移除元素&移动零
The 'name' attribute value associated with the element type 'item' cannot contain '& lt;' Character solution
Machine learning practice - decision tree-22
Change the document type in endnode and import it in word
CTO of youhaoda, MVP of Huawei cloud, and Zhang Shanyou: build cloud native applications based on kubernetes and dapr
leetcode 1518. 换酒问题
如何在 TiDB Cloud 上使用 Databricks 进行数据分析 | TiDB Cloud 使用指南
力扣315计算右侧小于当前元素的个数
Code layered management of interface testing based on RF framework
Unity loads GLB model