0% found this document useful (0 votes)
12 views4 pages

CA Obe Folder

This document contains details about a mid-term exam for a Computer Architecture Lab course. It includes 3 sections: multiple choice questions, short answer questions, and a programming task. The multiple choice section contains 5 questions about MIPS assembly language instructions and operations. The short answer section contains 2 questions - one asking when a system call will execute in a code snippet, and another asking to write a command to compare numbers. The programming task asks students to write code to: a) calculate the sum of integers within a range, b) compare two integers and output if they are equal or not equal using branch instructions, and c) state the operation of 5 system calls.

Uploaded by

miqbal66126612
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)
12 views4 pages

CA Obe Folder

This document contains details about a mid-term exam for a Computer Architecture Lab course. It includes 3 sections: multiple choice questions, short answer questions, and a programming task. The multiple choice section contains 5 questions about MIPS assembly language instructions and operations. The short answer section contains 2 questions - one asking when a system call will execute in a code snippet, and another asking to write a command to compare numbers. The programming task asks students to write code to: a) calculate the sum of integers within a range, b) compare two integers and output if they are equal or not equal using branch instructions, and c) state the operation of 5 system calls.

Uploaded by

miqbal66126612
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/ 4

Department of Electrical, Electronics and Computer Systems

College of Engineering and Technology


University of Sargodha

Computer Architecture Lab (EE-217)


Semester / Session: 3rd / Fall2022
Mid-Term Exam: Fall-2023
Date: 15 - 12 - 2023
Time Allowed: _1.5_ hour Total Marks = 20
Section A: Multiple Choice Questions Marks 05 CLO:

1) MIPS assembly language instruction set size is .


a) 23 bit b) 32 bit c) 24 bit d) 3 byte e) None of these
2) Service Code 10 in system call is used to .
a) Print Integer b) Read Character c) Terminate Program d) None of these
3) Assume that $s1 = 0xabcd1234 and $s2 = 0xffff0000, then result of
instruction “xor $s5,$s1,$s2” will be .
a) $s5=0x54321234 b) $s5=0xffff1234 c) $s5=0xabcd0000 d) $s5=0x0000edcb
4) Following instruction is used to define array”arr1: .word 1:10”. How much space in
memory used by this array _ ?
a) 10 bytes b) 20 bytes c) 30 bytes d) 40 bytes
5) How we can show address of arrays?
a) Data segment window b) Text segment window c) Label window d) None of these

Section B: Short Questions Marks (2+2) CLO:

Q.1 In following code, when system call will execute. Also, mention the result of code.

.data
ask: .asciiz " \nEnter a number......\n"
.text
lb $t5, yes
lb $t6, no
li $v0, 4
la $a0, ask
syscall
Q.2 Write command to compare two number if one is greater than other.
Department of Electrical, Electronics and Computer Systems
College of Engineering and Technology
University of Sargodha

Computer Architecture Lab (EE-217)


Semester / Session: 3rd / Fall2022
Mid-Term Exam: Fall-2023
Date: 15 - 12 - 2023
Time Allowed: _1.5_ hour Total Marks

Section C Programming Task Marks (5+5+5) CLO:

a. Write a program that asks the user to enter two integers: n1 and n2 and prints the
sum of all numbers from n1 to n2. For example, if the user enters n1=3 and
n2=7, then the program should display the sum as 25.

b. Write a MIPS program that inputs two integer values. The program should output equal
if the two integers are equal. Otherwise, it should output not equal. Use the branch
instruction to check for equality.
c. State the operation of following system calls. (CLO-3) 5

1–
4–
8–
10 –
11 –

You might also like