当前位置:网站首页>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
}
边栏推荐
- Novice must see, click two buttons to switch to different content
- 教程篇(5.0) 10. 故障排除 * FortiEDR * Fortinet 網絡安全專家 NSE 5
- [daily question] the next day
- What is 9D movie like? (+ common sense of dimension space)
- Codeworks 5 questions per day (1700 average) - day 4
- Golang并发编程——goroutine、channel、sync
- 2022编译原理期末考试 回忆版
- STM32G0 USB DFU 升级校验出错-2
- 【JVM调优实战100例】02——虚拟机栈与本地方法栈调优五例
- Troubleshooting: kubectl reports an error validationerror: unknown field \u00a0
猜你喜欢
[100 cases of JVM tuning practice] 01 - introduction of JVM and program counter
Use cheat engine to modify money, life and stars in Kingdom rush
The difference between interceptor and filter
Hongmeng's fourth learning
论文导读 | 关于将预训练语言模型作为知识库的分析与批评
codeforces每日5题(均1700)-第四天
Introduction to the paper | analysis and criticism of using the pre training language model as a knowledge base
Web2.0的巨头纷纷布局VC,Tiger DAO VC或成抵达Web3捷径
Exness in-depth good article: dynamic series - Case Analysis of gold liquidity (V)
[daily question] the next day
随机推荐
MySQL advanced learning summary 8: overview of InnoDB data storage structure page, internal structure of page, row format
[0701] [论文阅读] Alleviating Data Imbalance Issue with Perturbed Input During Inference
聊聊电商系统中红包活动设计
Golang concurrent programming goroutine, channel, sync
新加坡暑假旅遊攻略:一天玩轉新加坡聖淘沙島
The student Tiktok publicized that his alma mater was roast about "reducing the seal of enrollment". Netizen: hahahahahahahaha
页面标题组件
Novice must see, click two buttons to switch to different content
[test development] takes you to know what software testing is
R语言dplyr包filter函数筛选dataframe数据、如果需要筛选的数据列(变量)名称中包含引号则需要使用!!sym语法处理、否则因为无法处理引号筛选不到任何数据
Progress progress bar
数据降维——主成分分析
思维意识转变是施工企业数字化转型成败的关键
Distance measurement - Jaccard distance
Develop fixed asset management system, what voice is used to develop fixed asset management system
R language ggplot2 visualization: visualize the line chart and add customized X-axis label information to the line chart using labs function
How can retail enterprises open the second growth curve under the full link digital transformation
"Patient's family, please come here" reading notes
新手必看,点击两个按钮切换至不同的内容
C file input operation