UNIT 3, Unit4 Projects
UNIT 3, Unit4 Projects
Method.Combinational Logic Circuits: Adders, Subtractors, Comparators, Multiplexers, Demultiplexers, Encoders, Decoders and Code
converters, Hazards and Hazard Free Relations
S.No Title of the Project Components Required Concepts Covered
1 Practical Question: Design 4 variable and 5 variable Python Compiler Minimization
Karnaugh Map Techniques
Hands-on Activity:
Hands-on Activity:
To design a Python program that generates and simplifies 4-variable and 5-variable Karnaugh Maps (K-maps) using proper
simplification rules, we’ll need to:
The key to simplifying K-maps is to group 1s (for SOP, Sum of Products) or 0s (for POS, Product of Sums) in powers of 2, such as
groups of 1, 2, 4, 8, etc., based on adjacency.
Here’s a Python program that creates and simplifies K-maps for 4 and 5 variables.
import numpy as np
import pandas as pd
def gray_code_order(num_vars):
if num_vars == 4:
return [
[0, 1, 3, 2],
[4, 5, 7, 6],
[12, 13, 15, 14],
elif num_vars == 5:
return [
else:
if minterms is None:
minterms = []
if maxterms is None:
maxterms = []
order = gray_code_order(num_vars)
for i in range(len(order)):
for j in range(len(order[0])):
term = order[i][j]
if term in minterms:
kmap_grid[i][j] = '1'
kmap_grid[i][j] = '0'
else:
terms = []
# Find groups
return []
group = []
while stack:
cr, cc = stack.pop()
if visited[cr, cc]:
continue
group.append((cr, cc))
stack.append((nr, nc))
return group
for i in range(rows):
for j in range(cols):
group = find_group(i, j)
if group:
terms.append(group)
term = []
if min_row == max_row:
if min_col == max_col:
return "".join(term)
print("4-variable K-map:")
print(kmap_4var_df)
print(simplify_kmap(kmap_4var_grid, num_vars=4))
print("\n5-variable K-map:")
print(kmap_5var_df)
print(simplify_kmap(kmap_5var_grid, num_vars=5))
1. Gray Code Order Function: gray_code_order returns the Gray code order matrix for either a 4-variable or 5-variable K-
map. This helps place minterms or maxterms in the correct cells.
2. Generate K-map Grid: generate_kmap creates the K-map grid using minterms or maxterms and fills it with 1s or 0s
accordingly. It returns a DataFrame and the raw grid for processing.
3. Simplification Function: simplify_kmap identifies and groups adjacent cells containing 1s to simplify the Boolean
expression for SOP:
o Grouping: Uses depth-first search to group adjacent cells containing 1s.
o Expression Generation: Converts each group into a Boolean term based on common variables.
4. Testing with Example Minterms: Finally, the code displays the K-map for both 4 and 5 variables and shows the simplified
Boolean expression.
This program is structured to handle basic simplification of K-maps for SOP expressions. Further optimizations could handle more
complex wrap-around cases and larger groups.
4o
Project 2
https://youtu.be/aUq3-K3teig?si=3rKHv3Sun_Dcle0R
Project 3
Circuit digram link
https://circuitverse.org/users/60560/projects/3-bit-binary-adder-subtractor-a32f81e9-dc25-40dd-bbae-46f80f99b75a
https://youtu.be/u863cwgdlnA?si=f4v-bR3ssCBaBeEW
https://youtu.be/xLmXrgjwdDQ?si=4GaRJU56cctL9_dD
https://youtu.be/o87GH5U1zUY?si=rCuqgonoZ2TaMy8n
Project 4
https://www.chegg.com/homework-help/questions-and-answers/design-digital-breadboard-circuit-implement-following-digital-function-using-
8-1-multiplex-q73396173
Project 5
https://www.youtube.com/watch?v=h4uVk3gsBUM
UNIT 4: Sequential Circuits Fundamentals: Basic Architectural Distinctions between
Combinational and Sequential circuits, SR Latch, Flip Flops: SR, JK, JK Master Slave, D and T Type Flip Flops, Excitation Table of all
Flip Flops, Timing and Triggering Consideration, Conversion from one type of Flip-Flop to another.
Registers and Counters: Shift Registers -Left, Right and Bidirectional Shift Registers, Applications of Shift Registers - Design and
Operation of Ring and Twisted Ring Counter, Operation and design of Asynchronous and Synchronous Counters.
,
S.No Title of the Project Concepts Covered
Hands-on Activity:
3 Practical Question: Design a Digital Object Counter IC’s, Resistors, Clock Pulse Generator Asynchronous and
Synchronous
Hands-on Activity: Counters.
Hands-on Activity:
IR sensor, Light Source, Counting Machine
template
Realisation of Stimulus circuit for the IR and
Counter
Design of the Decade Counter using ICs