CS401_Short_Notes_By.pdf

Verified academic study resource for CS401 (Computer Architecture & Assembly Language) under the Computer Science at Virtual University of Pakistan. This PDF document (Official Lecture Handouts & Highlighted Notes) covers Complete Course Handouts (Lectures 1 to 45) spanning approximately 450 pages across 8 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
PDF
Type
Handout
Coverage
Complete Course Handouts (Lectures 1 to 45)

Virtual University examiners construct 100% of objective MCQs and subjective marking schemes directly from the official CS401 handouts.

What this file covers — CS401 syllabus roadmap

  1. Core Architecture, Syntax & Primitive Data Structures — Lectures 1 to 6 (Pages 1 to 65). 15% Objective Marks (8–10 MCQs)
  2. Conditional Branching, Loops & Logical Control Flow — Lectures 7 to 12 (Pages 66 to 140). 18% Exam Marks (MCQs + 2-Mark Short Questions)
  3. Memory Management, Pointers, Arrays & Functions — Lectures 13 to 18 (Pages 141 to 215). 22% Exam Marks (High Yield for Midterms)
  4. Midterm Consolidation, Strings & Algorithm Synthesis — Lectures 19 to 22 (Pages 216 to 280). Midterm Exam Culmination (Lectures 1–22 Scope)
  5. Object-Oriented Paradigms: Classes & Data Abstraction — Lectures 23 to 29 (Pages 281 to 360). 16% Final-Term Marks (Core OO Concepts)
  6. Inheritance Hierarchies & Dynamic Polymorphism — Lectures 30 to 36 (Pages 361 to 435). 20% Final-Term Marks (Virtual Functions & V-Tables)
  7. Templates, Standard Library & Persistent File I/O — Lectures 37 to 41 (Pages 436 to 510). 14% Final-Term Marks (Generic Code & Streams)
  8. Final-Term Examination Dossier & Capstone Synthesis — Lectures 42 to 45 (Pages 511 to 585). Final-Term Exam Synthesis (Lectures 23–45 Scope)

Frequently asked questions

Where can I download CS401_Short_Notes_By.pdf for free?

You can preview and download "CS401_Short_Notes_By.pdf" (CS401 PDF, ~450 pages) directly from the MIHORA VU Study Library (https://study.mihora.tech/doc/cs401-short-notes-by-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 Complete Course Handouts (Lectures 1 to 45) across 8 distinct lecture units (Lectures 1 to 6, Lectures 7 to 12, Lectures 13 to 18, Lectures 19 to 22, Lectures 23 to 29, Lectures 30 to 36, Lectures 37 to 41, Lectures 42 to 45), 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 Short Notes
                                             By
                       http://vustudents.ning.com
Op-Code:

An op-code (operation code) is the portion of a machine language instruction that
specifies the operation to be performed. For every specific operation like add subtract or
multiplication there is an op-code which processor understands. Like “add” we have 152
and subtract “153”.
Program Counter/ Instruction Pointer:

A Program is an ordered set of instructions. Instruction executes one after the other.
Program Counter / Instruction Pointer ensure that instructions are working in order also
Program counter/Instruction Pointer holds the address of the next instruction to be
executed.
Control Bus:
     It’s the part of computer Bus. CPU communicates with other devices within the
computer through control bus. Through control bus CPU assign different jobs to other
parts (registers, memory, input output) to perform some functionality on data.
For Example
Read data from memor
Write data on memory
Move data in register.

Control Lines:
 As CPU have to perform more than one control operations so control bus consist of
more than one lines called control lines.
 The number and type of lines in a control bus varies but there are basic lines common to
all microprocessors,
  Read
  Write
Offset
A distance from a given paragraph boundary in memory. The offset usually is given as a number
of bytes.

Segment Registers:
In certain processors memory is segmented (or divided).Its actually not
physically segmented rather logically to store code, data, stack etc in different portions of
memory. So there should be some way to specify the starting address of each such
segment. That’s way registers are used called segment registers.
There are four types of these registers
CS: Code Segment
DS: Data Segment
SS: Stack Segment

http://vustudents.ning.com                                                                      1

ES: Extra Segment

CS contains the segment of the current instruction (IP is the offset).
DS is the segment used by default for most data operations or most memory references
come from data segment.
SS contains the stack segment (SP is the offset).
ES as name shows extra segment register. String instructions(movs,stos) also use this
register.
Logical Address and Physical Address:

The segment, offset pair is called a logical address, while the 20bit address is a physical
address which is the real thing. Logical addressing is a mechanism to access the physical
memory.

Offset:

A distance from a given paragraph boundary in memory. The offset usually is given as a
number of bytes

Word is unit of data, like (bit -1 , nibble -4 , byte-8, word-16, Dword-32, Qword-64)
A word is of 2 bytes = 16bits
Dword = 4 bytes
Qword= 8 bytes

Registers are like Scratch Pad Ram.What are the meaning of scratch pad ram.
Scratchpad means a high-speed internal memory used for temporary storage of
preliminary information.

An 8-bit register, like AH, AL, BH, BL, can only store one data element at a time. And a
16-bit register can store multiple data element e.g. one in AH and other in AL.

Segment memory model or segment register is all about how processor sees the
different portion of the memory. Our Program is consisting of two parts, the code and the
data, and actually there is a third part called the program stack as well, but higher level
languages make this invisible to us. These three logical parts of a program should appear
as three distinct units in memory, but making this division is not possible in the linear
memory model. The segmented memory model does allow this distinction. We divide the
memory into the functional parts or windows, one is for code and other is for data.
Processor sees code form the code window and data from the data window. Now if
process sees the code section it cant see the data section through the same window and
vice versa. At a time four window exist one is CS( Code window ) hold the base point of
the code 2nd is DS(Data window) hold the base point of the data 3rd is SS(Stack
segment) holds the base point of the stack segment and last one is ES(Extra segment) its
use only for data movement. Size of each window is 64K but it can move in any region in

http://vustudents.ning.com                                                               2

1MB size. Segment memory model is all about how processor sees the different portion
of the memory. I hope you can now understand the segmented memory model.

This problem is discussed in P.14 of the handouts. Just read the handout with full
concentration. Here the Segment and Offset address are given which are necessary to
make physical address. Both offset and segment address are 16 bit to make 20 bit we use
mechanism mention below.
Now as Figure Show

Segment register = 1DDD it is16 bit to make 20 bit we add 0 with the end of the
segment register now it become = 1DDD0
And offset 0100 which is also 16 bit now we add 0 before the offset address to make 20
bit. Offset = 0100 after append 0 before it become 00100

Now add both
     1DDD0
      00100 +
     ________

       1DED0 that is 20 bit physical address.
I hope now you understand how to calculate physical address.

Op-code

The op-code or operation code is the binary pattern that represents an instruction.

Segmentation:

The segmented memory model allows multiple functional windows into the main
memory, a code window, a data window etc. The processor sees code from the code

http://vustudents.ning.com                                                             3

window and data from the data window. The size of one window is restricted to 64K.
However the maximum memory iAPX88 can access is 1MB which can be accessed with
20 bits.
Mnemonic

A word, abbreviation, or acronym that replaces something too complex to remember or
type easily. For example, ADC is the mnemonic for the 8086’s add-with-carry
instruction. The assembler converts it into machine (binary) code, so it is not necessary to
remember or calculate the binary form.

More CS401 files

All CS401 files · Midterm Prep 2026 · MCQs Bank