CS101 - 1st and 2nd comp.pdf
Verified academic study resource for CS101 (Introduction to Computing) under the Computer Science at Virtual University of Pakistan. This PDF document (Verified Study Resource) covers Full Course Curriculum spanning approximately 280 pages across 8 curriculum modules, and is indexed for student examination review with instant in-browser preview and 100% free direct download.
- Course
- CS101 – Introduction to Computing
- Faculty
- Computer Science
- Format
- Type
- Study Resource
- Coverage
- Full Course Curriculum
Review this document alongside the official handouts and test your retention in the Interactive MCQs Studio.
What this file covers — CS101 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)
- Object-Oriented Paradigms: Classes & Data Abstraction — Lectures 23 to 29 (Pages 281 to 360). 16% Final-Term Marks (Core OO Concepts)
- Inheritance Hierarchies & Dynamic Polymorphism — Lectures 30 to 36 (Pages 361 to 435). 20% Final-Term Marks (Virtual Functions & V-Tables)
- Templates, Standard Library & Persistent File I/O — Lectures 37 to 41 (Pages 436 to 510). 14% Final-Term Marks (Generic Code & Streams)
- 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 CS101 - 1st and 2nd comp.pdf for free?
You can preview and download "CS101 - 1st and 2nd comp.pdf" (CS101 PDF, ~280 pages) directly from the MIHORA VU Study Library (https://study.mihora.tech/doc/cs101-1st-and-2nd-comp-pdf) with 100% free high-speed downloads and zero registration requirements.
What syllabus chapters and lectures are covered in this CS101 file?
This document covers Full Course Curriculum 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 CS101 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 CS101 solved past papers and handouts verified for 2026 exams?
Yes. All CS101 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
CS302 - Digital Logic & Designȱ
To handle positive and negative binary numbers, the digital system sets aside the most
significant digit (bit) to represent the sign
x MSB set to 1 indicates a negative number
x MSB set to 0 indicates a positive number
Thus +13 and -13 are represented as 01101and 11101 respectively. The bits 1101
represent the number 13 and the MSBs 0 and 1 represent positive and negative signs
respectively. Thus binary numbers having the MSB signifying the Sign bit are treated as
Signed Binary Numbers. This representation is known as the Signed-Magnitude
representation.
Digital systems also handle binary numbers which are assumed to be positive and
therefore do not have the most significant sign bit. Such numbers are known as Unsigned
numbers. Digital system thus have to handle two different types of binary numbers, signed and
unsigned. Thus 111012 represents -13 in signed binary and 29 in unsigned binary. How should
a Digital System treat a binary number? Should it consider it as a signed or unsigned number?
A digital system on its own can not decide how to handle a binary number. The digital system
has to be notified beforehand to deal with a certain binary representation as signed or
unsigned.
1’s & 2’s complement
Informing the digital system how to treat a binary number is not very efficient. A better
way is to represent negative signed numbers in their 2’s complement form. Using 2’s
Complement form to represent signed numbers, allows direct manipulation of positive as well
as negative numbers without having to worry about setting the most significant sign bit to
indicate positive and negative numbers.
A 2’s complement of a number is obtained by first taking the 1’s complement of a
number and then adding a 1 to change the 1’s complement to 2’s complement. 1’s
complement of a number is obtained by simply inverting all its bits. Obtaining the 2’s
complement of 13 is described in the example below.
01101 The number 13
10010 1’s complement of 13 is obtained by inverting all the five bits.
+ 1
10011 2’s complement of 13 is obtained by adding a 1 to its 1’s complement.
In a 2’s complement number system all negative numbers are represented in their 2’s
complement form and all positive numbers are represented in their actual form. Negative
numbers can be readily identified by their MSBs which are set to 1. Thus in a 2’s complement
representation +13 is represented as 01101 and -13 is represented as 10011.
By having numbers represented in their 2’s complement form addition and subtraction
operations can easily be performed without having to worry about the sign bits. Thus +13
added to -13 should result in a zero value. This can be verified by directly adding the +13 and -
13 in their 2’s complement forms.
01101
10011
100000
ȱ ©ȱCopyrightȱVirtualȱUniversityȱofȱPakistanȱ 20ȱ
CS302 - Digital Logic & Designȱ
The most significant carry bit is discarded; retaining only the first 5 bits proves that
adding +13 and -13 results in a zero value. Similarly it can be shown that adding the numbers
+7 and -13 results in -6.
10011 (-13)
00111 (+7)
11010 (-6)
The binary 2’s complement number 11010 has its most significant bit set to 1 indicating
that the number is negative. The actual magnitude of the negative number is determined by
taking the 2’s complement of 11010.
11010 Original number
00101 1’s complement of Original number
+1
00110 2’s complement of Original number is equal to 6.
Addition and Subtraction Operations with Signed Binary
An additional benefit of using 2’s complement representation for signed numbers is that
both add and subtract operations can be performed by addition. In the above example 13 was
subtracted from 7 by adding 2’s complement of -13 to 2’s complement of +7. Four cases of
adding and subtracting numbers using the 2’s complement representation are shown below.
x Both numbers are positive
0101 +5
0010 +2
0111 +7
x Both numbers are negative
1011 -5
1110 -2
11001 -7 the carry generated from the msb is discarded
x One number is positive and its magnitude is larger than the negative number
0101 +5
1110 -2
10011 +3 the carry generated from the msb is discarded
x One number is positive and its magnitude is smaller than the negative number
1011 -5
0010 +2
1101 -3
The four examples show that add and subtract operations can be carried out by an
adder circuit if numbers are represented in their 2’s complement form. A separate circuit to
perform subtractions is not required.
Range of Signed and Unsigned Binary numbers
Three different types of Binary representations have been discussed. The Unsigned
Binary representation can only represent positive binary numbers. The Sign-Magnitude can
ȱ ©ȱCopyrightȱVirtualȱUniversityȱofȱPakistanȱ 21ȱ
More CS101 files
- Ahsan Salman cs101.pdf (PDF · Study Resource)
- Appendices.pdf (PDF · Study Resource)
- CS 101 # 02 27-8-20.pdf (PDF · Study Resource)
- CS 101 QA 2Q.pdf (PDF · Study Resource)
- CS 101 Subjective file by Amaan Khan.pdf (PDF · Study Resource)
- CS 101 Subjective file by Amaan Khan.pdf (PDF · Study Resource)
- CS 101 mid 2022.pdf (PDF · Study Resource)
- CS101 - 1.pdf (PDF · Study Resource)