Lab 2SolvedSheet
Lab 2SolvedSheet
Example 1: For the Boolean variables A = 0, B = 1 and C = 0 obtain the minterm and
maxterm for the variables.
Solution:
Given the values of Boolean variables as: A = 0, B = 1 and C = 0
Minterms = A’BC’ while Maxterms= A + B’ + C
Decoder:
A decoder is a combinational circuit that converts binary-coded inputs into a unique set of
outputs. It is commonly used in digital electronics to activate one specific output line based on
the binary input value.
- Used in RAM and ROM to select memory locations.
Multiplexer
Half Adder:
- A half adder adds two single-bit binary numbers and produces a Sum (S) and a Carry
(Cout).
- It does not consider a carry input from a previous stage.
- Sum = A ⊕ B - Carry = A AND B
Full Adder:
A full adder adds three binary digits:
• A, B (input bits to be added)
• Cin (Carry-in from a previous addition stage)
• SUM = (A XOR B) XOR Cin = (A ⊕ B) ⊕ Cin
• CARRY-OUT = A AND B OR Cin(A XOR B) = A.B + Cin(A ⊕ B)
4-Bit Adder
4-Bit Adder-Subtractor
Exercises
1. Implement the function f(w1,w2,w3) = ∑m(0, 1, 3, 4, 6, 7) by using a 3-to-8
binary decoder and an OR gate.
2. Implement the following function using a Multiplexer.
𝐹 (𝐴, 𝐵, 𝐶) =Σ(1, 2, 6, 7)
A B C F
0 0 0 0
0 0 1 1
0 1 0 1
0 1 1 0
1 0 0 0
1 0 1 0
1 1 0 1
1 1 1 1
6. Design a combinational circuit with three inputs x , y and z ,and three outputs
A,B and C
When the input is 0, 1, 2, or 3 the output is one greater than input
When the binary input is 4,5,6,7, the binary output is one less than the input.
X Y Z A B C
0 0 0 0 0 1
0 0 1 0 1 0
0 1 0 0 1 1
0 1 1 1 0 0
1 0 0 0 1 1
1 0 1 1 0 0
1 1 0 1 0 1
1 1 1 1 1 0
Z = C’
And draw the full circuit.
7. Implement a full-adder circuit using a decoder.
Solution:
We can use X as a carry and the two bits will be Y and Z and Carry and Sum will be
shown as in the following table
- 𝐶(𝑥, 𝑦, 𝑧) =∑(3, 5, 6, 7)
- 𝑆(𝑥, 𝑦, 𝑧) = ∑ (1, 2, 4, 7)