当前位置:网站首页>二进制操作
二进制操作
2022-07-02 17:50:00 【悠然少年心】
#include<stdio.h>
int main()
{
char a = 2; //char占一个字节这里就是:
//0000 0002
char b = -2;
//1000 0002
//原码:
//1111 1111-0111 1111 -127 127
//反码:
//正数的反码就是本身,负数的反码就是负号不变其余全部取反
//补码
//正数的补码就是本身,负数的补码是他的反码+1
//在C里面呢实际上是用补码进行计算的
//1+(-1)
//-1反码 1000 0001=》1111 1110 -1补码: 1111 1111
// 1111 1111+0000 0001= 1 0000 0000 去掉第八个0最高位然后把1拿过来 1000 0000 //128 但是由于是溢出的所以是-128
}
边栏推荐
- Web version 3D visualization tool, 97 things programmers should know, AI frontier paper | information daily # 2022.07.01
- 新加坡暑假旅遊攻略:一天玩轉新加坡聖淘沙島
- Use MNIST in tensorflow 2_ 784 data set for handwritten digit recognition
- Is it safe to buy funds on Alipay account
- R语言dplyr包rowwise函数、mutate函数计算dataframe数据中多个数据列在每行的最大值、并生成行最大值对应的数据列(row maximum)
- Eliminate the yellow alarm light on IBM p750 small computer [easy to understand]
- Chain game system development (unity3d chain game development details) - chain game development mature technology source code
- 昨天阿里学长写了一个责任链模式,竟然出现了无数个bug
- 【测试开发】一文带你了解什么是软件测试
- LightGroupButton* sender = static_ cast<LightGroupButton*>(QObject::sender());
猜你喜欢

How to copy and paste interlaced in Excel

Looking for innocence in New York -- a beautiful day at the discovery center of Legoland, New Jersey

如何清理废弃pv和其对应的文件夹

Redis (7) -- database and expiration key

【JVM调优实战100例】02——虚拟机栈与本地方法栈调优五例

Kubernetes three open interfaces first sight

yolov3 训练自己的数据集之生成train.txt

Responses of different people in technology companies to bugs | daily anecdotes

材质UV遮罩的技巧

昨天阿里学长写了一个责任链模式,竟然出现了无数个bug
随机推荐
R language uses the lsnofunction function function of epidisplay package to list all objects in the current space, except user-defined function objects
Stratégie touristique d'été de Singapour: un jour pour visiter l'île de San taosha à Singapour
Progress progress bar
UML 类图
Learn the knowledge points of eight part essay ~ ~ 1
谷歌官方回应:我们没有放弃TensorFlow,未来与JAX并肩发展
SAP S/4HANA OData Mock Service 介绍
FastDFS安装
Looking for innocence in New York -- a beautiful day at the discovery center of Legoland, New Jersey
MySQL advanced learning summary 7: MySQL data structure - Comparison of hash index, AVL tree, B tree and b+ tree
故障排查:kubectl报错ValidationError: unknown field \u00a0
医院在线问诊源码 医院视频问诊源码 医院小程序源码
R语言dplyr包filter函数筛选dataframe数据、如果需要筛选的数据列(变量)名称中包含引号则需要使用!!sym语法处理、否则因为无法处理引号筛选不到任何数据
ICDE 2023|TKDE Poster Session(CFP)
Imitation Jingdong magnifying glass effect (pink teacher version)
Redis (6) -- object and data structure
[test development] takes you to know what software testing is
Google's official response: we have not given up tensorflow and will develop side by side with Jax in the future
How to play when you travel to Bangkok for the first time? Please keep this money saving strategy
R language ggplot2 visualization: gganimate package creates dynamic histogram animation (GIF) and uses transition_ The States function displays a histogram step by step along a given dimension in the