We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>

Looking For Something at vustudents.ning.com? Click Here to Search

www.bit.ly/vucodes

+ Link For Assignments, GDBs & Online Quizzes Solution

www.bit.ly/papersvu

+ Link For Past Papers, Solved MCQs, Short Notes & More

CS501 Assignment No 01 Solution & Discussion Due Date: 09-11-2017

Questions No 01 Marks (12)
Write the code/instructions to implement the expression A = (B – C) + 15(D - 45) on 3, 2, 1, and 0-address machines.


Questions No 02 Marks (08)
Compute the total memory traffic in bytes for both instruction fetch and instruction execution for the code that implements the expression evaluation for the four machines in question # 1.

Note:
Assume opcodes occupy one byte, addresses occupy three bytes, and data values also occupy three bytes. Don’t mix it with code size of instruction.

+ How to Follow the New Added Discussions at Your Mail Address?

+ How to Join Subject Study Groups & Get Helping Material?

+ How to become Top Reputation, Angels, Intellectual, Featured Members & Moderators?

+ VU Students Reserves The Right to Delete Your Profile, If?


See Your Saved Posts Timeline

Views: 3108

.

+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

+ Click Here to Search (Looking For something at vustudents.ning.com?)

+ Click Here To Join (Our facebook study Group)

Attachments:

Replies to This Discussion

                                                           

BC150401472

                                                    ARSLAN

 

 

Assignment no 1:

CS501 - Advance Computer Architecture:

Due date: 9 Nov 2017:

 

Q-1)

 

Solution:

 

3-Address Machine

2-Address Machine

1-Address Machine

0-Address Machine

Subtract x,b,c

 

Subtract y,d,45

 

Multiply r,y,15

 

Add A,x,r

Load x,b

 

Subtract x,c

 

Load r,d

 

Subtract r,45

 

Multiply r,15

 

Add x,r

 

Store x,A

 

 

Load d

 

Subtract 45

 

Multiply 15

 

Store r

 

Load b

 

Subtract c

 

Store a

Push d

 

Push 45

 

Subtract

 

Push 15

 

Multiply

 

Push b

 

Push c

 

Subtract

 

Pop A

 

 

 

Q-2)

Solution:

0-Address Machine = 45 bytes                  (instruction fetch=27, instruction execution=18)

1-Address Machine = 49 bytes                  (instruction fetch=28, instruction execution=21)

2-Address Machine = 91 bytes                  (instruction fetch=49, instruction execution=42)

3-Address Machine = 76 bytes                  (instruction fetch=40, instruction execution=36)

 

 

 

 

Mя Hөиєү  thanks for sharing 

Note for All Members: You don’t need to go any other site for this assignment/GDB/Online Quiz solution, Because All discussed data of our members in this discussion are going from here to other sites. You can judge this at other sites yourself. So don’t waste your precious time with different links.

total memory traffic is
3-address machine ( ) byte
2-address machine ( ) byte
1-address machine ( ) byte
0-address machine ( ) byte

Advanced Computer Architecture (CS501)
Assignment # 01
VU ID: MC160400478
QUESTION#1
Write the code/instructions to implement the expression A = (B – C) + 15(D - 45) on 3, 2, 1, and 0-address machines
Answer:

.

3-Address Machine 2-Address Machine 1-Address Machine 0-Address
Sub x,b,c
Sub y,d,45
Mul r,y,15
Add A,x,r Load x,b
Sub x,c
Load r,d
Sub r,45
Mul r,15
Add x,r
Store x,A
ida d
suba 45
mula 15
sta r
Ida b
suba c
Sta a Push d
Push 45
Sub
Push 15
Mul
Push b
Push c
Sub
Pop A

QUESTION NO. 2
Compute the total memory traffic in bytes for both instruction fetch and instruction execution for the code that implements the expression evaluation for the four machines in question # 1.

Note:
Assume opcodes occupy one byte, addresses occupy three bytes, and data values also occupy three bytes. Don’t mix it with code size of instruction.
ANSWER:
For example
Load x, b, b requires 7 bytes to represent the instruction (1 byte for the opcode, 3 bytes for address x, and 3 bytes for address b). Fetching and executing requires reading 7 bytes of instruction, reading 3 bytes for B, and then writing 3 bytes for into x.
The total memory traffic is:
3-Address Machine: (76 )bytes
2-Address Machine: (91) bytes
1-Address Machine: (49) bytes
0-Address Machine: (45) bytes

CS501 Assignment#01 Solution 

Attachments:

how to solve question#2?

2nd question answer

0-Address machine = 45 bytes

1-Adress machine= 49 bytes

2-Address Machine = 91 bytes

3-Address Machine = 76 bytes

can any one please brief answer of Q2, 

1-address=if execution 18, then how fetch 27 ?

0-address=how 28fetch, 21 exe........why not 32fetch, 24exe?? what term to eliminate ??

koi plz ya bta do capital letter us kr skty hn ya nh...A = (B – C) + 15(D - 45)
is expression ki instruction ma..eg sub A,B,C like this..is it right???
plz fast

jo expression hai wohi use kro means capital

One mistake in zero address correct it, you all miss Add before pop A ?? 

2nd question ma bot confusion ho ri koi 2nd ka correct ans ya do ka procedure bata do kasy karna

RSS

Latest Activity

Farhan Amin replied to Farhan Amin's discussion your vu email address will deleted
10 minutes ago
Farhan Amin replied to Farhan Amin's discussion your vu email address will deleted
11 minutes ago
+ ! ! ! ! ! AaiMa AnsaRi liked + M.Tariq Malik's discussion CS201 Assignment No 01 Fall 2019 Solution & Discussion Due Date: 14-11-2019
22 minutes ago
+ ! ! ! ! ! AaiMa AnsaRi replied to + M.Tariq Malik's discussion MGT211 GDB Fall 2019 Solution & Discussion in the group MGT211 Introduction To Business
23 minutes ago
+ ! ! ! ! ! AaiMa AnsaRi joined + M.Tariq Malik's group
23 minutes ago
+ ! ! ! ! ! AaiMa AnsaRi liked + M.Tariq Malik's discussion MGT211 GDB Fall 2019 Solution & Discussion
27 minutes ago
+ Abb@s replied to Farhan Amin's discussion your vu email address will deleted
43 minutes ago
+ Danial replied to Farhan Amin's discussion your vu email address will deleted
1 hour ago
Shine--Ex-VUStudent liked + "J ɨ y ą ⋆'s discussion meliiiiiiii dailyyyyyyyyyyyyyyyyy milkkkkkkkkkkkkkkkkk :(
1 hour ago
+ Danial replied to Farhan Amin's discussion your vu email address will deleted
1 hour ago
Shine--Ex-VUStudent liked +"Certified Gangster"++'s discussion New invention of Microsoft
1 hour ago
Moji posted a discussion
1 hour ago
+ "αяsαℓ " Ќąƶµяɨ •" replied to + M.Tariq Malik's discussion MGT211 GDB Fall 2019 Solution & Discussion in the group MGT211 Introduction To Business
1 hour ago
Muhammad Usman Shahzad replied to + M.Tariq Malik's discussion CS601 Assignment No 01 Fall 2019 Solution & Discussion Due Date: 14-11-2019 in the group CS601 Data Communication
1 hour ago
Muhammad Usman Shahzad joined + M.Tariq Malik's group
1 hour ago
+ "αяsαℓ " Ќąƶµяɨ •" replied to sayyad saqib hussain shah's discussion HRM 626 HANDOUTS REQUIRED PLS
2 hours ago
+ "αяsαℓ " Ќąƶµяɨ •" replied to Farhan Amin's discussion your vu email address will deleted
2 hours ago
+ "αяsαℓ " Ќąƶµяɨ •" replied to + M.Tariq Malik's discussion MTH302 Business Mathematics & Statistics Assignment No 01 Fall 2019 Solution & Discussion in the group MTH302 Business Mathematics & Statistics
2 hours ago
+ "αяsαℓ " Ќąƶµяɨ •" replied to + M.Tariq Malik's discussion MTH302 Business Mathematics & Statistics Assignment No 01 Fall 2019 Solution & Discussion in the group MTH302 Business Mathematics & Statistics
2 hours ago
+ "αяsαℓ " Ќąƶµяɨ •" replied to + M.Tariq Malik's discussion MTH302 Business Mathematics & Statistics Assignment No 01 Fall 2019 Solution & Discussion in the group MTH302 Business Mathematics & Statistics
2 hours ago

© 2019   Created by + M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service