当前位置:网站首页>How to understand that binary complement represents negative numbers
How to understand that binary complement represents negative numbers
2022-07-07 15:38:00 【sgmcy】
First , If it means a positive number
that N position , The maximum positive number expressed is 2^N -1
in other words , If it's a byte ,8bit, The maximum positive number is 255
If expressed as a negative number The maximum representation range is -2^(N-1) ~ 2^(N-1) - 1
in other words , If calculated in absolute value , The absolute value of a negative number plus the absolute value of a positive number ,
2^(N-1) + 2^(N-1) - 1 It becomes 2^N -1
Find negative numbers 2 Hexadecimal complement representation , First find the binary form of positive numbers , Then each bit is reversed , And then add 1 that will do .
In the computer , All data exists in the form of complement , Don't mention the original code , Inverse code or something , Remember to have a headache . Just remember the complement . Because all data exists in complement , Then just remember one .
Then why should it exist in the form of complement ? That genius came up with this storage method ?
Refer to this post , It's very detailed :
A clock chart One minute to understand Computer complement _ Travel great blog -CSDN Blog
The reason why I understand the way clocks express complement , When I was in Graduate School , Our teacher told us , When I finished speaking, it suddenly became clear .
边栏推荐
- Ctfshow, information collection: web4
- [original] all management without assessment is nonsense!
- CTFshow,信息搜集:web12
- Niuke real problem programming - day20
- Introduction of mongod management database method
- Monthly observation of internet medical field in May 2022
- 写一篇万字长文《CAS自旋锁》送杰伦的新专辑登顶热榜
- MySQL bit type resolution
- Ctfshow, information collection: web13
- Database exception resolution caused by large table delete data deletion
猜你喜欢

2. 堆排序『较难理解的排序』

Niuke real problem programming - day20
![[quick start of Digital IC Verification] 25. AHB sramc of SystemVerilog project practice (5) (AHB key review, key points refining)](/img/78/29eb8581e9a8fb4c6c7e1e35ad7adc.png)
[quick start of Digital IC Verification] 25. AHB sramc of SystemVerilog project practice (5) (AHB key review, key points refining)
![[Lanzhou University] information sharing of postgraduate entrance examination and re examination](/img/06/df5a64441814c9ecfa2f039318496e.jpg)
[Lanzhou University] information sharing of postgraduate entrance examination and re examination

HW初级流量监控,到底该怎么做

Ctfshow, information collection: web6

CTFshow,信息搜集:web8

众昂矿业:萤石继续引领新能源市场增长
![[server data recovery] data recovery case of raid failure of a Dell server](/img/5d/03bc8dcc6e554273b34a78c49a9eaf.jpg)
[server data recovery] data recovery case of raid failure of a Dell server

Unity's ASE achieves full screen sand blowing effect
随机推荐
什么是pv和uv? pv、uv
[original] all management without assessment is nonsense!
【跟着江科大学Stm32】STM32F103C8T6_PWM控制直流电机_代码
With 8 modules and 40 thinking models, you can break the shackles of thinking and meet the thinking needs of different stages and scenes of your work. Collect it quickly and learn it slowly
Ctfshow, information collection: web6
知否|两大风控最重要指标与客群好坏的关系分析
【數字IC驗證快速入門】26、SystemVerilog項目實踐之AHB-SRAMC(6)(APB協議基本要點)
Zhongang Mining: Fluorite continues to lead the growth of new energy market
大表delete删数据导致数据库异常解决
2. Heap sort "hard to understand sort"
Database exception resolution caused by large table delete data deletion
居然从408改考自命题!211华北电力大学(北京)
【数字IC验证快速入门】24、SystemVerilog项目实践之AHB-SRAMC(4)(AHB继续深入)
Monthly observation of internet medical field in May 2022
Qu'est - ce qu'une violation de données
Ctfshow, information collection: web13
[Lanzhou University] information sharing of postgraduate entrance examination and re examination
[quick start of Digital IC Verification] 20. Basic grammar of SystemVerilog learning 7 (coverage driven... Including practical exercises)
TypeScript 发布 4.8 beta 版本
如何在opensea批量发布NFT(Rinkeby测试网)