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


Dear Students! Share your Assignments / GDBs / Quizzes files as you receive in your LMS, So it can be discussed/solved timely. Add Discussion

How to Add New Discussion in Study Group ? Step By Step Guide Click Here.

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: 3115

.

+ 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

opcode(add,sub,mul,sta,....)=1byte
all other address,mem =3byte each
w
in fetch we add both opcode + (inst,mem)
in execution add all except opcode

total=fetch+exe

plz define what is the mistake???

3-address instruction • The code size is 10 bytes (1+3+3+3 = 10 bytes) • Number of bytes accessed from memory is 22 (10 bytes for instruction fetch + 6 bytes for source operand fetch + 3 bytes for storing destination operand = 19 bytes)

2-address instruction • The code size is 7 bytes (1+3+3 = 7 bytes) • Number of bytes accessed from memory is 16(7 bytes for instruction fetch + 6 bytes for source operand fetch + 3 bytes for storing destination operand = 16 bytes) 

1-address instruction • The code size is 4 bytes (1+3= 4 bytes) • Number of bytes accessed from memory is 7 (4 bytes for instruction fetch + 3 bytes for source operand fetch + 0 bytes for storing destination operand = 7 bytes)

0-address instruction • The code size is 1 byte • Number of bytes accessed from memory is 10 (1 byte for instruction fetch + 6 bytes for source operand fetch + 3 bytes for storing destination operand = 10 bytes) The following table summarizes this information

so the ans is

0-Address Machine = 100 bytes

1-Address Machine = 49 bytes

2-Address Machine = 112 bytes   

3-Address Machine = 76 bytes

 

 

ya confirm theak ha kia waqar

RSS

Latest Activity

ٹمبکٹو posted discussions
45 minutes ago
+ ! ! ! ! ! ! Dîxîě Dûsť꧂ replied to + IUUOƆƎUT +'s discussion یہ تو حسن و عشق کے ہیں مرحلے
3 hours ago
+ ! ! ! ! ! ! Dîxîě Dûsť꧂ liked + IUUOƆƎUT +'s discussion یہ تو حسن و عشق کے ہیں مرحلے
3 hours ago
+ ! ! ! ! ! ! Dîxîě Dûsť꧂ replied to + ! ❤SΕNSΙТΙVΕ(∂ΕSΕЯТ ΡЯΙNCΕSS)❤'s discussion hapy birthday my loving friend sister nabooo ;-* ;-* ❤❤❤❤❤❤❤❤
3 hours ago
+ ! ! ! ! ! ! Dîxîě Dûsť꧂ replied to + ! ❤SΕNSΙТΙVΕ(∂ΕSΕЯТ ΡЯΙNCΕSS)❤'s discussion hapy birthday my loving friend sister nabooo ;-* ;-* ❤❤❤❤❤❤❤❤
3 hours ago
+ ! ! ! ! ! ! Dîxîě Dûsť꧂ liked + ! ❤SΕNSΙТΙVΕ(∂ΕSΕЯТ ΡЯΙNCΕSS)❤'s discussion hapy birthday my loving friend sister nabooo ;-* ;-* ❤❤❤❤❤❤❤❤
3 hours ago
+ ! ! ! ! ! ! Dîxîě Dûsť꧂ replied to zohaib iftikhar's discussion ...* APNI ZUBAN KI TAIZI KABHI MAT AZMANA...KHAS TOR PE?...*
3 hours ago
+ ! ! ! ! ! ! Dîxîě Dûsť꧂ liked zohaib iftikhar's discussion ...* APNI ZUBAN KI TAIZI KABHI MAT AZMANA...KHAS TOR PE?...*
3 hours ago
+ ! ! ! ! ! ! Dîxîě Dûsť꧂ replied to zohaib iftikhar's discussion ...*ZUBAN B KITNI AJEEB HAI?...*
3 hours ago
+ ! ! ! ! ! ! Dîxîě Dûsť꧂ liked zohaib iftikhar's discussion ...*ZUBAN B KITNI AJEEB HAI?...*
3 hours ago
+ ! ! ! ! ! ! Dîxîě Dûsť꧂ replied to ٹمبکٹو's discussion حاضری
3 hours ago
+ ! ! ! ! ! ! Dîxîě Dûsť꧂ liked ٹمبکٹو's discussion حاضری
3 hours ago

Today Top Members 

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

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

.