Assignment 2 PDF

Title Assignment 2
Course Computer Organisation and Architecture
Institution Charles Sturt University
Pages 6
File Size 496 KB
File Type PDF
Total Downloads 93
Total Views 133

Summary

Assignment 2...


Description

[ASSIGNMENT 4/ITC544] May 15, 2015

Q.N.1. Assemble the MARIE program below. Hex Address 100 101 102 103 104 105 106 107 108 109 10A 10B

Label Start

A, B, C, D,

Instruction LOAD A ADD B STORE D CLEAR OUTPUT ADDI D STORE B HALT HEX 00FC DEC 14 HEX 0108 HEX 0000

a) List the hexadecimal code for each instruction [3 marks] b) Draw the symbol table [2 marks] c) What is the value stored in the AC when the program terminates. [1 mark]

Solution: a. The hexadecimal code for each instruction are as follows: Hex Address 100 101 102 103 104 105 106 107 108 109 10A 10B

Label Start

A, B, C, D,

Instruction LOAD A ADD B STORE D CLEAR OUTPUT ADDI D STORE B HALT HEX 00FC DEC 14 HEX 0108 HEX 0000

b. The symbol table is as follows: Symbol A B C D

Hexadecimal Code 1108 3109 210B A000 6000 B10B 2109 7000 00FC 000E 0108 0000

Location 108 109 10A 10B

c. The value stored in the AC when the program terminates is HEX 0108 .

Asmin Bhandari/11579533

Page 1

[ASSIGNMENT 4/ITC544] May 15, 2015

Fig. Marie Simulator Of Above Code

Fig.Codes Asssembled And In Editor

Fig. Symbol Table

Asmin Bhandari/11579533

Page 2

[ASSIGNMENT 4/ITC544] May 15, 2015

Fig. Marie Data Path Simulator

Q.N.2. Write a MARIE program using a loop that multiplies two numbers by using repeated addition. For example, to multiply 3 x 6, the program would add 3 six times e.g. 3 + 3 + 3 + 3 + 3 + 3. You should write and run the program using MARIE simulator. Also write the code with Address, Instruction, and Comments . [8 marks]

Solution: Add Code Instruction

100 101 102 103 104 105 106 107 108 109 10A 10B 10C 10D 10E 10F 110 111 112

5000 2111 5000 2112 110F 3111 210F 1112 4110 2112 8400 9104 110F 6000 7000 0000 0001 0006 0003

Comments

ORG 100 I NPUT / get t i ngi nput STOREx / st or i ngfir sti nput I NPUT / get t i ngi nput STOREy / st or i ngsecondi nput LoopLOADz / Loadzt oaddsum ADDx / Addi ngval ueofxyt i mest ogetpr oduct STOREz / St or i ngval uei nzt oobt ai npr oduct LOADy / Loadi ngyt ocheckpr oduct SUBTOne / Subt r act i ngt ocheckt het i mesofaddi t i oni . e, pr od STOREy / St or i ngdecr easedval uet ocheckpr oduct SKI PCOND400 / checki ngt heval ueofaccumul at orf orl oop JUMPLoop EndLoopLOADz / EndLoop OUTPUT / out put HAL T z DEC0 / zi susedt ost or esum orfinalpr oduct One DEC1 / usedt oi ncr ementonet ocheckt henumberofpr od x DEC6 / Thei ni t i alv al ueofx y DEC3 / Thei ni t i alv al ueofy

Asmin Bhandari/11579533

Page 3

[ASSIGNMENT 4/ITC544] May 15, 2015

Fi g. Mar i eSi mul at orshowi ngpr oductof3and6

Fi g. Mar i eSi mul at orshowi ngpr oductof5and9

Fi g. Mar i eSi mul at orshowi ngpr oductof3and6

Q.N.3. The memory unit of a computer has 256K words of 32 bits each. The computer has an instruction format with 4 fields: an opcode field; a mode field to specify 1 of 7 addressing modes; a register address field to specify 1 of 60 registers; and a memory address field. Assume an instruction is 32 bits long. Answer the following:[6 marks] a) How large must the mode field be? b) How large must the register field be?

Asmin Bhandari/11579533

Page 4

[ASSIGNMENT 4/ITC544] May 15, 2015

c) How large must the address field be? d) How large is the opcode field?

Sol ut i on: a.Thei nst r uct i onf or mati swi t hf ourfiel dsuponwhi chi samodefiel dst o speci f y1of7addr essi ngmodes.So,i nor dert ospeci f y7addr essi ng modesi tneedst obe3bi t sbecause23=8. So,t hemodefiel dmustbe3bi t s. b.Ther egi st erfiel dmustspeci f y1of60r egi st er s.So,i nor dert oaddr ess 6 such,i tmustbe6bi t sbecause2=64. So,t her egi s t erfiel dmustbe6bi t s . c.Theaddr essfi el di st obef oundout : =256K =28* 210 =218 So,t headdr es sfiel di s18bi t s . d.Si nc e,t hei ns t r uct i oni s32bi tl ong, Opc ode=321863 =5 So,t heopc odei s5bi t s . Q. N. 4.

Web Application Development Internet has played one of the most significant and vital roles in the success of information age where the distance of miles has been reduced tremendously. Web application has played a major contributor role in this development and progress along with skyrocketing over the years and changing the perception we look at our daily lives.Web Application can be stated as the applications that use Internet assets and infrastructure to perform its functionality where quick and global accessibility is the core strength of web application. Some of the powerful and popular web applications are Facebook, Google, YouTube and many more that has completely transformed the world into a better and prosperous place. Web Application has a numerous advantages and importance that have caused them to be rise so rapidly in the modern world transforming not only technology but our lives too. Web application operates by using web technologies such as web browsers and web servers. The core reasons why web applications are preferred over the traditional software is the factor of accessibility. Firstly, the core reason of the success and use of web application is that it can be accessed from any point where Internet is accessible mostly using web protocols and web platforms and servers. Secondly, the reason of its use is lower cost and deployment, which reduces the installation time, cost and effort. Thirdly, The extensive use of web application is because of its multi user feature where different numbers of users can be working on a same system at the same time. So, the web application development has contributed to the age of technology [Ahmed H, 2001].

Asmin Bhandari/11579533

Page 5

[ASSIGNMENT 4/ITC544] May 15, 2015

Web application development is not only a combination of multi technologies that provides it powerful features that has made the web application even stronger. Generally, the web application development is compromised of two technologies for instance, frontend technology and backend technology. The frontend technology is also called client side coding consisting of HTML, CSS, JQUERY, JAVASCRIPT, and AJAX. The frontend technology is supported by back end technology which is also called as server side scripting or coding consisting of powerful programming language such as PHP, .NET, JAVA. Generally, the use of framework is dominant in backend development such as Zend, Laravel and Code Igniter. In case of PHP, Groovy On Gail, Spring in case of Java and many more. All of these technologies merge to develop the web application strengthen and further enhancing the application. The website application development can be divided into a number of categories according to its use and features provided by the web application. The load of data, interfaces with users and scope of the application defines the web application. Some of the categories are brochures web application development consisting of mostly static pages, service oriented web application such as web and mail servers, data intensive web application such as library, content management sites and information system web application which are mainly e-book, e-learning and resources collection sites. So, the web application is also devised of many categories making them even better and powerful tool. Using different methodologies that are generally project management methodologies develops web Application Development. We can find a numbers of different methodologies and process for the web application development but among which most important and dominant are waterfall, agile and rapid methodologies. Waterfall methodology is the traditional method of development which is rigid and mostly applicable in development of huge software whereas agile is used mostly for small application development which is applicable to fast change in time and environment. Some of the most used agile processes are Scrum, Kanban and more. So, the web application is developed nowadays by using a lot of software development life cycles mentioned above. Thus, the web application development is one of the major technologies that have been a part of the rapid change in information technology. The future shows a dominance of web application development where everything is going digital and global where it has played a key role. The dynamic characteristics and quality of web application development has skyrocketed the use of information in digital age. So, web engineering is also flourishing which deals with web application development. Thus, web application development is one of the most important and powerful feature of this age that has been a rapid change in IT industry. References: 

AhmedE.Hassan,‘ Ar chi t ect ur er ecover yofwebappl i cat i ons’ , Mast er ’ st hesi s, Uni v er s i t yo f Wat er l oo , 20 01 .



Zi emerS,AnAr chi t ect ur ef orWebAppl i cat i ons,vi ewedon t p: / / www. academi a. edu/ 3692495/ An_Ar chi t ect ur e_f or _Web_A 15/ 05/ 2015.



KohanB,‘ Gui deToWebAppl i cat i onDevel opment ’ ,vi ewedon15/ 05/ 2015. t p: / / www. coment um. com/ gui det owebappl i cat i ondev el opment . ht ml >...


Similar Free PDFs