无法理解虚拟地址如何转换为二进制形式
Can't understand how virtual address was converted to binary form
这是我操作系统课本上的问答:
问题:
A certain computer provides its users with a virtual-memory space of 232 bytes.
The computer has 218 bytes of physical memory. The virtual memory is implemented by paging,
and the page size is 4096 bytes. A user process generates the virtual address 11123456.
Explain how the system establishes the corresponding physical location.
Distinguish between software and hardware operations.
答案:
The virtual address in binary form is
0001 0001 0001 0010 0011 0100 0101 0110
当我将“11123456”插入十进制到二进制转换器(如此处:https://www.rapidtables.com/convert/number/decimal-to-binary.html)时,结果如下:101010011011101100000000
与书上的答案不同。
此外,当我使用此处的方法手动转换时:https://indepth.dev/the-simple-math-behind-decimal-binary-conversion-algorithms/
我还是有所不同。
我只是很困惑那个虚拟地址是如何转换成二进制形式的……
谢谢!
你觉得
11123456
是一个十进制数,但它不是。数字的计算机表示形式是二进制、八进制或十六进制。在这种情况下是十六进制。如果将上述数字从十六进制转换为二进制形式,您将获得结果:
0001 0001 0001 0010 0011 0100 0101 0110
解释:
Hexadecimal -> Binary
1 -> 0001
2 -> 0010
3 -> 0011
4 -> 0100
5 -> 0101
6 -> 0110
...
这是我操作系统课本上的问答:
问题:
A certain computer provides its users with a virtual-memory space of 232 bytes.
The computer has 218 bytes of physical memory. The virtual memory is implemented by paging,
and the page size is 4096 bytes. A user process generates the virtual address 11123456.
Explain how the system establishes the corresponding physical location.
Distinguish between software and hardware operations.
答案:
The virtual address in binary form is
0001 0001 0001 0010 0011 0100 0101 0110
当我将“11123456”插入十进制到二进制转换器(如此处:https://www.rapidtables.com/convert/number/decimal-to-binary.html)时,结果如下:101010011011101100000000
与书上的答案不同。
此外,当我使用此处的方法手动转换时:https://indepth.dev/the-simple-math-behind-decimal-binary-conversion-algorithms/
我还是有所不同。
我只是很困惑那个虚拟地址是如何转换成二进制形式的……
谢谢!
你觉得
11123456
是一个十进制数,但它不是。数字的计算机表示形式是二进制、八进制或十六进制。在这种情况下是十六进制。如果将上述数字从十六进制转换为二进制形式,您将获得结果:
0001 0001 0001 0010 0011 0100 0101 0110
解释:
Hexadecimal -> Binary
1 -> 0001
2 -> 0010
3 -> 0011
4 -> 0100
5 -> 0101
6 -> 0110
...