Professional Documents
Culture Documents
Digital Combination Circuits
Digital Combination Circuits
Logic Gates
Combinational Logic
Boolean Identities and De Morgan’s Laws
Karnaugh Map
Programmable Logic Devices
Seven Segment Decoder / Driver
Binary Decoder
4-bit Magnitude comparator
A logic gate performs a logical operation on one or more logic inputs and produces a single logic output. An
output of one logic gate can connect to the input of one or more other logic gates. Two outputs cannot be
connected together.
Logic gates comes in packages called Integrated circuit (IC) or common used term (non technical) Chip as
shown below.
Logic gates uses only two logic values; 0 (0V) and 1 (5V).
Logic 0 (0V) can be: false, off, low, no, open switch.
Logic 1 (5V) can be: true, on, high, yes, closed switch.
The 7400 IC, containing four NAND logic gates. The two additional contacts are supply power (+5 V) and
the ground (0V).
The Boolean expression for the AND operation is X = A • B . This is read as “X equals A and B.”
X = 1 (5V) when A = 1 (5V) and B = 1 (5V).
Truth table and circuit symbol for a two input AND gate are shown.
OR Gate
The Boolean expression for the OR operation is X = A + B . This is read as “X equals A or B.”
X= 1 (5V) when A = 1 (5V) or B = 1 (5V).
Truth table and circuit symbol for a two input OR gate are shown.
NOT Gate
XA
The Boolean expression for the NOT operation is This is read as “ X equals not A ”, or
“ X equals the inverse of A” , or “X equals the complement of A”
Truth table and circuit symbol for the NOT gate is shown
The Boolean expression for the NAND operation is X A B . This is read as “ X equals A nand B”
Truth table and circuit symbol for the NAND gate is shown
The NAND gate can be constructed using the 2 basic gates (AND and NOT) as shown below
Also the NAND gate can be implemented using 2 NOT gates and 1 OR gate.
The Boolean expression for the NOR operation is X A B . This is read as “ X equals A nor B”
Truth table and circuit symbol for the NAND gate is show.
The NOR gate can be constructed using the 2 basic gates (OR and NOT) as shown below
Also the NOR gate can be implemented using 2 NOT gates and 1 AND gate
The Boolean expression for the XOR operation is X A B . This is read as “ X equals A xor B”
Truth table and circuit symbol for the XOR gate is show.
The XOR gate can be constructed using the 3 basic gates (AND, OR and NOT) as shown below
X A B A B AB
XNOR Gate
The Boolean expression for the XNOR operation is X A B . This is read as “ x equals A xnor B”
Truth table and circuit symbol for the XNOR gate is show.
The XOR gate can be constructed using the 3 basic gates (AND, OR and NOT) as shown below
X A B AB AB
For Example, 74LS00 means 74 = Logic Technology, LS = Low Power Schottky, 00 = Quad 2-input
NAND Gate.
Combinational logic circuits uses some or all of the basic logic gates AND, OR and NOT.
Example:
A Petrol station has 2 underground tanks to store petrol. A level sensor attached to each tank
produces 0V when the level of the petrol in the tank drops below a specified point. Design a circuit
that will produce 5V to turn on a light when the level in any two tanks drops below the specified
point.
Solution:
Interpret the problem and set up its truth table
Write the AND (product) term for each case where the output equals 1.
A B Output
0 0 1 AB
0 1 1 AB
1 0 1 AB
1 1 0
Example:
Find the Boolean expression for the output Q of the given circuit below.
Solution
Trace each input signal all that way to the output
Example:
Find the truth table of the given circuit below
Solution:
Identify the number of input signals and list all possible combinations for the input
Number of input signals = 3 (A ,B and C)
Number of possible combinations 2 3 8 (from 0 to 7)
A B C Output = Q
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
For each input combination, trace the circuit all the way to the output.
1st Combination
2nd Combination
ELEC 224 15 J. Altiti
3rd Combination
4th Combination
8th Combination
Example:
Determine the output voltage waveform of the circuit below, given the input waveform.
Solution:
Identify the time slots where the input signals changes
For each time slot, identify the voltage level for each input at intermediate points
ELEC 224 17 J. Altiti
From the intermediate points compute the output voltage level
Boolean Algebra
Boolean Algebra is the mathematics of digital system. Boolean Algebra is divided into Laws and
Rules.
5. Distributive Law:
A(B + C) = AB + AC
3. Rule #3 A0 0
4. Rule #4 A 1 A
5. Rule #5 AAA
6. Rule #6 AA 1
7. Rule #7 AA A
8. Rule #8 AA 0
Example:
Design combinational circuit that satisfy the given truth table
Solution:
ELEC 224 22 J. Altiti
The output Boolean expression is obtained for G = 1
G xyz xyz xyz. The circuit below satisfy the truth table.
De Morgan’s Laws
Using De Morgans laws, makes it easy to manipulate Boolean expressions and simplify them or
convert them to forms most convenient for translation to electronic logic circuits.
The complement of two or more ORed signals is equivalent to the AND of the
complements of the individual signals
XY X Y
XY XY
Example:
A B CD A B C D
A B C D A B C D
A B C D A B C D
A B C D A B C D
X A B C D
Using De Morgan’s
4. The logical connective must be changed, (AND to OR, OR to AND).
y X2 X4 X4 X3
Example:
Example:
Z=
Each AND and OR gates have multiple inputs, but for simplicity the simplified schematic of a PAL
ELEC 224 37 J. Altiti
show one line as an input to each gate. To make a connection on the simplified schematic of PAL,
place an X at the desired node as shown in the figure below.
f1 P1 P2 P3
f1 X 1 X 2 X 1 X 3 X 1 X 2 X 3
f 2 P1 P3 P4
f2 X1 X 2 X1 X 2 X 3 X 1 X 2
Solution #2:
Solution:
Example: PAL10L8
Binary Decoder
ELEC 224 43 J. Altiti
Decoder : A digital circuit designed to detect the presence of a particular digital state/input. Can have one
output or multiple outputs.
Example : The simplest form of a decoder is the 2-Input AND. It detects the presence of ‘11’ on the
inputs to generate a ‘1’ output.
Example: Design a circuit that generates a ‘1’ at the output when it detects `1001’ at the input.
A3 A2 A1 A0 Output = Q
0 0 0 0 0
0 0 0 1 0
0 0 1 0 0
0 0 1 1 0
0 1 0 0 0
1 0 0 1 0
0 1 1 0 0
0 1 1 1 0
1 0 0 0 0
1 0 0 1 1
1 0 1 0 0
1 0 1 1 0
1 1 0 0 0
1 1 0 1 0
1 1 1 0 0
1 1 1 1 0
Example: Design a circuit that generates a ‘1’ at the output when it detects `1011’ at the input.
Example: Design a circuit that generates a ‘1’ at the output when it detects `1001’ or ‘1011’ at the input.
If the circuit is going to detect all possible input combinations, then it will become a very large with many
ICs.
ELEC 224 45 J. Altiti
It will be more logical to design a special function IC that will detect all possible input combination. The IC
will have n inputs and 2n outputs. It is called n-to-2n lines decoder or 1-of-2n decoder. The output can be
active high or active low.
The decoder below has 4 inputs and 2n = 16 outputs ( 4-to-16 lines decoder or 1-of-16 decoder). The output
is active high. Each output corresponds to a specific input. If the input is ‘A3 = 0, A2 = 0, A1 = 0, A0 = 0’,
then output number 0 is active ‘1’ and the reset of the outputs are inactive ‘0’. If the input changes to ‘A3 =
1, A2 = 0, A1 = 1, A0 = 1’, then output number 11 is active ‘1’ and the reset of the outputs are inactive ‘0’
and so on ….
The output of the decoder below is active low. If the input is ‘A3 = 0, A2 = 0, A1 = 0, A0 = 0’, then output
number 0 is active ‘0’ and the reset of the outputs are inactive ‘1’. If the input changes to ‘A3 = 1, A2 = 0, A1
= 1, A0 = 1’, then output number 11 is active ‘0’ and the reset of the outputs are inactive ‘1’ and so on ….
Truth Table for 4-to-16 Lines Decoder (1-of-16 Decoder) – Active Low Output
The CS1 and CS 2 inputs (pin #18 and pin #19) are chip selects (Enable) lines. They enable the chip
to function when needed. Both lines need to be tied or driven low for the chip to function.
The figure below shows the basic layout of the segments in a SSD. The segments themselves are
identified with lower-case letters "a" through "g," with segment "a" at the top and then counting
clockwise. SSD also include a decimal point ("dp"). A segment can be turned on by driving the
segement high (5V) or low (0V0 depending on the internal connections of the SSD.
With a Common Anode SSD shown below, a low (0V) at the segment pin turns the segment on,
provided that the common anode point is connected high (5V).
Below are the a) Pinout of a Common Cathode SSD b) Internal configurations and c) Interface
Example: What inputs should be driven high = 5V in the common cathode SSD to display ‘A’ ?
Solution: a b c d e f g dp
ELEC 224 49 J. Altiti
1 1 1 0 1 1 1 0
LT = Lamp Test. When low all segments in the SSD are turned on.
RBI = Ripple Blanking Input. Used for Zero Suppression
BI / RBO = Blanking Input / Ripple Blanking output. Used for Zero Suppression.
The number 06.030 can be display as 6.03 (zero suppression) by using the blanking control
pins RBI and BI / RBO .
If RBI = 0 and the BCD input is ‘0000’ then BI / RBO = 0 and all outputs are inactive = high and
the display of a common anode SSD will be blank.
If RBI = 0 and the BCD input is ‘0000’ then BI / RBO =1 and the output will correspond to the
the BCD input
The XOR gate is a basic one bit comparator as shown below. If A = B then X =1, otherwise X = 0
Example: Design a circuit that compare two 2-bit binary numbers. The output of the circuit is equal
ELEC 224 51 J. Altiti
to 1 if the numbers are equal otherwise ‘0’.
Solution: A = A1 A0 and B = B1 B0
To determine an inequality of binary number A and B, first examine the MSB in each number. The
following conditions are possible:
The 74HC85 has three cascading inputs A<B, A=B, A>B. these inputs allow several comparators to
ELEC 224 52 J. Altiti
be cascaded for comparison of any number of bits greater than 4.
Example: Design a circuit that will compare two 4-bit binary numbers.
Solution:
Example: Design a circuit that will compare two 8-bit binary numbers.