当前位置:网站首页>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、反码
反码的表示方法为:
- 正数</
边栏推荐
- 挖财学堂开户打新债安全可靠嘛?
- Niuke - Practice 101 - reasoning clown
- Is it safe and reliable to open an account in Caixue school and make new debts?
- [cascade classifier training parameters] training Haar cascades
- B tree and b+tree of MySQL
- Download the online video m3u8 tutorial
- 【QT】Qt 使用MSVC2017找不到编译器的解决办法
- 2022 pinduoduo details / pinduoduo product details / pinduoduo SKU details
- Asp .NetCore 微信订阅号自动回复之文本篇
- Jielizhi, production line assembly link [chapter]
猜你喜欢

Leetcode 96 différents arbres de recherche binaires

使用多线程Callable查询oracle数据库

SQL Server 安裝指南

Talents come from afar, and Wangcheng district has consolidated the intellectual base of "strengthening the provincial capital"

What is ThreadLocal memory leak and how to solve it

毕业季 | 华为专家亲授面试秘诀:如何拿到大厂高薪offer?
![[QT] QT cannot find a solution to the compiler using msvc2017](/img/80/a4b17d6cc1ab6fe1366a3a3f43ec2e.png)
[QT] QT cannot find a solution to the compiler using msvc2017

Gaussdb (for MySQL):partial result cache, which accelerates the operator by caching intermediate results

The new version of graphic network PDF will be released soon

Material design component - use bottomsheet to show extended content (I)
随机推荐
Regular expression collection
Resumption of attack and defense drill
Learn online case practice
SQL数据分析之流程控制语句【if,case...when详解】
It's nothing to be utilitarian!
Soft exam information system project manager_ Compiled abbreviations of the top ten management processes to help memory recitation - -- software test advanced information system project manager 054
vs2015 AdminDeployment. xml
数据库--SqlServer详解
2022 pinduoduo details / pinduoduo product details / pinduoduo SKU details
leetcode96不同的二叉搜索樹
Asp . Text of automatic reply to NETCORE wechat subscription number
Openvino model performance evaluation tool DL workbench
How to improve data quality
Windows 7 install MySQL error: 1067
下载在线视频 m3u8使用教程
实例讲解将Graph Explorer搬上JupyterLab
Use the htaccess file to prohibit the script execution permission in the directory
I would like to ask, which securities is better for securities account opening? Is it safe to open a mobile account?
Window sorting functions rank and deny for SQL data analysis_ rank、raw_ Number and lag, lead window offset function [usage sorting]
九州云与英特尔联合发布智慧校园私有云框架,赋能教育新基建