Anda di halaman 1dari 5

Accepted Answer

HiCustomer You would need 23 bits to address each byte in a byte-addressable (2M x 32) memory module. Here is the breakdown of where the address bits are needed -

1. Individual Byte Addressing - 2 bits required. Each 32-bit word comprises (4 x 8 bit) bytes. Therefore, 2 bits are required to resolve all (2^2 = 4) bytes in each 32-bit word.

2. Individual Word Addressing - 21 bits required. The 2 megaword address space has (2,097,152 = 2^21) individual 32-bit word addresses. Therefore, 21 bits are required to resolve all (2,097,152 x 32-bit words) in the entire address space.

Thus, a total of (2 + 21 = 23) bits are required to resolve each byte within the entire address space.

Depending on the particular device or module being used, there will normally also be various control bits required to manage the device' operation (eg, read/write flags, tristate controls, etc). However, in principle, control and status signals are a separate issue to the addressing requirements.

byte: 8 bits word: 2 bytes or more. Depending on the CPU. byte addressable: If you access memory location 0x12345678, you'll get a byte sized value back (like 0x9) word addressable: If you access memory location 0x12345678, you'll get a word sized value back (like 0x54) Computes like to process values in its word size... 16-bit machines have word sizes of 2 bytes, 32-bit machines have word sizes of 4 bytes, 64-bit machines have word size of 8 bytes, etc. So maximum addressable memory is: 32-bit machine: 2 ^ 32 = 4G of byte - addressable space Current Intel machines out there are 32-bit, that's why windows only support up to 4G of RAM. 64-bit machine: 2 ^ 64 = 16 exbibytes Next gen machines are 64-bit and overcomes the 4G of ram limit. That's why you have Windows Vista-64 for these machines. Most PCs out there are byte addressable, 4 byte words Many embedded hardware devices (such as ethernet controllers) are word

addressable, 2 byte words. 1) 16 chips. 2) 2Mx32 means 2Mx32bit. One byte is 8bits. So you need to address 2Mx4=8M. Since 2^23=8M, you need 23 bits of address space. If it is word addressable

Sure. Just multiply out 2Mx16. That's how many bits you need to store. Now, you have to build that many bits of storage from 256kX8. How many of those do you need? 2Mx16 = N (256Kx8). N = 16. __________________ 1. Suppose that a 2M x 16 main memory is built using 256K 8 RAM chips and memory is word-addressable. 1. How many RAM chips are necessary? 2. How many RAM chips are there per memory word? 3. How many address bits are needed for each RAM chip? 4. How many banks will this memory have? 5. How many address bits are needed for all of memory? Ans: 6. 16 (2 M x 16 / 256K x 8 = 16) 7. 2 (16 = 2 x 8) 8. 256K = 218, so 18 bits 9. 8 10. 2M = 221, so 21 bits 11. 6 points) List the hexadecimal code for the following program (hand assemble it). Hex Label Instruction Address 100 Load A 101 Add One 102 Jump S1 103 S2, Add One 104 Store A 105 Halt 106 S1, Add A 107 Jump S2

108 109

A, HEX One, HEX

0023 0001

12. (4 points) What are the contents of the symbol table for the preceding program? Ans: 13. 1108 3109 9106 3109 2108 7000 3108 9103 0023 0001 A 108 One 109 S1 106 S2 103 1. (10 points) Write the following code segment in MARIE assembly language: Sum = 0; for X = 1 to 10 do Sum = Sum + X; Ans: ORG 100 Load One /Load constant Store X /Initialize loop control variable X Load X /Load X Subt Ten /Compare X to 10 SkipCond 000 /If AC < 0 (X is less than 10), continue loop Jump Endloop /If X is not less than 10, terminate loop Load Sum

Loop,

Add Store Load Add Store Jump Endloop, Load Output Halt Sum, Dec X, Dec One, Dec Ten, Dec END

X Sum X One X Loop Sum

/Add X to Sum /Store result in Sum /Increment X

/Print Sum /terminate program 0 0 1 10 /Storage for X /The constant value 1 /The loop constant

Solution
How many bits would you need to address a 2M 32 memory if
a. The memory is byte-addressable? b. The memory is word-addressable? Ans.
a. There are 2M 4 bytes which equals 2 220 22 = 223 total bytes, so 23 bits are needed for an address b. There are 2M words which equals 2 220 = 221, so 21 bits are required for an address

Suppose that a 2M x 16 main memory is built using 256K 8 RAM chips and memory is word-addressable.
a. How many RAM chips are necessary?
16 (8 rows of 2 columns)

b. How many RAM chips are there per memory word?


2

c. How many address bits are needed for each RAM chip?
256 k = 218 so 18 bits

d. How many banks will this memory have?


8

e. How many address bits are needed for all of memory?


2M = 221 so 21 bits
How many Ram Chips are needed? 16 right? How many Ram Chips are there per memory work? How many Address bits are needed for each Ram Chip? 512k i think How many blanks will this memory have? How many Address bits are needed for all the memory in high-order interleaving is used, where would address 14(which is E in Hex) bre located.

Any help and an explanation would be so helpfull


y y y

2 years ago (Tiebreaker) Report Abuse

Sign in to Vote for the Best Answer

Answers (1)
y

Since the RAM chips are 512K by 8, we'll need two chips to make 512K by 16. Or 4 chips to make 1M x 16. So to make 16M x 16, we'll need 64 chips. To see it another way 16Mx16 is 32MB (16 bits is two bytes). 512Kbx8 is 512KB. So 64 chips are needed. Since the chips are 8 bits wide and each memory location is 16 bits wide, two chips will be selected for each address. To address 512K (2^19) addresses, you need 19 address lines. I assume you mean how many banks. Each bank will be two chips and each bank will provide 512K x 16. So there will be 32 banks to make 16M x 16. You need 19 address lines to select the address inside the bank. Since there are 32 (2^5) banks, you'll need 5 address lines to select the bank. 19+5 = 24. So 24 address lines are needed. High-order interleaving means that each bank has a contiguous block of memory addresses. So bank zero has the first 512K addresses starting with zero. (In low-order interleaving, address zero is in the first bank, one in the second bank, and so on, wrapping around.) So address 14 will be the 15th address (since address 0 is the 1st address) in the first bank.

Anda mungkin juga menyukai