# 計算機結構的問題!!

(a) Assume a microprocessor has 20-bit address bus and 16-bit data bus. The memory utilization involves 64K bytes for I/O device, 64K bytes for EPROM device,and others for SRAM. How many SRAM devices of size 64Kx8 are required in such a microprocessor?

(b) For four storage devices in a computer: cache memory, register, main memory, and hard disk, compare the speed of these four storage devices.

(c) For operations in stack, write 4 operations of PUSH and/or POP for executing the exchange of registers A and B contents.

(d) Consider a multiplication using ROM table, what is the size of the ROM for realizing the multiplication of two 4-bit operands ?

### 2 Answers

Rating
• Dave
Lv 7
1 decade ago
Favorite Answer

a) 16 bit data bus, 所以每個獨立的 address 就可傳 16/8 = 2 個 byte… 又，20 bit address bus，所以可以定址出 2^20 個不同的 address…

所以可以定址 2^20 x 2 = 2^21 bytes 的總記憶體

64K (2^16) byte 被 IO device 用去，64K byte 被 EPROM 用掉，所以剩下 2^21 - 2^16- 2^16 = 2^21 - 2^17 bytes 的空間可讓 SRAM 來用…

每個 SRAM device 又說是 64K byte 大，所以就是可以再用 (2^21 - 2^17) / 2^16 = 2^5 - 2 = 30 個 SRAM device

b) register > cache > main memory > hard disk

c) push a, push b, pop a, pop b

d) 4 bit x 4 bit，2^4=16 種組合 x 16 種組合 = 2^8 種組合，每一組合需一筆 8 bit (1 byte) entry (因 2 個 4 bit 相乘，最大的答案會是 8 bit)，所以需要 2^8 byte = 256 bytes 的 ROM 空間作 table lookup

2009-04-19 17:44:19 補充：

push B，又馬上 pop B，就把本來在 B 東西又放回 B 啦，就沒法 swap 了… 要改，只能這樣改：push B, push A, pop B, pop A

• 1 decade ago

若(C)小題的答案...我可以寫成 pushA, puchB, popB, popA 嗎??

Still have questions? Get your answers by asking now.