CS401 MIDTERM CURRENT PAPER.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
- Midterm
- Coverage
- Mid-Term Exam Scope (Lectures 1 to 22)
- Tags
- CURRENT, 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 CURRENT PAPER.pdf for free?
You can preview and download "CS401 MIDTERM CURRENT PAPER.pdf" (CS401 PDF, ~240 pages) directly from the MIHORA VU Study Library (https://study.mihora.tech/doc/cs401-midterm-current-paper-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
1) 5 flags thy onki defines likhni the 1) C = Carry = This extra bit that won’t fit in the target register is placed in the carry flag where it can be used and tested. 2) P = Parity = Parity is the number of “one” bits in a binary number. Parity is either odd or even. 3) A = Auxiliary Carry = auxiliary carry is the carry from the first nibble to the second. 4) Z = Zero Flag = The Zero flag is set if the last mathematical or logical instruction has produced a zero in its destination 5) S = Sign Flag = A signed number is represented in its two’s complement form in the computer. 6) T = Trap Flag = The trap flag has a special role in debugging which will be discussed later. 7) I = Interrupt Flag = It tells whether the processor can be interrupted from outside or not. 8) D = Direction Flag = this flag tells whether the current operation has to be done from bottom to top of the block (D=0) or from top to bottom of the block (D=1). 9) O = Overflow Flag = The overflow flag is set during signed arithmetic, e.g. addition or subtraction, when the sign of the destination changes unexpectedly 2) ASCII code likhna tha a ka A = 065, a = 097 3) How MOVS work MOVS is the instruction that allows memory to memory moves. MOVS transfers a byte or word from the source location DS:SI to the destination ES:DI and updates SI and DI to point to the next locations. MOVS is used to move a block of memory. 4) Difference near and short jump A short JMP is the relative JMP that you refer to. It is encoded as a two bytes; the actual JMP and the number of bytes +/- relative to the current IP. A near jump allows you to jump within the current "segment" (using real mode terms) or within the currently selected memory area in the CS selector. 5) Local variable and where to store it We modify the bubble sort subroutine to use a local variable to store the swap flag. A local variable should be used to store the return value from the first recursive call. 6) selective bit inversion on lowest nibble 100110b. Selective Bit Inversion XOR can also be used as a masking operation to invert selective bits. The bits in the mask are cleared at positions, which are to retain their values, and are set at positions, which are to be inverted. 7) What is the function of segment override prefix and what changes it brings to the opcode? Solution: Function of Segment Override Prefix: The segment override prefix, which may be added to almost any instruction in any memory addressing mode, allows the programmer to deviate from the default segment. 8) 2 long thy or dono ma instructions di hwi thi wo execute kr k onky components btany aur attribute bytes ky display colours / Background and foreground colors k attributes The attribute byte as detailed below has the RGB for the foreground and the background. It has an intensity bit for the foreground color as well thus making 16 possible colors of the foreground and 8 possible colors for the background. 76543210 7 – Blinking of foreground character 6 – Red component of background color 5 – Green component of background color 4 – Blue component of background color 3 – Intensity component of foreground color 2 – Red component of foreground color 1 – Green component of foreground color 0 – Blue component of foreground color 9) How are local variables created? Local variables are created when the method, constructor or block is entered and the variable will be destroyed once it exits the method, constructor, or block. ... Local variables are visible only within the declared method, constructor, or block. Local variables are implemented at stack level internally. 10) Process of calling a subroutine keeping in mind stack data structure and using inter segment direct call? Subroutine nesting is a common Programming practice In which one Subroutine call another Subroutine. As the last Subroutine called is the first one to be returned ( Last in first out format). So stack data structure is the most efficient way to store the return addresses of the Subroutines. 11) LDS ka aya tha LES loads ES while LDS loads DS. Both 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. 12) Inter or intra ka ayaa tha Near calls are also called intra segment calls, while far calls are called inter-segment calls. 13) LOADS ki definition: LODS transfers a byte or word from the source location DS:SI to AL or AX and updates SI to point to the next location. LODS is generally used in a loop 14) REP intsruction working REP Prefix: REP repeats the following string instruction CX times. The use of CX is implied with the REP prefix. The decrement in CX doesn’t affect any flags and the jump is also independent of the flags, just like JCXZ. 15) movement of busses between memory and processor Address bus - carries memory addresses from the processor to other components such as primary storage and input/output devices. The address bus is unidirectional . Data bus - carries the data between the processor and other components. 16) define byte with example A byte is a unit of memory data equal to either seven or eight bits depending on whether or not it needs error correction (parity). ... You can think of a byte as one letter, for example, the letter 'h' is one byte or eight bits and the word 'hope' as four bytes or 32 bits (4*8). 17) Assembly Directives kia hte hain detail mn btana tha Directives are commands that are part of the assembler syntax but are not related to the x86 processor instruction set. All assembler directives begin with a period (.) align directive causes the next data generated to be aligned modulo integer bytes. 18) Vectored kia hte hai 8088 architecture mn The software interrupt mechanism in 8088 uses vectored interrupts meaning that the address of the interrupt routine is not directly mentioned in an interrupt call, rather the address is lookup up from a table. 8088 provides a mechanism for mapping interrupts to interrupt handlers. 19) Type The Assembly Language Program Of Add 10 Numbers
More 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 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)
- CS401 MIDTERM FILE 4 SOLVED BY TEAM HADI.pdf (PDF · Midterm)