We have been working very hard since 2009 to facilitate in your learning Read More. We can't keep up without your support. Donate Now.

www.vustudents.ning.com

 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

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.

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

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

Views: 3172

Attachments:

Replies to This Discussion

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

ya confirm theak ha kia waqar

Latest Activity

1 hour ago
Angel added a discussion to the group MTH303 Mathematical Methods

MTH303. Current Past Paper

1 hour ago
Angel joined +M.Tariq Malik's group

MTH303 Mathematical Methods

1 hour ago
Rao Khan! liked Zoey D's discussion *❤ Gham na kro ❤*
1 hour ago
Rao Khan! replied to Zoey D's discussion *❤ Gham na kro ❤*
1 hour ago
Angel posted a discussion

MTH303. Current Past Paper

1 hour ago
Zoey D posted discussions
2 hours ago

1

2

3

HELP SUPPORT

This is a member-supported website. Your contribution is greatly appreciated!