当前位置:网站首页>Storage of integer and floating point numbers in memory
Storage of integer and floating point numbers in memory
2022-07-21 04:50:00 【Finally become master Kangkang】
The storage of integers :
There are three ways to represent integers in a computer : Original code 、 Inverse code 、 Complement code . Integers are all used Complement code In memory . The original inverse complement of positive numbers is the same , The original inverse complement of negative numbers needs to be converted , The conversion rules are as follows :
Inverse code is to keep the sign bit of the original code unchanged , The remaining binary bits are reversed by bit .
Complement is the binary bit of inverse code +1..
Why integers are stored in memory in the form of complement ?
Because when adding and subtracting ,cpu You can only process addition, not subtraction (cpu Only adders ), And the original code and the inverse code are converted in the same way , No need for additional hardware circuits .
Introduction of big end and small end :
When we know that integers are stored in memory with complements , How is it stored in memory ? Now I want to introduce the concepts of big end storage and small end storage , Tell us how it is stored .
Big end : The low byte order is stored at the high address of the memory address , The high byte order is stored at the low address of the memory address . The small end : The low byte order is stored at the low address of the memory address , The high byte order is stored at the high address of the memory address .
At this time, the middle of my machine a The value of is stored upside down , The low byte order is stored at the low address of the memory address , So it's small end storage .
Floating point storage :
边栏推荐
- JS笔试题--正则表达式
- [cloud native kubernetes] how to use the initialization container under the kubernetes cluster
- 如何合并多个工作表或多个工作簿?3种合并方法都在这
- 关于XML 编辑工具
- End, to my college life
- SCS [1] today starts a single-cell journey, describing the past and present lives of single-cell sequencing
- Extract the characters in the list in comma separated form
- 通俗解释: IaaS,PaaS和SaaS的区别
- DOM XSS的原理与防护
- 基于STM32设计的动态密码锁
猜你喜欢
FigDraw 12. SCI 文章绘图之相关性矩阵图(Correlation Matrix)
Configuration of static routes to achieve network wide accessibility
整数及浮点数在内存中的存储
DNA 6. 基因组变异之绘制精美瀑布图(ComplexHeatmap)
FigDraw 14. SCI 文章绘图之和弦图及文章复现(Chord Diagram)
c语言文件操作管理(下)
DNA 8. 癌症的突变异质性及寻找新的癌症驱动基因(MutSigCV)
FigDraw 11. SCI 文章绘图之小提琴图 (ViolinPlot)
Excel中实用的3个数据透视表操作技巧,简单高效!
Jupyternotebook plug-in management and installation
随机推荐
c语言文件操作管理(下)
敏捷开发模式下SDL实践
如何培养真正的数据分析思维?附实践案例
Programming and Philosophy (1)
深度解析字符串和内存函数
What is the easiest explanation for SaaS? Just read this one
Detailed explanation of five data types of redis
Keras calls plot_ Model error reporting solution
C语言程序设计技巧之命令行参数
NAT network address translation
【FPGA教程案例32】通信案例2——基于FPGA的FSK调制信号产生
与传统IT开发相比,低代码平台有何优势?
FigDraw 15. SCI 文章绘图之多组学圈图(OmicCircos)
Reflect的十三个语法学习
RNA 23. Risk factor association diagram of Cox model of expressed genes in SCI articles (ggrisk)
DNA 10. Identify oncodrivecluster
ibatis与SQL注入
Concepts de base de la langue C - petites connaissances une fois par jour
關於XML 編輯工具
FigDraw 14. Chord diagram of SCI article drawing and article reproduction (chord diagram)