当前位置:网站首页>【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语言程序
边栏推荐
- '<', hexadecimal value 0x3C, is an invalid 问题解决
- mysql8报错:ERROR 1410 (42000): You are not allowed to create a user with GRANT解决办法
- 招标公告:深圳市财政局数据库异地灾备项目
- 备战数学建模36-时间序列模型2
- Reptile (1) - Introduction to basic reptile theory
- 分布式机器学习:模型平均MA与弹性平均EASGD(PySpark)
- The inspiration from infant cognitive learning may be the key to the next generation of unsupervised machine learning
- 云化XR,如何助力产业升级
- microblaze 串口学习·2
- Warning: [antd: Menu] `children` will be removed in next major version. Please use `items` instead.
猜你喜欢
![[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

电子烟强制性国家标准GB 41700-2022发布 2022年10月1日起实施
![Warning: [antd: Menu] `children` will be removed in next major version. Please use `items` instead.](/img/c1/99ad29789a669c4498fb93ce1fb009.png)
Warning: [antd: Menu] `children` will be removed in next major version. Please use `items` instead.

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

Go micro installation

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

Alibaba cloud OSS object storage cross domain settings

婴儿认知学习所带来的启发,也许是下一代无监督机器学习的关键

halcon变量窗口的图像变量不显示,重启软件和电脑都没用

Policy Center > Google Play‘s Target API Level Policy
随机推荐
备战数学建模36-时间序列模型2
边缘计算平台如何助力物联网发展
思源笔记:能否提供页面内折叠所有标题的快捷键?
Go zero micro Service Practice Series (VIII. How to handle tens of thousands of order requests per second)
How to get the preferential activities for stock account opening? Is online account opening safe?
Unsupported major. minor version 52.0
KDD 2022 | how far are we from the general pre training recommendation model? Universal sequence representation learning model unisrec for recommender system
How to connect the Internet Reading Notes - Summary
Policy Center > Deceptive Behavior
Policy Center-User Data
Smart wind power: operation and maintenance of digital twin 3D wind turbine intelligent equipment
猎头5万挖我去VC
Using asp Net core creating web API series
Hundreds of lines of code to implement a JSON parser
【活动报名】探秘元宇宙,就差你了!7月2号我在深圳现场等你!
How cloudxr promotes the future development of XR
Policy Center > Device and Network Abuse
实时渲染和预渲染有什么区别
Distributed machine learning: model average Ma and elastic average easgd (pyspark)
Cesium-1.72 learning (earth model creation online offline tile)