当前位置:网站首页>二进制操作
二进制操作
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
}
边栏推荐
- 页面标题组件
- SAP S/4HANA OData Mock Service 介绍
- Web version 3D visualization tool, 97 things programmers should know, AI frontier paper | information daily # 2022.07.01
- R语言dplyr包rowwise函数、mutate函数计算dataframe数据中多个数据列在每行的最大值、并生成行最大值对应的数据列(row maximum)
- [100 cases of JVM tuning practice] 03 -- four cases of JVM heap tuning
- CDN acceleration and breaking J anti-theft chain function
- 27: Chapter 3: develop Passport Service: 10: [registration / login] interface: after the registration / login is OK, save the user session information (uid, utoken) to redis and cookies; (one main poi
- 《病人家属,请来一下》读书笔记
- SLC、MLC、TLC 和 QLC NAND SSD 之间的区别:哪个更好?
- The second bullet of AI development and debugging series: the exploration journey of multi machine distributed debugging
猜你喜欢

Mysql高级篇学习总结7:Mysql数据结构-Hash索引、AVL树、B树、B+树的对比

LightGroupButton* sender = static_ cast<LightGroupButton*>(QObject::sender());

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

What is cloud primordial? This time, I can finally understand!

Hongmeng's fourth learning

电商系统中常见的 9 大坑,你踩过没?

昨天阿里学长写了一个责任链模式,竟然出现了无数个bug

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

STM32G0 USB DFU 升级校验出错-2

Learning summary of MySQL advanced 6: concept and understanding of index, detailed explanation of b+ tree generation process, comparison between MyISAM and InnoDB
随机推荐
学生抖音宣传母校被吐槽“招生减章”,网友:哈哈哈哈哈哈
UML class diagram
深度学习数学基础
Progress progress bar
Golang并发编程——goroutine、channel、sync
[100 cases of JVM tuning practice] 02 - five cases of virtual machine stack and local method stack tuning
从list转化成map的时候,如果根据某一属性可能会导致key重复而异常,可以设置处理这种重复的方式
sql训练2
开源物联网平台ThingsBoard的安装
9D电影是怎样的?(+维度空间常识)
Learn the knowledge points of eight part essay ~ ~ 1
Have you stepped on the nine common pits in the e-commerce system?
[test development] takes you to know what software testing is
Responses of different people in technology companies to bugs | daily anecdotes
Web实时通信技术之Websocket
Troubleshooting: kubectl reports an error validationerror: unknown field \u00a0
[daily question] first day
AI开发调试系列第二弹:多机分布式调测探索之旅
The student Tiktok publicized that his alma mater was roast about "reducing the seal of enrollment". Netizen: hahahahahahahaha
promise 和 Observable 的区别