.... How to Find Your Subject Study Group & Join ....   .... Find Your Subject Study Group & Join ....  

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

Study Groups By Subject code Wise (Click Below on your university link & Join Your Subject Group)

[ + VU Study Groups Subject Code Wise ]  [ + COMSATS Virtual Campus Study Groups Subject Code Wise ]

Looking For Something at vustudents.ning.com?Search 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.

Share This With Friends......


How to Find Your Subject Study Group & Join.

Find Your Subject Study Group & Join.

+ Click Here To Join also Our facebook study Group.


This Content Originally Published by a member of VU Students.

+ Prohibited Content On Site + Report a violation + Report an Issue

+ Safety Guidelines for New + Site FAQ & Rules + Safety Matters

+ Important for All Members Take a Look + Online Safety


Views: 2950

See Your Saved Posts Timeline

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

Forum Categorizes

Job's & Careers (Latest Jobs)

Admissions (Latest Admissons)

Scholarship (Latest Scholarships)

Internship (Latest Internships)

VU Study

Other Universities/Colleges/Schools Help

    ::::::::::: More Categorizes :::::::::::

Member of The Month

1. Angry Bird

Lahore, Pakistan

© 2018   Created by +~Malik~.   Powered by

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