Document 1
Document 1
2
QUESTION NO.1:
Design a
i. 4x1 Mux
ii. 1x8 DMUX
iii. 3X8 Decoder
iv. 8x3 Encoder
v. 2x4 decoder
ANSWER:
A 4x1 Mux has 4 data inputs and 1 output. It uses 2 selection lines (S1 and
S0) to choose between the inputs.
Truth Table:
Logic Equation:
Output=(S1′⋅S0′⋅D0)+(S1′⋅S0⋅D1)+(S1⋅S0′⋅D2)+(S1⋅S0⋅D3)\text{Output}
= (S1' \cdot S0' \cdot D0) + (S1' \cdot S0 \cdot D1) + (S1 \cdot S0' \cdot
D2) + (S1 \cdot S0 \cdot D3)Output=(S1′⋅S0′⋅D0)+(S1′⋅S0⋅D1)+
(S1⋅S0′⋅D2)+(S1⋅S0⋅D3)
Where:
A 1x8 DMUX takes a single input and routes it to one of the 8 output lines,
based on the 3 selection lines (S2, S1, S0).
Truth Table:
In
SSS Out Out Out Out Out Out Out Out
pu
210 put0 put1 put2 put3 put4 put5 put6 put7
t
0 0 0 D D X X X X X X X
0 0 1 D X D X X X X X X
0 1 0 D X X D X X X X X
0 1 1 D X X X D X X X X
1 0 0 D X X X X D X X X
1 0 1 D X X X X X D X X
1 1 0 D X X X X X X D X
1 1 1 D X X X X X X X D
3. 3x8 Decoder
A 3x8 Decoder takes 3 binary inputs (A2, A1, A0) and generates 8 outputs,
with only one output active at a time based on the input combination.
Truth Table:
4. 8x3 Encoder
An 8x3 Encoder converts 8 inputs into a 3-bit binary code. The highest
priority input generates the corresponding binary output.
Truth Table:
5. 2x4 Decoder
A 2x4 Decoder takes 2 inputs (A1, A0) and generates 4 outputs. Only one
output is active at a time.
Truth Table:
These designs provide the basic truth tables and logic equations for each
of the components requested. The next step would be to implement these
designs using logic gates or programmable devices like FPGAs or
microcontrollers, depending on the target application.
QUESTION NO.2:
Design
i. a Half Adder
ii. a Half Subtractor
iii. a Full Adder
iv. a Full Subtractor
v. a comparator
ANSWER:
1. Half Adder
A Half Adder adds two binary digits and provides two outputs: the sum and the carry.
Truth Table:
Su Carr
A B
m y
0 0 0 0
0 1 1 0
1 0 1 0
1 1 0 1
Logic Equations:
2. Half Subtractor
A Half Subtractor subtracts two binary digits and provides two outputs: the difference and
the borrow.
Truth Table:
Differen Borro
A B
ce w
0 0 0 0
0 1 1 1
1 0 1 0
1 1 0 0
Logic Equations:
3. Full Adder
A Full Adder adds three binary digits (two inputs and a carry-in) and provides two outputs:
the sum and the carry-out.
Truth Table:
Su Cou
A B Cin
m t
0 0 0 0 0
0 0 1 1 0
0 1 0 1 0
0 1 1 0 1
1 0 0 1 0
1 0 1 0 1
1 1 0 0 1
1 1 1 1 1
Logic Equations:
Sum = A ⊕ B ⊕ Cin
Carry-out (Cout) = (A ⋅ B) + (B ⋅ Cin) + (A ⋅ Cin)
4. Full Subtractor
A Full Subtractor subtracts three binary digits (two inputs and a borrow-in) and provides
two outputs: the difference and the borrow-out.
Truth Table:
Differen Bou
A B Bin
ce t
0 0 0 0 0
0 0 1 1 1
0 1 0 1 1
0 1 1 0 1
1 0 0 1 0
1 0 1 0 0
1 1 0 0 0
1 1 1 1 1
Logic Equations:
Difference = A ⊕ B ⊕ Bin
Borrow-out (Bout) = (A' ⋅ B) + (Bin ⋅ (A' ⊕ B))
A Comparator compares two binary numbers and outputs whether they are equal, greater,
or less. Here, let's design a 2-bit comparator.
Truth Table:
A> A< A=
A1 A0 B1 B0
B B B
0 0 0 0 0 0 1
0 0 0 1 0 1 0
0 0 1 0 0 1 0
0 0 1 1 0 1 0
0 1 0 0 1 0 0
0 1 0 1 0 1 0
0 1 1 0 0 1 0
0 1 1 1 0 1 0
1 0 0 0 1 0 0
1 0 0 1 1 0 0
1 0 1 0 1 0 0
1 0 1 1 0 1 0
1 1 0 0 1 0 0
1 1 0 1 1 0 0
1 1 1 0 1 0 0
1 1 1 1 0 0 1
Logic Equations:
These designs provide the truth tables and logic equations for each of the components
requested. You can implement these using basic gates (AND, OR, XOR, NOT) to build the
corresponding circuits.
QUESTION NO.3:
From the truth table write the SOP and POS expressions and draw the logic circuits
I.
A B C OUTPUT=X
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 0
1 0 0 1
1 0 1 1
1 1 0 1
1 1 1 1
II
B OUTPUT=F
A
0 0 1
0 1 1
1 0 0
1 1 0
ANSWER:
Let's break this into two parts based on the given truth tables:
Output
A B C
(X)
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 0
1 0 0 0
1 0 1 1
1 1 0 0
1 1 1 1
The SOP expression is formed by identifying the rows where the output is
1. In this case, rows 6 and 8 have an output of 1.
The POS expression is formed by identifying the rows where the output is
0. These rows are:
X=(A+B+C)⋅(A+B+C′)⋅(A+B′+C)⋅(A+B′+C′)⋅(A′+B+C)⋅(A′+B′+C)X = (A +
B + C) \cdot (A + B + C') \cdot (A + B' + C) \cdot (A + B' + C') \cdot (A'
+ B + C) \cdot (A' + B' + C)
A ──────────────┐
│
AND ──────┐
B ─── NOT ──────┘ │
OR ─── X (Output)
C ──────────────┐ │
AND ──────┘
A ──────────────┘
B ──────────────┐
C ──────────────┘
II. Second Truth Table: Output = F
Output
A B
(F)
0 0 1
0 1 0
1 1 1
0 0 1
1 0 1
From the truth table, the output is 1 for rows 1, 3, 4, and 5. We will write
the product terms for these rows.
From the truth table, the output is 0 for row 2. So we form the sum term
for this row.
F=(A+B′)F = (A + B')
o A⋅BA \cdot B
o A⋅B′A \cdot B'
Use an OR gate to combine these three product terms to generate
the final output.
The SOP logic circuit will look like:
Summary of Expressions:
C
b. POS: X=(A+B+C)⋅(A+B+C′)⋅(A+B′+C)⋅(A+B′+C′)⋅(A′
+B+C)⋅(A′+B′+C)X = (A + B + C) \cdot (A + B + C') \cdot (A
+ B' + C) \cdot (A + B' + C') \cdot (A' + B + C) \cdot (A' + B'
+ C)
B'
b. POS: F=(A+B′)F = (A + B')