CS302 - Lab Manual - Week No (8).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 (8).pdf for free?
You can preview and download "CS302 - Lab Manual - Week No (8).pdf" (CS302 PDF, ~280 pages) directly from the MIHORA VU Study Library (https://study.mihora.tech/doc/cs302-lab-manual-week-no-8-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 # 08
XOR and XNOR gates: Basics and Applications
Objectives
To learn how to build XOR gates from basic gates
To learn how to build a Half Adder and a Full Adder using XOR gates.
To learn how to build a parallel adder, subtracter, incrementer and decrementer using full adders.
Background
The XOR gate (sometimes EOR gate, or EXOR gate) is a digital logic gate that implements an exclusive or;
that is, a true output (1) results if one, and only one, of the inputs to the gate is true (1). If both inputs are
false (0) or both are true (1), a false output (0) results. Next is the circuit representation of the XOR gate and
its truth table.
A B F1
0 0 0
0 1 1
1 0 1
1 1 0
Next is one way to build an XOR gate using NAND gates only
The XOR logic gate can be used as a one-bit adder (or a Half-Adder; HA)that adds any two bits together to
output one bit (the sum) and another bit that represents the carry out. As shown below
The XOR logic gate can be used as a one-bit full adder that adds any three bits together to output one bit (the
sum) and another bit that represents the carry out. As shown below
Inputs Outputs
A B Cin Cout S
0 0 0 0 0
1 0 0 0 1
0 1 0 0 1
1 1 0 1 0
0 0 1 0 1
1 0 1 1 0
0 1 1 1 0
1 1 1 1
Lab Tasks
Task 1: XOR built from basic gates
Draw using EWB the following circuits then fill their truth tables:
A B F1
0 0
0 1
1 0
1 1
What do you notice?
Each one of the above circuits can be replaced with one single logic gate that gives the same truth table,
that’s the Exclusive OR Gate or XOR.
A B F No. of 1's
0 0 0 Even
0 1 1 Odd
1 0 1 Odd
1 1 0 Even
Task 2: XNOR Gate
Draw using EWB the following circuit then fill its truth table:
A B F
0 0
0 1
1 0
1 1
The above circuit can be replaced with one single logic gate that gives the same truth table, that’s the
Exclusive NOR Gate or XNOR.
A B F No. of 1's
0 0 1 Odd
0 1 0 Even
1 0 0 Even
1 1 1 Odd
Task 3: 3-input XOR Gate
Draw using EWB a three-input XOR gate. Check the circuit using a Logic converter.
A B C A B C
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
Task 4: Half adder circuit
The following diagram represents the Half Adder ( HA is a Logic Circuit that performs 1-bit
binary addition). Given that P and Q are two 1-bit binary numbers, S is the 1-bit Sum of P
and Q, and C is the CARRY bit.
(a) Find out the Boolean functions S and C, and write them in the corresponding blanks.
(b) Draw using EWB the HA circuit then find its truth table by using the logic converter.
S=
C=
P Q S C
0 0
0 1
1 0
1 1
Task 5: Implementing HA circuit using EWB
Draw using EWB the HA circuit shown in the figure below then find its truth table by using
the logic converter, compare the truth table obtained with the one in Task5, what do you
notice?
P Q S C
0 0
0 1
1 0
1 1
Task 6: Implementing FA circuit using EWB
Draw using EWB a full adder circuit; find out its truth table and Boolean functions.
Cin P Q Sum Cout
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
Task 7: Implementing a 4-bit parallel adder using 4 FA’s
Draw using EWB a 4-bit parallel adder circuit (the circuit below shows (6+3=9))
Note: you can find the decoded 7-segment under the “indicators” toolbar.
Task 8: Implementing a 4-bit parallel subtracter using 4 FA’sMore 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)