Lec_03.ppt
Verified academic study resource for CS302 (Digital Logic Design) under the Computer Science at Virtual University of Pakistan. This PPT 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
- CS302 – Digital Logic Design
- Faculty
- Computer Science
- Format
- PPT
- Type
- Handout
- Coverage
- Complete Course Handouts (Lectures 1 to 45)
- Tags
- SLIDES
Virtual University examiners construct 100% of objective MCQs and subjective marking schemes directly from the official CS302 handouts.
What this file covers — CS302 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 Lec_03.ppt for free?
You can preview and download "Lec_03.ppt" (CS302 PPT, ~450 pages) directly from the MIHORA VU Study Library (https://study.mihora.tech/doc/lec-03-ppt) with 100% free high-speed downloads and zero registration requirements.
What syllabus chapters and lectures are covered in this CS302 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 CS302 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 CS302 solved past papers and handouts verified for 2026 exams?
Yes. All CS302 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
Digital Logic & Design
Dr. Waseem Ikram
Lecture 03
Recap
Number System Conversion
Sum-of-Weights for converting to decimal
Repeated division for converting from decimal
Binary Arithmetic
Similar to Decimal Arithmetic
Multiplying by a constant by shifting left
Dividing by a constant by shifting right
Recap
Representing Numbers
Unsigned
Signed Magnitude
2’s Complement
2’s Complement form
1’s complement form
2’s complement form
Binary number 01101 (13)
1’s complement 10010
+ 1
2’s complement 10011 (-13)
Addition and Subtraction with 2’s
Complement
0101 +5 0101 +5
0010 +2 1110 -2
0111 +7 10011 +3
1011 -5 1011 -5
1110 -2 0010 +2
11001 -7 1101 -3
Addition and Subtraction
2’s complement vs. Signed
2’s Complement Signed Binary
0101 +5 0101 +5
0010 +2 0010 +2
0111 +7 0111 +7
1011 -5 1101 -5
1110 -2 1010 -2
11001 -7 10111 -7
Addition and Subtraction
2’complement vs. Signed
0101 +5 0101 +5
1110 -2 1010 -2
10011 +3 1111 +3
1011 -5 1101 -5
0010 +2 0010 +2
1101 -3 1111 -3
Range of Numbers
Unsigned
Positive Numbers Only (0 to 7)
3-bit
Signed Magnitude
Positive & Negative Numbers (-7 to 7)
4-bit
2’s Complement
Positive & Negative Numbers (-8 to 7)
4-bit
Range & Overflow
2 + 7 using 3-bit unsigned binary?
9 overflow?
2 – 7?
Can not represent -7 in unsigned binary
Range and Overflow
1011 -5
1101 -3
11000 -8
1011 -5 0101 +5
1100 -4 0100 +4
10111 -9 1001 +9
Range of Binary Numbers
Processors can handle 64-bit unsigned binary
values.
Maximum unsigned decimal number is 18.446 x
1018
How to represent larger numbers?
How to represent very small numbers?
How to represent numbers with integer part and
fraction part?
Floating Point Representation38
32-bit Floating Point Representation
ANSI/IEEE Standard 754 defines
32-bit Single-Precision Floating Point
Sign Bit 1
Exponent Bits 8
Mantissa Bits 23
64-bit Double-Precision Floating Point
Floating Point Format
15 digit decimal number format
Sign digit 1
Exponent digits 2
Mantissa digits 12
6918.3125 = 6.9183125 x 103
Magnitude 69183125
Exponent 3
Floating Point Format
Normalized form 0.69183125 x 104
Magnitude 69183125
Exponent 4
+ 0 4 6 9 1 8 3 1 2 5 0 0 0 0
Max Number 0.999,999,999,999 x 1099
No negative exponent
Floating Point Format
Option I
Increase exponent field to 3 digits
1099 to 10-99
Option II
Biased 50 Exponent
add 50 1049 → 99 10-50 → 0
Floating Point Format
Zero ?
+/- x x 0 0 0 0 0 0 0 0 0 0 0 0
Infinity (∞) ?
Floating Point Format
Allow 1048 → 98 10-49 → 1
Exponent 99 → ∞
Exponent 0 → 0
Decrease Bias to 49
1049 → 9810-48 → 1
Exponent 99 → ∞
Exponent 0 → 0
Single-Precision F.P. format
Representing 6918.3125
6918.3125 = 1101100000110.0101
2
Normalized form
1.1011000001100101 x 212
S = 0
E = 10001011 (127 + 12 = 139)
M = 10,110,000,011,001,010,000,000
Hidden 1
Floating Point Numbers
+1.101 x 25 S=0 Exponent=10000100
Mantissa 101 0000 0000 0000 0000 0000
-1.01011 x 2-126 S=1 Exponent=00000001
Mantissa 010 1100 0000 0000 0000 0000
0 S=0 Exponent=00000000
Mantissa 000 0000 0000 0000 0000 0000
∞ S=0 Exponent=11111111
Mantissa 000 0000 0000 0000 0000 0000
Hexadecimal Number System
Base 16
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F
Representing Binary in compact form
1101100000110 = 1B06 H
2
Counting in Hexadecimal
Decimal Binary Hexadecimal Decimal Binary Hexadecimal
0 0000 0 8 1000 8
1 0001 1 9 1001 9
2 0010 2 10 1010 A
3 0011 3 11 1011 B
4 0100 4 12 1100 C
5 0101 5 13 1101 D
6 0110 6 14 1110 E
7 0111 7 15 1111 F
Counting in Hexadecimal
Decimal Hexa- Decimal Hexa- Decimal Hexa-
Decimal Decimal Decimal
16 10 24 18 32 20
17 11 25 19 33 21
18 12 26 1A 34 22
19 13 27 1B 35 23
20 14 28 1C 36 24
21 15 29 1D 37 25
22 16 30 1E 38 26
23 17 31 1F 39 27
Binary-Hexadecimal Conversion
Binary to Hexadecimal Conversion
11010110101110010110
1101 0110 1011 1001 0110
D 6 B 9 6
Hexadecimal to Binary Conversion
FD13
1111 1101 0001 0011
Decimal-Hexadecimal Conversion
Decimal to Hexadecimal Conversion
Indirect Method
Decimal →Binary → Hexadecimal
Repeated Division by 16
Decimal-Hexadecimal Conversion
Hexadecimal to Decimal Conversion
Indirect Method
Hexadecimal →Binary → Decimal
Sum-of-Weights
More CS302 files
- CS302 - Digital Logic and Design Handouts (1-45 lectures)-1- (PDF · Handout)
- CS302 - Digital Logic and Design Handouts (1-45 lectures)-2. (PDF · Handout)
- CS302 - Digital Logic and Design Handouts (1-45 lectures).pd (PDF · Handout)
- CS302 - Digital Logic and Design Handouts (1-45 lectures).pd (PDF · Handout)
- CS302 Handouts by MS S26.pdf (PDF · Handout)
- CS302 Handouts by MS.pdf (PDF · Handout)
- CS302 Handouts by MS.pdf (PDF · Handout)
- CS302 Highlight Handout By Vu Topper RM.pdf (PDF · Handout)