Lec_04.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

  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 Lec_04.ppt for free?

You can preview and download "Lec_04.ppt" (CS302 PPT, ~450 pages) directly from the MIHORA VU Study Library (https://study.mihora.tech/doc/lec-04-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

Lecture No. 4
 Number Systems

          32-bit f.p. number (recap)

   32-bit Floating point format
      Sign bit          1
      Exponent bits     8
      Mantissa bits     23
      Exponent represented as Biased 127

      Range of f.p. numbers (recap)
 Largest positive/negative number
    2127

 Smallest positive/negative number

    2-126

 The number Zero

    Exponent = 00000000 Mantissa = 000 0000

     0000 0000 0000 0000
 The number infinite

    Exponent = 11111111 Mantissa = 000 0000

     0000 0000 0000 0000

    Arithmetic operations on floating point
                  numbers
 Addition
   Adding mantissas after adjusting exponents

 Subtraction

   Subtracting mantissas after adjusting

    exponents
 Multiplication

   Multiplying mantissas and adding exponents

 Division

   Dividing mantissas and subtracting exponents

            64-bit f.p. number (recap)

   64-bit Double-Precision floating Point format
      Sign bit         1
      Exponent bits    11
      Mantissa bits    52
      Exponent represented as Biased 1023

            f.p. numbers (recap)

 How do systems differentiate between number
  representations?
 Defining and Declaring Data Types.

        Hexadecimal Numbers (recap)

   Hexadecimal Number System
     Base 16 number system

     0 to F

     Used to represent large binary numbers

      Counting in Hexadecimal (recap)

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

    Binary-Hexadecimal conversion (recap)

 Binary to Hexadecimal Conversion
   11010110101110010110

   1101 0110 1011 1001 0110

   D      6    B     9    6
 Hexadecimal to Binary Conversion

   FD13

   1111 1101 0001 0011

    Hexadecimal-decimal conversion (recap)

 Hexadecimal to Decimal Conversion
 Indirect Method

    Hexadecimal →Binary → Decimal

 Sum-of-Weights

Decimal-Hexadecimal Conversion (recap)

 Decimal to Hexadecimal Conversion
 Indirect Method

    Decimal →Binary → Hexadecimal

 Repeated Division by 16

      Hexadecimal Arithmetic (recap)

 Hexadecimal Addition
   Carry generated

 Hexadecimal Subtraction

   Borrow weight 16

            Octal Number System

 Base 8
 0, 1, 2, 3, 4, 5, 6, 7

 Representing Binary in compact form

    1101100000110 = 15406
                         2   8
   Not commonly used in the presence of
    Hexadecimal Number System

              Counting in Octal

 Octal digit represented by a 3-bit binary
 Decimal 8 represented by 2-digit Octal

          Counting in Octal

Decimal      Binary     Octal
0            000        0
1            001        1
2            010        2
3            011        3
4            100        4
5            101        5
6            110        6
7            111        7

             Counting in Octal

Decimal Octal Decimal Octal   Decimal Octal
8       10    16      20      24      30
9       11    17      21      25      31
10      12    18      22      26      32
11      13    19      23      27      33
12      14    20      24      28      34
13      15    21      25      29      35
14      16    22      26      30      36
15      17    23      27      31      37

          Binary-Octal Conversion

 Binary to Octal Conversion
 Octal to Binary Conversion

        Octal-Decimal Conversion

 Octal to Decimal Conversion
 Indirect Method

    Octal →Binary → Decimal

 Sum-of-Weights

        Decimal-Octal Conversion

 Decimal to Octal Conversion
 Indirect Method

    Decimal →Binary → Octal

 Repeated Division by 8

       Octal Addition & Subtraction

 Octal Addition
   Carry generated

 Octal Subtraction

   Borrow weight 8

        Binary to Octal Conversion

 011010110101110010110
 011 010 110 101 110 010 110

 3   2 6 5 6 2 6

 1011011101001
 1 011 011 101 001

 001 011 011 101 001

 1   3 3     5 1

        Octal to Binary Conversion

 1726
 001 111 010 110

                 Sum-of-Weights

4037
(4 x 83) + (0 x 82) + (3 x 81) + (7 x 80)
(4 x 512) + (0 x 64) + (3 x 8) + (7 x 1)
2048 + 0 + 24 + 7
2079

         Repeated Division by 8

Number   Quotient      Remainder
2079     259           7           (O0)
259      32            3           (O1)
8        4             0           (O2)
4        0             4           (O3)

              Octal Addition

Carry   1
            7602
        + 4771
          14573

             Octal Subtraction

Borrow 11
             7602
      -     4771
            2611

        Alternate Representations

 Excess Code
 BCD Code

 Gray Code

                 Excess Code

 A bias is added to Binary Code
 Used by floating point numbers

               Excess-8 Code

Decimal 2’s   Excess-8   Decimal 2’s   Excess-8
        Comp.                    Comp.
0       0000 1000        -8      1000 0000
1       0001 1001        -7      1001 0001
2       0010 1010        -6      1010 0010
3       0011 1011        -5      1011 0011
4       0100 1100        -4      1100 0100
5       0101 1101        -3      1101 0101
6       0110 1110        -2      1110 0110
7       0111 1111        -1      1111 0111

    BCD (Binary Coded Decimal) Code

 Binary Code to represent decimal digits 0-9
 Used by Decimal Number Displays

   BCD (Binary Coded Decimal) Code

Decimal   BCD     Decimal   BCD
0         0000    5         0101
1         0001    6         0110
2         0010    7         0111
3         0011    8         1000
4         0100    9         1001

                BCD Addition

  23         0010 0011
  45         0100 0101

More CS302 files

All CS302 files · Midterm Prep 2026 · MCQs Bank