0% found this document useful (0 votes)
10 views3 pages

Spring 2025 - CS501 - 1 (BSCS) .

Uploaded by

aq331560
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views3 pages

Spring 2025 - CS501 - 1 (BSCS) .

Uploaded by

aq331560
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Advance Computer Architecture Total marks = 20

Deadline
(CS501) 12/05/2025
Assignment # 01
Spring 2025
Please carefully read the following instructions before attempting the assignment.

RULES FOR MARKING


It should be clear that your assignment would not get any credit if:
 The assignment is submitted after the due date.
 The submitted assignment does not open, or the file is corrupted.
 Strict action will be taken if the submitted solution is copied from any other student or the
internet.

You should consult the recommended books to clarify your concepts, as handouts are insufficient.
You are supposed to submit your assignment in Doc or Docx format.
Any other formats like scanned images, PDF, ZIP, RAR, PPT, BMP, etc. will not be accepted.

Topic Covered:

The objective of this assignment is to assess the understanding of students about:

- To enhance student knowledge of understanding machine instructions based on Assembly


language coding practices.

- Based on knowledge of different instruction type a student will be able to differentiate between
instructions.

- How RTL (Register Transfer Language) helps in understanding the process between coding and
hardware component.

Topics Covered
Lecture # 1 to Lecture # 12

NOTE

No assignment will be accepted via email after the due date (whether it is due to load shedding, internet
malfunctioning, etc.). Hence, refrain from uploading assignments within the last hour of the deadline. It is
recommended that the solution be uploaded at least two days before its closing date.

If you find any mistakes or confusion in the assignment (Question statement), please consult your instructor
before the deadline. After the deadline, no queries will be entertained in this regard.

For any query, feel free to email me at:


[email protected]
Total Marks :
(20)

Consider the below given Pseudo Code which has been writtend for SRC (Simple RISC Computer)
processor.

Pseudo Code:
// Load values from memory
a = memory[100]
b = memory[104]

// Perform additions (both result in a + b)


sum1 = b + a
sum2 = a + b

// Perform bitwise NOT on the sum


negated_sum = NOT(sum2)

// Subtract the negated sum from the original sum


result = sum1 - negated_sum

// Store the final result in memory


memory[108] = result

// Halt execution
END

You are required to first carefully understand the given code and and then answer the following
questions.

a) By considering the programmer’s view of SRC architecture, find the final expression which is
being evaluated in the given code.

b) Fill the below given Table 1 by writing the missing instructions, instruction type and RTL
syntax for each missing instruction.

Assembly Code Write Missing Instructions Instruction Type RTL Syntax


ld R1, 100 Load R1 ← Mem[100]
ld R2, 104 Load R2 ← Mem[104]
add R3, R2, R1 ALU R3 ← R2 + R1
… add R4, R1, R2 ALU R4 ← R1 + R2
… not R5, R4 ALU R5 ← ~R4
… sub R6, R3, R5 ALU R6 ← R3 - R5
… st R6, 108 Store Mem[108] ← R6
stop Halt Halt execution

Good Luck!

You might also like