当前位置:网站首页>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
}
边栏推荐
- Codeworks 5 questions per day (1700 average) - day 4
- [0701] [论文阅读] Alleviating Data Imbalance Issue with Perturbed Input During Inference
- Introduction to the paper | analysis and criticism of using the pre training language model as a knowledge base
- FastDFS安装
- Tutoriel (5.0) 10. Dépannage * fortiedr * fortinet Network Security expert NSE 5
- 云呐|为什么要用固定资产管理系统,怎么启用固定资产管理系统
- R语言ggplot2可视化:gganimate包创建动态柱状图动画(gif)、使用transition_states函数在动画中沿给定维度逐步显示柱状图
- Date tool class (updated from time to time)
- QT中的QPropertyAnimation使用和toast案列
- 使用xml文件打印mybaties-log插件的方式
猜你喜欢
Yolov3 trains its own data set to generate train txt
性能测试如何创造业务价值
[fluent] dart data type (VaR data type | object data type)
[0701] [论文阅读] Alleviating Data Imbalance Issue with Perturbed Input During Inference
Obligatoire pour les débutants, cliquez sur deux boutons pour passer à un contenu différent
消息队列消息丢失和消息重复发送的处理策略
M2dgr: slam data set of multi-source and multi scene ground robot (ICRA 2022)
迷你高尔夫球场:伦敦休闲旅游好去处
How can retail enterprises open the second growth curve under the full link digital transformation
数据降维——主成分分析
随机推荐
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
When converting from list to map, if a certain attribute may cause key duplication and exceptions, you can set the way to deal with this duplication
The difference between interceptor and filter
线程应用实例
ICDE 2023|TKDE Poster Session(CFP)
[0701] [paper reading] allowing data imbalance issue with perforated input during influence
Markdown basic grammar
juypter notebook 修改默认打开文件夹以及默认浏览器
Mini Golf Course: a good place for leisure and tourism in London
yolov3 训练自己的数据集之生成train.txt
reduce--遍历元素计算 具体的计算公式需要传入 结合BigDecimal
新加坡暑假旅遊攻略:一天玩轉新加坡聖淘沙島
[paper reading] Ca net: leveraging contextual features for lung cancer prediction
STM32G0 USB DFU 升级校验出错-2
聊聊电商系统中红包活动设计
Hospital online inquiry source code hospital video inquiry source code hospital applet source code
日期工具类(不定时更新)
电商系统中常见的 9 大坑,你踩过没?
Date tool class (updated from time to time)
思维意识转变是施工企业数字化转型成败的关键