当前位置:网站首页>Binary operation
Binary operation
2022-07-02 19:11:00 【Leisurely young heart】
#include<stdio.h>
int main()
{
char a = 2; //char Take one byte, here is :
//0000 0002
char b = -2;
//1000 0002
// Original code :
//1111 1111-0111 1111 -127 127
// Inverse code :
// The inverse of a positive number is itself , The inverse code of a negative number is that the minus sign remains unchanged, and all the rest are reversed
// Complement code
// The complement of a positive number is itself , The complement of a negative number is his inverse +1
// stay C Inside, it is actually calculated with complement
//1+(-1)
//-1 Inverse code 1000 0001=》1111 1110 -1 Complement code : 1111 1111
// 1111 1111+0000 0001= 1 0000 0000 Remove the eighth one 0 The highest position and then put 1 Take over 1000 0000 //128 But because it is overflow, it is -128
}
边栏推荐
猜你喜欢

教程篇(5.0) 10. 故障排除 * FortiEDR * Fortinet 网络安全专家 NSE 5

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

Tutorial (5.0) 10 Troubleshooting * fortiedr * Fortinet network security expert NSE 5

Imitation Jingdong magnifying glass effect (pink teacher version)
![[100 cases of JVM tuning practice] 03 -- four cases of JVM heap tuning](/img/54/8a18cd30e6186528599c0556b1ee3b.png)
[100 cases of JVM tuning practice] 03 -- four cases of JVM heap tuning

Installation of thingsboard, an open source IOT platform

【JVM调优实战100例】03——JVM堆调优四例
![[test development] software testing - concept](/img/24/9ee885d46f7200ae7449957ca96b9d.png)
[test development] software testing - concept

新加坡暑假旅游攻略:一天玩转新加坡圣淘沙岛
![[100 cases of JVM tuning practice] 02 - five cases of virtual machine stack and local method stack tuning](/img/59/6c776e0607a52962b72fbea2e64c8e.png)
[100 cases of JVM tuning practice] 02 - five cases of virtual machine stack and local method stack tuning
随机推荐
Have you stepped on the nine common pits in the e-commerce system?
电商系统中常见的 9 大坑,你踩过没?
【测试开发】一文带你了解什么是软件测试
2022软件工程期末考试 回忆版
Develop fixed asset management system, what voice is used to develop fixed asset management system
为什么要做企业固定资产管理系统,企业如何加强固定资产管理
High frequency interview questions
ICDE 2023|TKDE Poster Session(CFP)
开发固定资产管理系统,开发固定资产管理系统用什么语音
Deep learning mathematics foundation
The difference between SLC, MLC, TLC and QLC NAND SSD: which is better?
Exness in-depth good article: dynamic series - Case Analysis of gold liquidity (V)
高频面试题
Markdown basic grammar
Tips for material UV masking
In pytorch function__ call__ And forward functions
高级性能测试系列《24. 通过jdbc执行sql脚本》
Golang concurrent programming goroutine, channel, sync
论文导读 | 关于将预训练语言模型作为知识库的分析与批评
《病人家属,请来一下》读书笔记