当前位置:网站首页>449-原码、补码、反码
449-原码、补码、反码
2022-07-02 00:23:00 【liufeng2023】
原码、补码、反码
- 计算机底层存储数据时使用的是二进制数字,但是计算机在存储一个数字时并不是直接存储该数字对应的二进制数字,而是存储该数字对应二进制数字的补码。
所以接下来我们需要来了解一下原码、反码和补码。
1、机器数
机器数:
- 一个数在计算机的存储形式是二进制数,我们称这些二进制数为机器数;
- 机器数是有符号,在计算机中用机器数的最高位存放符号位,0表示正数,1表示负数。
机器数的真值:
- 因为带有符号位,所以机器数的形式值不等于其真值;
- 以机器数1000 0111为例,其真正表示的值为-7,而形式值为135。
- 将带符号的机器数的真正表示的值称为机器数的真值。
2、原码
原码的表示与机器数真值表示的一样,即用第一位表示符号,其余位表示数值,例如的十进制的的正负1,用8位二进制的原码表示如下:
【+1】= 原:[ 0000 0001 ]
【-1】= 原:[ 1000 0001 ]
2、反码
反码的表示方法为:
- 正数</
边栏推荐
- Multi table operation - one to one, one to many and many to many
- 【CTF】bjdctf_2020_babystack2
- Asp .NetCore 微信订阅号自动回复之文本篇
- js 公共库 cdn 推荐
- 【QT】QtCreator卸载与安装(非正常状态)
- LDR6035智能蓝牙音响可充可放(5.9.12.15.20V)快充快放设备充电
- [CTF] bjdctf 2020 Bar _ Bacystack2
- Review data desensitization system
- ERP项目施行计划的目的是什么?
- [opencv450] hog+svm and hog+cascade for pedestrian detection
猜你喜欢
UDS bootloader of s32kxxx bootloader
【QT】QtCreator卸载与安装(非正常状态)
数据库--SqlServer详解
起床困难综合症(按位贪心)
Window sorting functions rank and deny for SQL data analysis_ rank、raw_ Number and lag, lead window offset function [usage sorting]
Graduation season is both a farewell and a new beginning
mysql之B tree 以及 B+tree
时间复杂度与空间复杂度
Material design component - use bottomsheet to show extended content (I)
Linux CentOS7安装Oracle11g的超完美新手教程
随机推荐
Ldr6035 smart Bluetooth audio can be charged and released (5.9.12.15.20v) fast charging and fast releasing device charging
启牛商学院给的证券账户安不安全?哪里可以开户
比较通俗易懂的PID理解
leetcode96不同的二叉搜索树
vs2015 AdminDeployment. xml
Mysql database driver (JDBC Driver) jar package download
Selectively inhibiting learning bias for active sampling
多表操作-一对一,一对多与多对多
Dongge cashes in and the boss retires?
It's nothing to be utilitarian!
[QT] QT cannot find a solution to the compiler using msvc2017
北京炒股开户选择手机办理安全吗?
Digital transformation has a long way to go, so how to take the key first step
export default 导出的对象,不能解构问题,和module.exports的区别
实例讲解将Graph Explorer搬上JupyterLab
关联性——组内相关系数
Download the online video m3u8 tutorial
What is the purpose of ERP project implementation plan?
[opencv450] hog+svm and hog+cascade for pedestrian detection
Window sorting functions rank and deny for SQL data analysis_ rank、raw_ Number and lag, lead window offset function [usage sorting]