185k views
5 votes
Word process all answers. Show work for partial credit. 1. We have a 64Gx128 word addressable memory built from 8Gx64 RAM chips. Memory uses low-order interleave. NOTE: 64Gx128 means 64G of words, each word is 128 bits.

a. How many RAM chips are needed to make up memory?
b. How many banks does memory have?
c. How many bits are needed for a memory address?
d. Of those bits from part c, which are used for the bank select, and which are used for the address in the bank? For questions 2-3, provide the full MARIE RTN for these new MARIE instructions. Include the fetch, decode, get operand (if necessary) and execution stages (which may include writing back to memory). X in these instructions means means the last 12 bits of the 16-bit instruction and should be referenced as IR[11..0] in your RTN. For question 2, assume we have a control register, SP (stack pointer). 2. Pop X – this instruction retrieves the datum at the top of the stack and stores it to memory location X. After retrieving the datum from the stack, decrement the SP register. 3. StoreOnZero X – this instruction is a conditional store which retrieves X from memory and if it is 0, then stores the value of the AC there. In order to test X in the ALU, it must be in the AC, which would wipe out the value we would potential store. So, assume instead that once X is fetched into the MBR, the ALU can test the value from there (that is, the ALU can test either the AC or the MBR to 0). For 4-5, convert the C code to equivalent MARIE code. To reference numbers like 1 (for instance when doing count++), you can either use #1 or assume 1 is stored in the variable one. 4. count=0; scan("%d", &x); while(x>0) x==10) count++; scanf("%d", &x); printf("%d", count); 5. if(x – y != z) x++; else if(x + y <= z) y++; else z++; 6. Determine the total number of cycles needed to execute the following MARIE program. Every instruction must be fetched, decoded and executed. Fetch will always be 4 cycles (use the two steps of MBR  M[MAR], IR  MBR instead of the authors’ single step IR  M[MAR]). Decoding takes 1 cycle to decode IR[15-12] plus an additional cycle if IR[11-0] needs to be moved to MAR. You will have to decide based on each instruction if that step (MAR  IR[11-0]) is used or not. Use the RTN on slide 25 to determine if there is a get operand step and the number of cycles required for execution. For instance, Subt gets an operand and has 1 cycle of execution. The skipcond will execute in either 1 cycle (comparing the AC to 0) or 2 cycles (comparing and then incrementing the PC) depending on whether the condition is true or not. Halt takes 5 total cycles (fetch and decode only, no execution).

User Dgmstuart
by
7.7k points

2 Answers

6 votes

Final answer:

The encompass complex concepts in computer architecture and programming, focusing on memory systems, generating MARIE instructions, converting C code to MARIE code, and evaluating the execution cycles of a MARIE program.

Step-by-step explanation:

The presented are related to various aspects of computer architecture and programming in the context of the MARIE assembly language, which is a pedagogical tool used for teaching basic computer architecture concepts. The questions involve memory architecture, creating specific instructions, translating C code into MARIE code, and analyzing instruction cycles.

For memory architecture, the student is asked to determine the number of RAM chips needed, the number of memory banks, and the address space details. The questions on creating new MARIE instructions require writing out the sequence of register transfer notation (RTN) steps necessary to execute the specified instructions.

For translating C code into MARIE code, the student must express given C code snippets as sequences of instructions in the MARIE assembly language. Finally, the analysis of instruction cycles involves counting the total number of cycles needed to execute a given MARIE program, factoring in fetch, decode, and execution phases.

User Jimenez
by
8.6k points
2 votes

Final answer:

Question 63: The table below shows the macrostates and all of the individual microstates for tossing 6 coins. There are 7 macrostates and the total number of microstates is 64. The chance of tossing 5 heads and 1 tail is 9.38%.

Question 64: To find the mass of ice melting that involves the same heat transfer as 12.65 MJ, use the specific latent heat of fusion for ice. To find the equivalent hours of operation to melt 900 kg of ice, use the same formula.

Step-by-step explanation:

Question 63:

(a) The table below shows the macrostates and all of the individual microstates for tossing 6 coins:

MacrostateMicrostates6 heads15 heads, 1 tail64 heads, 2 tails153 heads, 3 tails202 heads, 4 tails151 head, 5 tails66 tails1

(b) There are 7 macrostates.

(c) The total number of microstates is 64.

(d) The chance of tossing 5 heads and 1 tail is 6/64, or 9.38%.

(e) To determine how much more likely you are to toss 3 heads and 3 tails compared to 5 heads and 1 tail, we take the ratio of the number of microstates: 20/6 = 3.33 times more likely.

Question 64:

(a) To find the mass of ice melting that involves the same heat transfer as 12.65 MJ, we use the specific latent heat of fusion for ice: 334 kJ/kg. Mass = heat transfer / specific latent heat = (12.65 MJ) / (334 kJ/kg) = 0.038 kg.

(b) To find the equivalent hours of operation to melt 900 kg of ice, we use the same formula: hours = mass of ice / (heat transfer / time) = (900 kg) / (0.038 kg/h) = 23684.21 hours.

(c) To evaluate the relative costs, we need to consider the cost of operating the air conditioner compared to the cost of using ice. If the cost of operating the air conditioner is lower than the cost of using ice, then the air conditioner would be more cost-effective. Additional information is needed to determine the cost of operating the air conditioner.

User Kvadityaaz
by
8.3k points