当前位置:网站首页>[Verilog basics] octal and hexadecimal representation of decimal negative numbers
[Verilog basics] octal and hexadecimal representation of decimal negative numbers
2022-06-30 16:40:00 【ReCclay】
subject : take -617 Convert to octal and hexadecimal numbers ( Complement code )
Make a mistake :(-617)D=(-1151)O=(-269)H
Cause analysis : If it's a positive number , The above idea is correct , Due to the positive and negative code 、 Inverse code 、 The difference in complement conversion , Therefore, it is wrong to solve negative numbers according to the solution idea of positive numbers .
The right way yes : First of all, will -617 Express with complement , Then convert it to octal and hexadecimal ( Complement code ) that will do .
notes : Binary complement to use 16 position .
right key :(-617)D=(176627)O=(fd97)H
Negative decimal conversion to octal or hexadecimal methods such as (-12)10=( )8=( )16
First step : Convert to binary
1000 0000 0000 1100
The second step : Complement code , Take the reverse and add one
1111 1111 1111 0100
The third step : The conversion to octal is Three in one :(177764)8
Conversion to Hex is Four in one combination :(fff4)16
C Language program
边栏推荐
- RTP 发送PS流零拷贝方案
- 360 digital, ant group, etc. were selected as member units of the "business security promotion plan" of the Chinese Academy of Communications
- 2020 Blue Bridge Cup group B - move bricks - (greedy sorting +01 backpack)
- Two methods for MySQL to open remote connection permission
- 居家办公浅谈远程协助快速提效心得 | 社区征文
- The new tea drinks are "dead and alive", but the suppliers are "full of pots and bowls"?
- 2020蓝桥杯国赛B组-搬砖-(贪心排序+01背包)
- Which direction should college students choose to find jobs after graduation?
- MySQL开放远程连接权限的两种方法
- 360数科、蚂蚁集团等入选中国信通院“业务安全推进计划”成员单位
猜你喜欢

JS ES5也可以创建常量?

19:00 p.m. tonight, knowledge empowerment phase 2 live broadcast - control panel interface design of openharmony smart home project

云化XR,如何助力产业升级

Compulsory national standard for electronic cigarette GB 41700-2022 issued and implemented on October 1, 2022

How cloudxr promotes the future development of XR

Niuke: how many different binary search trees are there

halcon知识:区域专题【07】
MySQL8.0开启远程连接权限的方法步骤

几百行代码实现一个 JSON 解析器

Carry two load balancing notes and find them in the future
随机推荐
Bidding announcement: Tianjin housing provident fund management center database all-in-one machine and database software project (budget: 6.45 million)
Google play index table
2020 Blue Bridge Cup group B - move bricks - (greedy sorting +01 backpack)
备战数学建模33-灰色预测模型2
Niuke.com: minimum cost of climbing stairs
2020蓝桥杯国赛B组-搬砖-(贪心排序+01背包)
Yunhe enmo won the bid for Oracle maintenance project of Tianjin Binhai rural commercial bank in 2022-2023
Cesium-1.72 learning (earth model creation online offline tile)
Cesium-1.72 learning (deploy offline resources)
附加:(还没写,别看~~~)CorsFilter过滤器;
Interesting research on mouse pointer interaction
MySQL proxy middleware atlas installation and configuration
RT thread heap size setting
Hundreds of lines of code to implement a JSON parser
POJ Project Summer
360 digital, ant group, etc. were selected as member units of the "business security promotion plan" of the Chinese Academy of Communications
药品管理系统加数据库,一夜做完,加报告
备战数学建模36-时间序列模型2
Under the pressure of technology, you can quickly get started with eth smart contract development, which will take you into the ETH world
居家办公浅谈远程协助快速提效心得 | 社区征文