Comments (3)
直播我会说,先Pass
from computer-basics.
三个字段分别是 S M E
S 决定这个数是正数还是负数(s=0为正数,s=1为负数)
M 代表二进制小数
E 代表阶码,作用是指明小数点在数据中的位置
比如 0 0110 0100 -> 0(位数 s) 0110(阶码 E) 0100 (小数 M)
通过公式计算就可以得出这个数等于 0.625
仅个人理解
from computer-basics.
首先记住:
一个浮点数 (Value) 的表示其实可以这样表示:
Value = sign * exponent * fraction。
也就是浮点数的实际值,等于符号位(sign bit)乘以指数偏移值(exponent bias)再乘以分数值(fraction)。分数值也称尾数值。
我举一个例子:
8.25用二进制形式表示为1000.01,表示成二进制的指数形式为1.00001 * 23,用科学计数法则表示为1.00001 * 2E3。
因为是正数,符号位即最高位为0;
指数位为3 + 127(移位存储) = 130,二进制形式是10000010;
尾数部分00001 = 0000100 00000000 00000000(23位)。
所以8.25在内存中储存为:0 10000010 00001000000000000000000
from computer-basics.
Related Issues (20)
- 第二章 2.3.6-2.3.7 整数乘法及除法 HOT 1
- 6.5章节中提及的概念:局部变量存储在寄存器中 HOT 2
- 动态链接的问题 HOT 1
- 3.7.3 数据传递(栈帧相关问题) HOT 2
- 牺牲页的问题 HOT 1
- 关联问题
- 关联问题 HOT 1
- 为什么64位的计算机可以运行32位计算机编译出来的程序 HOT 1
- signal处理会中断进程,为什么还需要使用异步安全的函数呢 HOT 1
- 第八章 异常控制流 8.5小节的程序问题 HOT 1
- 过程调用中使用的栈是线程独有还是线程共享? HOT 1
- 第九章mmap,文件映射,匿名映射的区别,及Android共享内存相关的问题 HOT 1
- 深入理解计算机系统第八章8.2.4关于用户模式和内核模式的问题(p510) HOT 1
- 在linux进程中的fd
- 关于进程回收的问题
- 静态库链接的问题
- 第12章,12.1.2,进程疑问
- 第六章书430页,高速缓存命中这块看不明白
- 节头表与段头表映射字段.shstrtab
- c程序堆与数据结构堆得区别
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from computer-basics.