School of Electrical Engineering and Computer Science
National University of Sciences & Technology (NUST)
Home Assignment No-3[CLO4]
Subject:
Course:
Teacher:
Digital Logic Design
BSCS-14ABC
Engr. Arshad Nazir
Marks:
Issue:
Due on:
50
21 Apr 2025
28 Apr 2025
Note:
(10:00 AM)
Attempt the given problem set sequentially. Show all the design steps.
Make an index showing summary of the problems solved with page numbers
and also specify the missing ones. Please submit a certificate showing the
originality of efforts and no copying from others.
No late submissions will be accepted unless a prior approval from the teacher
has been obtained with genuine reasons. The assignments submitted after due
date/time will be graded zero.
University has zero tolerance for plagiarism and serious penalties apply. All
assignments found mutually copied will be marked zero.
Note that Five Marks are reserved for neat work, table of contents, and
certificate to be attached with the assignment work.
Problem No-1
A simple security system for two doors consists of a card reader
and a keypad.
Card reader
Keypad
A
B
C
D
E
X
Logic
Circuit
Y
Z
To
door1
To
door2
To
alarm
A person may open a particular door if he or she has a card
containing the corresponding code and enters an authorized
keypad code for that card. The outputs from the card reader are as
follows:
EE-223 DLD
Page 1
No card inserted
Valid code for door1
Valid code for door2
Invalid card code
A
B
0
0
1
1
0
1
1
0
To unlock a door, a person must hold down the proper keys on the
keypad and, then, insert the card in the reader. The authorized
keypad codes for door1 and door2 are three-bit odd and even
functions respectively. If the card has an invalid code or if the
wrong keypad code is entered, the alarm will ring when the card is
inserted. If the correct keypad code is entered, the corresponding
door will be unlocked when the card is inserted.
Design the logic circuit for this simple security system. Your circuit’s
inputs will consist of a card code AB, and a keypad code CDE. The
circuit will have three outputs XYZ (if X or Y=1, door1 or 2 will be
opened; if Z=1, the alarm will sound).
a. Implement the circuit with one 5:32 decoder constructed from
2:4 decoders with active-low enable input, active-low outputs
and three logic gate connected externally to the decoder
outputs.
b. Implement the output X with one 8:1 multiplexer and minimum
number of external gates as required. Take CDE as selection
inputs. Assume that both normal and complemented inputs are
available from the source.
c. Realize the output Y with four tri-state gates, one 2:4 line
decoder, and external NOR gates to the data inputs of tri-state
gates. Connect A and B to decoder as data inputs.
d. Implement The output Z with Two-Level NAND gates. Assume
that double-rail inputs are available.
Problem No-2
EE-223 DLD
Design a 4-bit Arithmetic Logic Unit (ALU) to perform the following
functions
Page 2
Use 2-to-1 multiplexers, binary adders, and gates as needed.
Assume that A and B are both 4-bit numbers. Draw the logic circuit.
_____________________________________________________________________
“Good Luck”
EE-223 DLD
Page 3