Digital logic 5 marks
Digital logic 5 marks
1110
1 0101
4. The result:
Let me know if you have any other questions or would like to perform more subtractions using this
method!
* The Consensus Theorem states that for any Boolean variables A, B, and C:
* (A' + B' + D) and (A + B + D') could potentially form a consensus term with (A + B' + C + D)
* Since we have these complementary terms, we can apply the Consensus Theorem:
* Now, we can simplify the expression using the Consensus Theorem result:
V)Design a counter to count the following sequence using RS flip flops: 0,2, 4,6, and
repeat.
Ans :-
To design a counter to count the sequence 0, 2, 4, 6, and repeat using RS flip-flops, we can follow
these steps:
1. Determine the number of bits required: Since the sequence has a maximum value of 6, we need at
least 3 bits to represent the sequence (2^3 = 8, which is greater than 6).
2. Assign the sequence values to the bits: Let's assign the sequence values to the bits as follows:
1. 0 = 000
2. 2 = 010
3. 4 = 100
4. 6 = 110
3. Create a state table: Create a state table to show the current state and the next state for each
sequence value.
| --- | --- |
1. Design the counter using RS flip-flops: We can use 3 RS flip-flops to design the counter. Let's label
the flip-flops as Q0, Q1, and Q2, where Q0 is the least significant bit and Q2 is the most significant
bit.
The next state of each flip-flop can be determined using the following equations:
1. Create a minterm table: Create a table with all the minterms (0 to 15) and mark the minterms that
are included in the function F(A,B,C,D) = £(0,5,8,9,10,11,14,15).
| Minterm | A | B | C | D | Included |
| 0 | 0 | 0 | 0 | 0 | Yes |
| 1 | 0 | 0 | 0 | 1 | No |
| 2 | 0 | 0 | 1 | 0 | No |
| 3 | 0 | 0 | 1 | 1 | No |
| 4 | 0 | 1 | 0 | 0 | No |
| 5 | 0 | 1 | 0 | 1 | Yes |
| 6 | 0 | 1 | 1 | 0 | No |
| 7 | 0 | 1 | 1 | 1 | No |
| 8 | 1 | 0 | 0 | 0 | Yes |
| 9 | 1 | 0 | 0 | 1 | Yes |
| 10 | 1 | 0 | 1 | 0 | Yes |
| 11 | 1 | 0 | 1 | 1 | Yes |
| 12 | 1 | 1 | 0 | 0 | No |
| 13 | 1 | 1 | 0 | 1 | No |
| 14 | 1 | 1 | 1 | 0 | Yes |
| 15 | 1 | 1 | 1 | 1 | Yes |
We're tasked with creating a circuit that identifies when a 4-bit BCD (Binary Coded Decimal)
input represents either the digit 2 (0010) or 5 (0101). The output should be 1 if the input is 2
or 5, and 0 otherwise.
To minimize the number of gates, we can use Boolean algebra and Karnaugh maps to
simplify the logic. Here's the approach:
1. *Truth Table:*
| A (MSB) | B | C | D (LSB) | Output (Y) |
|---|---|---|---|---|
|0|0|0|0|0|
|0|0|0|1|0|
|0|0|1|0|1|
|0|0|1|1|0|
|0|1|0|0|0|
|0|1|0|1|1|
|0|1|1|0|0|
|0|1|1|1|0|
|1|0|0|0|0|
|1|0|0|1|0|
The Karnaugh map for the output (Y) will have two groups: one for the input 0010 (BCD 2)
and another for 0101 (BCD 5). By grouping these terms, we can derive the simplified Boolean
expression.
3. *Circuit Implementation:*
Based on the simplified expression, we can construct the circuit using AND, OR, and NOT
gates.
Step 5: Since we are working with Boolean algebra, the coefficient 2 can be ignored
AC'D' + ABD + ABC'
iv) Design a full adder circuit using two half adder. Write down the truth table of
full adder.
Ans:-
*Designing a Full Adder with Two Half Adders*
A full adder is a digital circuit that performs the addition of three one-bit binary numbers. It
takes three inputs: two bits to be added (A and B) and a carry-in bit (Cin), and produces two
outputs: a sum bit (S) and a carry-out bit (Cout).
*Here's how to implement a full adder using two half adders and an OR gate:*
3. *OR Gate:*
- Inputs: Carry1 (C1), Carry2 (C2)
- Output: Carry-out (Cout)
*Circuit Diagram:*
*Truth Table for a Full Adder:*
| A | B | Cin | Sum (S) | Carry-out (Cout) |
|---|---|---|---|---|
|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|
Truth Table:
| J | K | Q | Q' |
| --- | --- | --- | --- |
| 0 | 0 | Q | Q' |
|0|1|0|1|
|1|0|1|0|
| 1 | 1 | Q' | Q |
The resulting JK flip-flop circuit has the same functionality as a standard JK flip-flop.
Note:
- Q and Q' represent the output and complement of the output, respectively.
- J and K represent the inputs to the JK flip-flop.
- S and R represent the inputs to the SR flip-flop.
3. Since there is a carry (1) from the hundreds place, add 1 to the sum:
912 + 1 = 913
duality theorem:- The duality theorem states that the dual of a Boolean function can be
obtained by interchanging the logical AND operator with the logical OR operator and the
zeros with ones.
For example, the dual of the Boolean statement 1.0 = 1 is 0+1=0.
0: 0000
2: 0010
3: 0011
5: 0101
6: 0110
7: 0111
8: 1000
9: 1001
10: 1010
11: 1011
12: 1100
13: 1101
14: 1110
15: 1111
To realize this function using NOR gates, we can use the following steps:
1. Implement each term of the function using NOR gates.
2. Combine the terms using NOR gates.
F = (A' NOR B') NOR (C' NOR D') NOR (A' NOR B') NOR (C NOR D) NOR (A' NOR B) NOR (C NOR
D') NOR (A NOR B') NOR (C NOR D) NOR (A NOR B') NOR (C NOR D') NOR (A NOR B) NOR (C
NOR D) NOR (A NOR B) NOR (C NOR D')
Note that this implementation may not be the most efficient, and there may be other ways
to realize the function using NOR gates.
ii) Show how a full adder can be converted to a full subtractor with the addition of
an Inverter circuit.
Ans:= Here's the step-by-step process to convert a full adder to a full subtractor with the
addition of an inverter circuit:
A full adder is a digital circuit that adds three input bits (A, B, and Cin) and produces two
output bits (Sum and Cout).
- A (input)
- B' (inverted B input)
- Cin' (inverted Cin input)
The full subtractor circuit produces two output bits (Difference and Borrow).
By adding an inverter circuit to the B input and the Cin input of a full adder, we can convert it
to a full subtractor.
Note: The full subtractor circuit can also be implemented using a separate circuit, but
converting a full adder to a full subtractor with an inverter circuit is a more efficient and cost-
effective approach.
iii) An 8x1 mux has inputs A, B, &c comected to the selection ilp 52.51.50
respectively. The data ilp Do through Dy are as follows: D_{1} = D_{2} = D_{J} = 0
D_{3} = D_{5} = 1 ; D_{B} = overline D Delermine the boolean Expression that Do =
D_{4} = D the mux implements
Ans:= To determine the Boolean expression that the mux implements, we can use the
following steps: