当前位置:网站首页>二进制操作
二进制操作
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
}
边栏推荐
- [0701] [论文阅读] Alleviating Data Imbalance Issue with Perturbed Input During Inference
- R语言ggplot2可视化:gganimate包创建动态柱状图动画(gif)、使用transition_states函数在动画中沿给定维度逐步显示柱状图
- The difference between promise and observable
- Eliminate the yellow alarm light on IBM p750 small computer [easy to understand]
- Kubernetes three open interfaces first sight
- 新加坡暑假旅游攻略:一天玩转新加坡圣淘沙岛
- 彻底搞懂基于Open3D的点云处理教程!
- 【每日一题】第一天
- The student Tiktok publicized that his alma mater was roast about "reducing the seal of enrollment". Netizen: hahahahahahahaha
- Is it safe to buy funds on Alipay account
猜你喜欢

Learning summary of MySQL advanced 6: concept and understanding of index, detailed explanation of b+ tree generation process, comparison between MyISAM and InnoDB

仿京东放大镜效果(pink老师版)

Obligatoire pour les débutants, cliquez sur deux boutons pour passer à un contenu différent

Stratégie touristique d'été de Singapour: un jour pour visiter l'île de San taosha à Singapour

UML class diagram

思维意识转变是施工企业数字化转型成败的关键

【JVM调优实战100例】03——JVM堆调优四例
![[0701] [论文阅读] Alleviating Data Imbalance Issue with Perturbed Input During Inference](/img/c7/9b7dc4b4bda4ecfe07aec1367fe059.png)
[0701] [论文阅读] Alleviating Data Imbalance Issue with Perturbed Input During Inference

ICDE 2023|TKDE Poster Session(CFP)

Hospital online inquiry source code hospital video inquiry source code hospital applet source code
随机推荐
How to set vscode to delete the whole line shortcut key?
在纽约寻找童真——新泽西州乐高乐园探索中心的美好一天
SAP S/4HANA OData Mock Service 介绍
Mini Golf Course: a good place for leisure and tourism in London
高频面试题
Page title component
[100 cases of JVM tuning practice] 03 -- four cases of JVM heap tuning
【愚公系列】2022年07月 Go教学课程 001-Go语言前提简介
UML 类图
Stm32g0 USB DFU upgrade verification error -2
Learning summary of MySQL advanced 6: concept and understanding of index, detailed explanation of b+ tree generation process, comparison between MyISAM and InnoDB
Stratégie touristique d'été de Singapour: un jour pour visiter l'île de San taosha à Singapour
医院在线问诊源码 医院视频问诊源码 医院小程序源码
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
UML class diagram
Responses of different people in technology companies to bugs | daily anecdotes
消息队列消息丢失和消息重复发送的处理策略
Progress progress bar
How to enable the run dashboard function of idea
[daily question] the next day