CS401-Mid-Subjective.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) 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
- Study Resource
- Coverage
- Mid-Term Exam Scope (Lectures 1 to 22)
- Tags
- SUBJECTIVE, 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-Mid-Subjective.pdf for free?
You can preview and download "CS401-Mid-Subjective.pdf" (CS401 PDF, ~240 pages) directly from the MIHORA VU Study Library (https://study.mihora.tech/doc/cs401-mid-subjective-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 03,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:- (Page 60)
AND can be used to check whether particular bits of a number are set or not. Previously we used shifting and
JC to test bits one by one. Now we introduce another way to test bits, which is more powerful in the sense that
any bit can be tested anytime and not necessarily in order. AND can be applied on a destination with a 1-bit in
the desired position and a source, which is to be checked. If the destination is zero as a result, which can be
checked with a JZ instruction, the bit at the desired position in the source was clear.
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)
1
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.
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)
The overflow flag is set if the sign bit unexpectedly changes as a result of a mathematical or logical instruction.
However the overflow flag signals a real overflow only if the numbers in question are treated as signed
numbers. So this interrupt is not automatically generated but as a result of a special instruction INTO (interrupt
on overflow) if the overflow flag is set. Otherwise the INTO instruction behaves like a NOP (no operation).
4. Double working of Exchange instruction with help of an example.
Answer:- (Page 73)
xchg ax, [bx+si+2] ; exchange ax with second number
5. What is the difference between LES and LDS instruction?
Answer:- rep
MIDTERM SPRING 2011More CS401 files
- CS401 (2).txt (TXT · Study Resource)
- CS401 - 1.pdf (PDF · Study Resource)
- CS401 - 2.pdf (PDF · Study Resource)
- CS401 - 3.pdf (PDF · Study Resource)
- CS401 - 4.pdf (PDF · Study Resource)
- CS401 AZNAIN.docx (DOC · Study Resource)
- CS401 EXERCISE.pdf (PDF · Study Resource)
- CS401 MID fall 2010 01-12-2010.doc (DOC · Study Resource)