当前位置:网站首页>二进制操作
二进制操作
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
}
边栏推荐
- 【每日一题】第二天
- 在纽约寻找童真——新泽西州乐高乐园探索中心的美好一天
- Excel查找一列中的相同值,删除该行或替换为空值
- Distance measurement - Jaccard distance
- 昨天阿里学长写了一个责任链模式,竟然出现了无数个bug
- UML 类图
- R语言dplyr包na_if函数把向量数值中的控制转化为缺失值NA、按照映射规则把指定内容转化为缺失值NA
- Obligatoire pour les débutants, cliquez sur deux boutons pour passer à un contenu différent
- 第一次去曼谷旅游怎么玩?这份省钱攻略请收好
- M2DGR:多源多场景 地面机器人SLAM数据集(ICRA 2022 )
猜你喜欢

医院在线问诊源码 医院视频问诊源码 医院小程序源码

高频面试题

文字编辑器 希望有错误的句子用红色标红,文字编辑器用了markdown

LightGroupButton* sender = static_ cast<LightGroupButton*>(QObject::sender());
![[0701] [论文阅读] Alleviating Data Imbalance Issue with Perturbed Input During Inference](/img/c7/9b7dc4b4bda4ecfe07aec1367fe059.png)
[0701] [论文阅读] Alleviating Data Imbalance Issue with Perturbed Input During Inference

Tips for material UV masking

鸿蒙第四次学习

SLC、MLC、TLC 和 QLC NAND SSD 之间的区别:哪个更好?

【每日一题】第一天

CDN acceleration and breaking J anti-theft chain function
随机推荐
使用 Cheat Engine 修改 Kingdom Rush 中的金钱、生命、星
Kubernetes three open interfaces first sight
R语言ggplot2可视化分面图(facet):gganimate包基于transition_time函数创建动态散点图动画(gif)
思维意识转变是施工企业数字化转型成败的关键
LightGroupButton* sender = static_ cast<LightGroupButton*>(QObject::sender());
Masa framework - DDD design (1)
M2DGR:多源多场景 地面机器人SLAM数据集(ICRA 2022 )
Installation of thingsboard, an open source IOT platform
电商系统中常见的 9 大坑,你踩过没?
UML class diagram
Industrial software lecture - core technology analysis of 3D CAD design software - the second lecture of the Forum
Progress progress bar
@Component cannot get Dao layer
Use MNIST in tensorflow 2_ 784 data set for handwritten digit recognition
9D电影是怎样的?(+维度空间常识)
R语言使用epiDisplay包的lrtest函数对多个glm模型(logisti回归)执行似然比检验(Likelihood ratio test)对比两个模型的性能是否有差异、广义线性模型的似然比检
What is cloud primordial? This time, I can finally understand!
【JVM调优实战100例】02——虚拟机栈与本地方法栈调优五例
MySQL advanced learning summary 7: MySQL data structure - Comparison of hash index, AVL tree, B tree and b+ tree
问题包含哪些环节