CS302 - Lab Manual - Week No (7).pdf
Verified academic study resource for CS302 (Digital Logic Design) 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
- CS302 – Digital Logic Design
- 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 — 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 CS302 - Lab Manual - Week No (7).pdf for free?
You can preview and download "CS302 - Lab Manual - Week No (7).pdf" (CS302 PDF, ~280 pages) directly from the MIHORA VU Study Library (https://study.mihora.tech/doc/cs302-lab-manual-week-no-7-pdf) with 100% free high-speed downloads and zero registration requirements.
What syllabus chapters and lectures are covered in this CS302 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 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
Lab Experiment # 07
The Story of Minterms and Maxterms
Objectives
Learn how implement logic functions using the standard forms: Sum of Products and Product of Sums.
Background
We can write expressions in many ways, but some ways are more useful than others
A sum of products (SOP) expression contains: Only OR (sum) operations at the “outermost” level and each
term that is summed must be a product of literals
The advantage is that any sum of products expression can be implemented using a three-level circuit
– literals and their complements at the first level
– AND gates at the second level
– a single OR gate at the third level
Example:
f(x,y,z) = y’ + x’yz’ + xz
Notice that the NOT gates are implicit and that literals are reused.
A minterm is a special product of literals, in which each input variable appears exactly once.
A function with n variables has 2n minterms (since each variable can appear complemented or not)
Example:
A three-variable function, such as f(x,y,z), has 23 = 8 minterms:
Each minterm is true for exactly one combination of inputs:
Those minterms are: x’y’z’ x’y’z x’yz’ x’yz xy’z’ xy’z xyz’ xyz
A Minterm is true when:
Minterm When the minterm is True Minterm ID
x’y’z’ x=0, y=0, z=0 m0
x’y’z x=0, y=0, z=1 m1
x’yz’ x=0, y=1, z=0 m2
x’yz x=0, y=1, z=1 m3
xy’z’ x=1, y=0, z=0 m4
xy’z x=1, y=0, z=1 m5
xyz’ x=1, y=1, z=0 m6
xyz x=1, y=1, z=1 m7
Sum of Minterms ( or Sum of Products)
Every function can be written as a sum of minterms, which is a special kind of sum of products form
The sum of minterms form for any function is unique
If you have a truth table for a function, you can write a sum of minterms expression just by picking out the
rows of the table where the function output is 1.
Example
f = x’y’z’ + x’y’z + x’yz’ + x’yz + xyz’
= m0 + m1 + m2 + m3 + m6
= Σm(0,1,2,3,6)
The dual idea: products of sums
A product of sums (POS) expression contains: Only AND (product) operations at the “outermost” level,
Each term must be a sum of literals.
Product of sums expressions can be implemented with three-level circuits
– literals and their complements at the first level
– OR gates at the first level
– a single AND gate at the second level
• Compare this with sums of products
Example
f(x, y, z) = y’ . (x’+y+z’) . (x+z)
A maxterm is a sum of literals, in which each input variable appears exactly once.
A function with n variables has 2n maxterms
Example
A three-variable function f(x,y,z) has 8 maxterms
Each maxterm is false for exactly one combination of inputs:
Those materms are: x’+y’+z’ x’+y’+z x’+ y+z’ x’+ y+z x+y’+z’ x+y’+z x+y+z’ x+y+z
Maxterm Is false when:
Maxterm When the maxterm is false Maxterm ID
x+y+z x=0, y=0, z=0 M0
x + y + z’ x=0, y=0, z=1 M1
x + y’ + z x=0, y=1, z=0 M2
x + y’ + z’ x=0, y=1, z=1 M3
x’ + y + z x=1, y=0, z=0 M4
x’ + y + z’ x=1, y=0, z=1 M5
x’ + y’ + z x=1, y=1, z=0 M6
x’ + y’ + z’ x=1, y=1, z=1 M7
Every function can be written as a unique product of maxterms
If you have a truth table for a function, you can write a product of maxterms expression by picking out the
rows of the table where the function output is 0. (Be careful if you’re writing the actual literals!)
f = (x’ + y + z).(x’ + y + z’).(x’ + y’ + z’)
= M4. M5.M7 = ΠM(4,5,7)
f’ = (x + y + z).(x + y + z’).(x + y’ + z).(x + y’ + z’).(x’ + y’ + z)
= M0. M1. M2. M3. M6 = ΠM(0,1,2,3,6)
Minterms and maxterms are related
Any minterm mi is the complement of the corresponding maxterm Mi
For example, m4’ = M4 because (xy’z’)’ = x’ + y + z
Minterm Shorthand Maxterm Shorthand
x’y’z’ m0 x+y+z M0
x’y’z m1 x + y + z’ M1
x’yz’ m2 x + y’ + z M2
x’yz m3 x + y’ + z’ M3
xy’z’ m4 x’ + y + z M4
xy’z m5 x’ + y + z’ M5
xyz’ m6 x’ + y’ + z M6
xyz m7 x’ + y’ + z’ M7
Converting between standard forms
We can convert a sum of minterms to a product of maxterms
• In general, just replace the minterms with maxterms, using maxterm numbers that don’t appear in the sum
of minterms:
• The same thing works for converting from a product of maxterms to a sum of minterms
Example
From before
f = Σm(0,1,2,3,6)
and f’ = Σm(4,5,7)
= m4 + m5 + m7
complementing (f’)’ = (m4 + m5 + m7)’
so f = m4’ . m5’ . m7’ [ DeMorgan’s law ]
= M4 . M5 . M7
= ΠM(4,5,7)
Lab Tasks
Task 1: Three-input Boolean functions
Given the following truth table of a three-input logic circuit
More CS302 files
- CS-302 Digital Logic Design.pdf (PDF · Study Resource)
- CS302 - 1.pdf (PDF · Study Resource)
- CS302 - 2.pdf (PDF · Study Resource)
- CS302 - 3.pdf (PDF · Study Resource)
- CS302 - 4.pdf (PDF · Study Resource)
- CS302 - Lab Manual - Week No (1 - 3).pdf (PDF · Study Resource)
- CS302 - Lab Manual - Week No (1 - 3).pdf (PDF · Study Resource)
- CS302 - Lab Manual - Week No (1 - 3).pdf (PDF · Study Resource)