【问题标题】:Binary format of memory address. Computer organization内存地址的二进制格式。计算机组织
【发布时间】:2014-06-17 04:46:37
【问题描述】:

我在理解这里发生的事情时遇到了一些问题,而且我似乎无法理解它。

注意事项: Course notes about topic

例子:

Memory location 0x1f6
What is the binary format of this address? 1 1111 0110
What are tag, block index, and block offset? 3, 7, 6

我自己的作品:

Memory location 0x033
What is the binary format of this address? 0 0011 0011
What are tag, block index, and block offset? 0 6, 3

Memory location 0x009
What is the binary format of this address? 0 0000 1001
What are tag, block index, and block offset? 0, 1, 1

Memory location 0x652
What is the binary format of this address? 0110 0101 0010
What are tag, block index, and block offset? 12, 10, 2

这些是我的尝试,但我不知道我是否做对了,而且我感觉我不是,至少对于最后一个,我认为这是错误的。谁能指出我正确的方向?

【问题讨论】:

  • 答案很大程度上取决于对位的解释,这是您的家庭作业或课堂作业所定义的。解码内存地址没有通用的定义。
  • @nneonneo 我附上了我们收到的关于该主题的唯一部分笔记。

标签: memory operating-system virtual-memory


【解决方案1】:

我最终弄明白了。块偏移量取决于块大小,在本例中为 16 字节,因此需要 4 个二进制数字来表示它。接下来,块索引取决于块的数量,在本例中为 8 (0-7),这需要 3 个二进制数字。最后,标签由十六进制内存位置转换为二进制后剩余的二进制数字组成。

例子

Memory location 0x652
What is the binary format of this address? 0110 0101 0010
What is the binary representation of tag, block index, and block offset? 1100 101 0010
What are tag, block index, and block offset? 12, 7, 2

【讨论】:

    猜你喜欢
    • 2014-05-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-04-20
    • 2021-03-05
    • 1970-01-01
    • 1970-01-01
    • 2013-10-26
    相关资源
    最近更新 更多