Digital Logic Designs
Digital Logic Designs
Combinational logic
design 1 Key words
binary code logic gate
light-dependent
resistor (LDR)
1 Burglar alarm 2 Automatic night light light-emitting
+5V +5V diode (LED)
a b
1 Burglar alarm
● The light-dependent resistor (LDR)
and the adjacent resistor act as a
potential divider. In the dark the
resistance of the LDR is high and both
inputs to the NAND gate are high and
c
the output is 0.
● When light shines on the LDR its
resistance drops and that input to the
0V 0V NAND gate becomes low. The result is
a,b pull-up resistor – to keep input high
an output of 1 which causes the
when switch is open and no light is buzzer to sound.
shining on the LDR
Note: CMOS inputs must not float
c buzzer
2 Automatic night light
● During the day the LDR is illuminated
and its resistance is low. The low input
to the first NAND gate is inverted to
3 2-bit decoder 4 2-bit encoder give a high input to the second NAND
+5V gate. The high input to the second
NAND gate is inverted to give a low
A B output so the LED is not lit.
● As it goes dark the resistance of the