CS401-Midterm-Solved-Subjectives-With-References-By-Moaaz.pdf
Verified academic study resource for CS401 (Computer Architecture & Assembly Language) under the Computer Science at Virtual University of Pakistan. This PDF document (Midterm Solved Past Paper & Revision File compiled by Moaaz Siddhu) covers Mid-Term Exam Scope (Lectures 1 to 22) spanning approximately 240 pages across 4 curriculum modules, and is indexed for student examination review with instant in-browser preview and 100% free direct download.
- Course
- CS401 – Computer Architecture & Assembly Language
- Faculty
- Computer Science
- Format
- Type
- Midterm
- Coverage
- Mid-Term Exam Scope (Lectures 1 to 22)
- Compiled by
- Moaaz Siddhu
- Tags
- SUBJECTIVE, SOLVED, MIDTERM
Focus on core definitions and repeated MCQs from Lectures 1–22. Remember that scoring in the First Half builds your safety buffer toward the mandatory 20% Two-Half passing rule in CS401.
What this file covers — CS401 syllabus roadmap
- Core Architecture, Syntax & Primitive Data Structures — Lectures 1 to 6 (Pages 1 to 65). 15% Objective Marks (8–10 MCQs)
- Conditional Branching, Loops & Logical Control Flow — Lectures 7 to 12 (Pages 66 to 140). 18% Exam Marks (MCQs + 2-Mark Short Questions)
- Memory Management, Pointers, Arrays & Functions — Lectures 13 to 18 (Pages 141 to 215). 22% Exam Marks (High Yield for Midterms)
- Midterm Consolidation, Strings & Algorithm Synthesis — Lectures 19 to 22 (Pages 216 to 280). Midterm Exam Culmination (Lectures 1–22 Scope)
Frequently asked questions
Where can I download CS401-Midterm-Solved-Subjectives-With-References-By-Moaaz.pdf for free?
You can preview and download "CS401-Midterm-Solved-Subjectives-With-References-By-Moaaz.pdf" (CS401 PDF, ~240 pages) directly from the MIHORA VU Study Library (https://study.mihora.tech/doc/cs401-midterm-solved-subjectives-with-references-by-moaaz-pdf) with 100% free high-speed downloads and zero registration requirements.
What syllabus chapters and lectures are covered in this CS401 file?
This document covers Mid-Term Exam Scope (Lectures 1 to 22) across 4 distinct lecture units (Lectures 1 to 6, Lectures 7 to 12, Lectures 13 to 18, Lectures 19 to 22), featuring comprehensive definitions, solved objective questions, and examiner marking rubrics.
What is the passing criteria for CS401 under the VU 20% Two-Half Rule?
Under official Virtual University regulations, students must score at least 20% in the First Half (Quizzes, Assignments, GDBs, and Midterm combined) AND independently at least 20% in the Final-Term examination paper. Scoring under 20% in the final exam results in an automatic F grade regardless of earlier marks.
Are CS401 solved past papers and handouts verified for 2026 exams?
Yes. All CS401 materials on MIHORA VU—including Moaaz, Waqar Siddhu, and team archives—are reviewed against the current VU syllabus to help students prepare for 2026 Midterm, Final-Term, and online quiz examinations.
Inside this file
CS401-Assembly Language
Solved Subjective May 04,2012
From Midterm Papers
MC100401285 Moaaz.pk@gmail.com Mc100401285@gmail.com PSMD01
MIDTERM FALL 2011
CS401 Assembly Language
Q: Affected flag of AND operation marks 2
Answer:-
Affected Flag of AND are:
CF, OF, PF, SF, ZF and AC
Q: Relation between RET and CALL is dependent or independent. Marks 2
Answer:- (Page 64)
Technically they are independent in their operation but both the instructions are commonly used as a pair. The
RET works regardless of the CALL and the CALL works regardless of the RET.
Q: What is the difference between LES and LDS instruction? marks 3
Answer:- (Page 97)
LES loads ES while LDS loads DS. These instructions have two parameters, one is the general purpose register
to be loaded and the other is the memory location from which to load these registers.
MIDTERM FALL 2011
CS401 Assembly Language
21. Write down the procedure to clear the selective bit. (Marks: 2)
Answer:- (Page 59)
The source operand is loaded with a mask containing one at positions which are retain their old value and zero
at positions which are to be zeroed. The effect of applying this operation on the destination with mask in the
source is to clear the desired bits. This operation is called masking.
22. Why REP prefix is generally not used with LODS instruction? (Marks: 2)
Answer:- (Page 92)
LODS is generally used in a loop and not with the REP prefix since the value previously loaded in the register
is overwritten if the instruction is repeated and only the last value of the block remains in the register.
1
23. What is difference between REPE and REPNE? (Marks: 3)
Answer:- (Page 93)
REPE or REPZ repeat the following string instruction while the zero flag is set and REPNE or REPNZ repeat
the following instruction while the zero flag is not set.
24. Describe Push and Pop with the help of an example. (Marks: 3)
Answer:- (Page 68)
The operations of placing items on the stack and removing them from there are called push and pop. Memory is
like a shelf numbered as zero at the top and the maximum at the bottom. If a decrementing stack starts at shelf
5, the first item is placed in shelf 5; the next item is placed in shelf 4, the next in shelf 3 and so on.
25. Explain all characteristics of SCAS instruction. (Marks: 5)
Answer:- (Page 92)
SCAS compares a source byte or word in register AL or AX with the destination string element addressed by
ES:DI and updates the flags. DI is updated to point to the next location. SCAS is often used to locate equality
or in-equality in a string through the use of an appropriate prefix.
SCAS is a bit different from the other instructions. This is more like the CMP instruction in that it does
subtraction of its operands. The prefixes REPE (repeat while equal) and REPNE (repeat while not equal) are
used with this instruction. The instruction is used to locate a byte in AL in the block of memory. When the first
equality or inequality is encountered; both have uses.
26. Describe Local Variable? (Marks: 5)
Answer:- (Page 75)
Another important role of the stack is in the creation of local variables that are only needed while the subroutine
is in execution and not afterwards. They should not take permanent space like global variables. Local variables
should be created when the subroutine is called and discarded afterwards. So that the spaced used by them can
be reused for the local variables of another subroutine. They only have meaning inside the subroutine and no
meaning outside it.
The most convenient place to store these variables is the stack. We need some special manipulation of the stack
for this task. We need to produce a gap in the stack for our variables.
MIDTERM SPRING 2011
CS401 Assembly Language
1. Which flag affected by often and operator
Answer:- rep
2. Explain divide overflow error.
Answer:- (Page 85)
If a large number is divided by a very small number it is possible that the quotient is larger than the space
provided for it in the implied destination. In this case an interrupt is automatically generated and the program is
usually terminated as a result. This is called a divide overflow error.
2
3. For what purpose "INT4" is reserved.
Answer:- (Page 106)
INT4 is reserved for Arithmetic Overflow, change of sign bit
4. Double working of Exchange instruction with help of an example.
Answer:- (Page 73)
XCHG (Exchanges) instruction swaps the contents of the destination (first) and source (second) operands. The
operands can be two general-purpose registers or a register and a memory location. If a memory operand is
referenced, the processor's locking protocol is automatically implemented for the duration of the exchange
operation, regardless of the presence or absence of the LOCK prefix or of the value of the IOPL.
xchg ax, [bx+si+2] ; exchange ax with second number
5. What is the difference between LES and LDS instruction?
Answer:- rep
MIDTERM SPRING 2011
CS401 Assembly Language
1. Two form of Moves introduction
Answer: (Page 98)
MOVS has the two forms MOVSB and MOVSW
2. Describe push & pop with help of example
Answer:- (Page 71)
PUSH
PUSH decrements SP (the stack pointer) by two and then transfers a word from the source operand to the top of
stack now pointed to by SP. PUSH often is used to place parameters on the stack before calling a procedure;
more generally, it is the basic means of storing temporary data on the stack. Consider the example of test
tube.(see stack)
POPMore CS401 files
- CS 401 MID TERM SOLVED PAPER.doc (DOC · Midterm)
- CS-401 MIDTERM SHORT NOTES BY ALMAS AFZAL.pdf (PDF · Midterm)
- CS401 MID TERM QUIZ.docx (DOC · Midterm)
- CS401 MIDTERM CURRENT PAPER.pdf (PDF · Midterm)
- CS401 MIDTERM FILE 1 SOLVED BY TEAM HADI.pdf (PDF · Midterm)
- CS401 MIDTERM FILE 2 SOLVED BY TEAM HADI.pdf (PDF · Midterm)
- CS401 MIDTERM FILE 2 SOLVED BY TEAM HADI.pdf (PDF · Midterm)
- CS401 MIDTERM FILE 3 SOLVED BY TEAM HADI.pdf (PDF · Midterm)