当前位置:网站首页>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 .
边栏推荐
- [Lanzhou University] information sharing of postgraduate entrance examination and re examination
- 15. Using the text editing tool VIM
- 什麼是數據泄露
- 连接ftp服务器教程
- 什么是pv和uv? pv、uv
- 写一篇万字长文《CAS自旋锁》送杰伦的新专辑登顶热榜
- CTFshow,信息搜集:web2
- [quick start of Digital IC Verification] 22. Ahb-sramc of SystemVerilog project practice (2) (Introduction to AMBA bus)
- Qu'est - ce qu'une violation de données
- 【數據挖掘】視覺模式挖掘:Hog特征+餘弦相似度/k-means聚類
猜你喜欢

Ctfshow, information collection: web8

What is data leakage

【数字IC验证快速入门】23、SystemVerilog项目实践之AHB-SRAMC(3)(AHB协议基本要点)
![[deep learning] image hyperspectral experiment: srcnn/fsrcnn](/img/84/114fc8f0875b82cc824e6400bcb06f.png)
[deep learning] image hyperspectral experiment: srcnn/fsrcnn

2022 all open source enterprise card issuing network repair short website and other bugs_ 2022 enterprise level multi merchant card issuing platform source code
![[follow Jiangke University STM32] stm32f103c8t6_ PWM controlled DC motor_ code](/img/8d/a6d477a8679ca4f3885b1a7b542437.png)
[follow Jiangke University STM32] stm32f103c8t6_ PWM controlled DC motor_ code

Unity之ASE实现全屏风沙效果

Qu'est - ce qu'une violation de données

【數字IC驗證快速入門】26、SystemVerilog項目實踐之AHB-SRAMC(6)(APB協議基本要點)

Mathematical modeling -- what is mathematical modeling
随机推荐
Whether runnable can be interrupted
【數字IC驗證快速入門】26、SystemVerilog項目實踐之AHB-SRAMC(6)(APB協議基本要點)
写一篇万字长文《CAS自旋锁》送杰伦的新专辑登顶热榜
Super simple and fully automated generation super signature system (cloud Xiaoduo minclouds.com cloud service instance), free application in-house test app distribution and hosting platform, maintenan
【OBS】RTMPSockBuf_ Fill, remote host closed connection.
居然从408改考自命题!211华北电力大学(北京)
CTFshow,信息搜集:web4
[deep learning] image hyperspectral experiment: srcnn/fsrcnn
【深度学习】语义分割实验:Unet网络/MSRC2数据集
HPDC smart base Talent Development Summit essay
Jacobo code coverage
[quickstart to Digital IC Validation] 20. Basic syntax for system verilog Learning 7 (Coverage Driven... Including practical exercises)
什么是pv和uv? pv、uv
2. Heap sort "hard to understand sort"
What is Base64?
CTFshow,信息搜集:web6
[quick start of Digital IC Verification] 22. Ahb-sramc of SystemVerilog project practice (2) (Introduction to AMBA bus)
Bye, Dachang! I'm going to the factory today
[quick start of Digital IC Verification] 18. Basic grammar of SystemVerilog learning 5 (concurrent threads... Including practical exercises)
全日制研究生和非全日制研究生的区别!