• +44-190-022-0819 +44-190-022-0819
  • +1-248-268-9041 +1-248-268-9041
  • +61288800241 +61288800241

SEARCH SOLUTION

Search your solution from list of 1000+ questions

31-07-2018

1. (20 points) Short Questions

  1. (4 points)When comparing to the Harvard architecture, name one advantage and one disadvantage of the Von Neumann architecture

 

Advantage: ______________________________

________________________________________

________________________________________

________________________________________
Disadvantage:____________________________

________________________________________

________________________________________
________________________________________

  1.  (2 points) In Arduino lab #3, why is it not a good ideato store/retrievetemporary data in the EEPROM?

 

  1. (4 points) For an Intel processor, what are the memory contents after executing the following instructions?

 

movl $0x89ABCDEF, %eax

movl %eax, 0x100100

 

100100:  ______

100101:  ______

100102:  ______

100103:  ______

 

 

  1. (4 points) What is the advantage and disadvantage of using dynamic random access memory (DRAM)?

 

Advantage: ______________________________

________________________________________

________________________________________


Disadvantage:____________________________

________________________________________

________________________________________

 

 

 

  1.  (2points) For the mp1 tutor program running on the ulab, what happens when we do md 100100 ?

 

 

(2 points)For the mp1 tutor program running on the

tutor VM, what happens when we do md 100100?

 

 

 

(2 points) Why are the results different?

 

 

2. (20 points) Evaluations

a. (10 points) Memory at address 0x00100250 contains the following 16 bytes of data:

 

00100250 58 0210 00 01 23 45 67

89 abcd ef00 01 10  11

 

%esp = 0x 00100254

 

 

Show the contents of the %eaxand %espregister

afterexecuting the following instruction:

 

popl   %eax

 

 

 

%eax = _________________________

 

 

%esp= __________________________

 

 

 

b. (10 points) Show the hex value of the %eax register and state of the specified condition flags after executing the followinginstructions.

 

      movl $0xffff ffff, %eax

addl           $0x1, %eax

     

            %eax = _________________ CF = ____

 

            SF = ____       ZF = ____       OF = ____

 

 

3. (20 points) Computer Architecture

How come the following cupid program does not get the right result in a Harvard architecture machine:

 

#code to get the ID of CPU using instruction 0x0fa2

_cpuid:

movb $0x0f, cpuid1  # patch in the cpuid first byte

movb $0xa2, cpuid2  # patch in the cpuid second byte

movl $0,%eax        # input to cpuid for ID value

cpuid1:               # hex for cpuid instruction here

    nop                 # 0x0f replaces 0x90

cpuid2:

    nop                 # 0xa2 replaces 0x90

. . .

 

 

4. (40 points) Assembly language program

 

Write a C callable assembly language function  (lower.s) to changean array of upper characters to

lower case.

 

The function prototype in C is:

 

            extern void lower(char * a);

 

The function uses the pointer argument to read an array ofcharacters.Your assembly language programconverts upper case characters to lower case and stores the result  in the samearray.For characters that are not upper case,   leave them unchanged.

 

The C main program that calls the assembly language function is shown as follows:

 

/* lowerc.c: C driver for the convert function

*/

 

#include <stdio.h> extern void lower(char *a);

 

int main()

{

char input[]= “LAUGH OUT LOUD (lol)”;

printf("Before conversion:%s\\n", input);

lower(input);

printf("After  conversion:%s\\n", input);

return 0; 

}

 

Answers:

  1. Short Questions
    1. Advantage of Von Neumann architecture:

Program and data memory in 1 address space. More efficient use of memory space

 

Disadvantage of Von Neumann architecture:

It is slower because program and data memory location has to be accessed sequentially. Cannot do parallel fetch and decode.

 

  1. EEPROM has a limited lifetime number in terms of the number of times it can be read/written.

 

c. Intel processors store data in memory using the little Endian format:

  100100:  0xEF

  100101:  0xCD

  100102:  0xAB

  100103:  0x89

 

d. Advantage:

DRAMs are higher density, fast access and low cost

 

Disadvantage:

DRAMs need to be refreshed periodically in order to retain the memory.

 

  1. In the ulab, md 0x100100 will result in a segmentation fault.

 

In the tutor VM, md 0x100100 will display the contents of the 16 bytes starting at location 0x100100.

 

The reason for the different result is that the UNIX OS in ulab prevents the tutor application from accessing memory locations that it does not have permission to access.

 

  1. Evaluations

a. 00100250 58 02 10 00 01 23 45 67

 

 

89 ab cd ef00 01 10 11

 

     %esp%eax (little endian)

Product code: Architecture-QA313

 

Download Questions

architeture-qa313

Related Questions in (Architecture Assignment Help)

13-01-2018

Solution: The Journal of Helene Berr and Rue Ordener, Rue Labat 2 evidences that prove the difficulty and destructiveness that the people had to face in those four years. As mentioned by Berr (2009, p.23), in h ...

18-01-2018

Solution: Employee communication highlights the sharing of ideas and information. In this competitive business world, information exchange is essential among employees to develop team performance effectively. m ...

18-01-2018

Solution: As per Section 1 of the Thirteenth year plan describes about China’s two key objectives that will be accomplished if the National People’s Congress or the standing committee of this party passes t ...

18-01-2018

Solution: (Feldman 2005) reference information extraction to be one of the weightiest pre-processing method that escalates the text mining potential significantly. Pre-processing is an essential part in informa ...

18-01-2018

Solution: The pro forma income statement represents a trending statement that includes the probable net income value for the company considering the current growth and decline rates valid throughout the period ...

18-01-2018

Solution: Mode is defined as the value which occurs more frequently in the data set. The mode for non-business is 82 while for business is only 59. P value can be calculated from z table . As per z table p valu ...

18-01-2018

Solution: ABC assumes that there are different activities involved in different processes that cause costs andthe product, services, and customers are reasons for those activities. The UK customer segment is br ...

19-01-2018

Solution: Residual earnings valuation method is used to calculate the intrinsic value of the stock based on the expected residual income of the company in the coming years. The residual income is discounted bac ...