我不明白在内存寻址中的一些东西(I don't understand something in memory addressing)

编程入门 行业动态 更新时间:2024-10-25 13:20:12
我不明白在内存寻址中的一些东西(I don't understand something in memory addressing)

我有一个非常简单的(n00b)问题。

一个20位的外部地址总线给了一个1 MB的物理地址空间(2 ^ 20 = 1,048,576)。(Wikipedia)

为什么是1 MB?

2^20 = 1,048,576 bit = 1Mbit = 128KByte not 1MB

我误解了一些东西。

I have a very simple (n00b) question.

A 20-bit external address bus gave a 1 MB physical address space (2^20 = 1,048,576).(Wikipedia)

Why 1 MByte?

2^20 = 1,048,576 bit = 1Mbit = 128KByte not 1MB

I misunderstood something.

最满意答案

当你有20位时,你最多可以处理2^20 。 这是您的范围 ,而不是位数。

也就是说,如果你有8位,你的范围是255(无符号)而不是2 ^ 8位。

因此,使用20位可以处理2 ^ 20字节,即1MB

即20位,您可以表示从0到2^20 = 1,048,576的地址。 也就是说,您可以引用最多1MB的内存。

When you have 20 bits you can address up to 2^20. This is your range, not the number of bits.

I.e. if you have 8 bits your range is up to 255 (unsigned) not 2^8 bits.

So with 20 bits you can address up to 2^20 bytes i.e. 1MB

I.e. with 20 bits you can represent addresses from 0 up to 2^20 = 1,048,576. I.e. you can reference up to 1MB of memory.

更多推荐

本文发布于:2023-08-06 19:48:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1455352.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:我不   内存   东西   addressing   memory

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!