当前位置:网站首页>【Verilog基础】十进制负数的八进制、十六进制表示
【Verilog基础】十进制负数的八进制、十六进制表示
2022-06-30 15:44:00 【ReCclay】
题目:将-617转换成八进制和十六进制数(补码)
犯错:(-617)D=(-1151)O=(-269)H
原因分析:如果是正数的话,上面的思路是正确的,但是由于正数和负数在原码、反码、补码转换上的差别,所以按照正数的求解思路去对负数进行求解是不对的。
正确的方法是:首先将-617用补码表示出来,然后再转换成八进制和十六进制(补码)即可。
注:二进制补码要用16位。
正确答案:(-617)D=(176627)O=(fd97)H
负数十进制转换成八进制或十六进制方法如(-12)10=( )8=( )16
第一步:转换成二进制
1000 0000 0000 1100
第二步:补码,取反加一
1111 1111 1111 0100
第三步:转换成八进制是三位一结合:(177764)8
转换成十六进制是四位一结合:(fff4)16
C语言程序
边栏推荐
- 实时渲染和预渲染有什么区别
- Lecun points out the direction of next generation AI: autonomous machine intelligence
- 超 Nice 的表格响应式布局小技巧
- Siyuan notes: can you provide shortcut keys for folding all titles on the page?
- 分布式机器学习:模型平均MA与弹性平均EASGD(PySpark)
- Implementation of Devops in the core field of qunar, the Internet R & D Efficiency
- How to connect the Internet Reading Notes - Summary
- ASP. Net core Middleware
- Smart wind power: operation and maintenance of digital twin 3D wind turbine intelligent equipment
- Build cloud native observability capability suitable for organizations
猜你喜欢
![[time series database incluxdb] code example for configuring incluxdb+ data visualization and simple operation with C under Windows Environment](/img/50/4b7aa2273a64ed531d13ecdbeed6a6.png)
[time series database incluxdb] code example for configuring incluxdb+ data visualization and simple operation with C under Windows Environment

Policy Center-User Data

With as subquery in Oracle

Policy Center > Device and Network Abuse

LeCun指明下一代AI方向:自主机器智能

云技能提升好伙伴,亚马逊云师兄今天正式营业

ASP. Net core signalr series hub tutorial
MySQL8.0开启远程连接权限的方法步骤

15年做糊21款硬件,谷歌到底栽在哪儿?

Policy Center > Deceptive Behavior
随机推荐
[time series database incluxdb] code example for configuring incluxdb+ data visualization and simple operation with C under Windows Environment
halcon变量窗口的图像变量不显示,重启软件和电脑都没用
Build cloud native observability capability suitable for organizations
19:00 p.m. tonight, knowledge empowerment phase 2 live broadcast - control panel interface design of openharmony smart home project
实时渲染和预渲染有什么区别
Alibaba cloud OSS object storage cross domain settings
[download attached] installation and use of penetration test artifact Nessus
互联网研发效能之去哪儿网(Qunar)核心领域DevOps落地实践
备战数学建模34-BP神经网络预测2
Types of waveguides
Explain in detail the use of for loop, break and continue in go language
I implement "stack" with C I
The inspiration from infant cognitive learning may be the key to the next generation of unsupervised machine learning
婴儿认知学习所带来的启发,也许是下一代无监督机器学习的关键
【Unity UGUI】ScrollRect 动态缩放格子大小,自动定位到中间的格子
Mysql8 error: error 1410 (42000): you are not allowed to create a user with grant solution
flink sql cdc 同步sqlserver 报错什么原因啊
Deep understanding Net (2) kernel mode 1 Kernel mode construct event event
How cloudxr promotes the future development of XR
Implementation of Devops in the core field of qunar, the Internet R & D Efficiency