This article covers Electrical Circuit Design with solved examples including state transition diagram, K-Map, Verilog code for full adder and more. It includes topics like traffic light states, prime number detection, state equations, schematic diagrams, and Verilog code for full adder.
Contribute Materials
Your contribution can guide someone’s learning journey. Share your
documents today.
Running head: ELECTRICAL CIRCUIT DESIGN ELECTRICAL CIRCUIT DESIGN Name of the Student Name of the University Author Note
Secure Best Marks with AI Grader
Need help grading? Try our AI Grader for instant feedback on your assignments.
1ELECTRICAL CIRCUIT DESIGN Response to question 1: s As the arrow moves right to left it gets shorter in length. Hence, the 25 traffic lights from A to Y will also behave accordingly. In the bottom figure 4 states are shown in total as the arrow becomes shorter and in the last state all the lights are off i.e. the arrow is not displayed. StateLights On State 111 (A,D,J,Q,W,K,L,M,N,O,P) State 29(B,F,L,S,X,M,N,O,P) State 37(C,H,N,U,Y,O,P) State 40 Hence, the transition between states occur according to number of lights on/off and based on which lights are on/off. The state output is 1 when the arrow is displayed, otherwise it is 0. In the first three states the state output is 1 and in the last state it is 0. The state inputs are considered as number of lights that are on in that state.
2ELECTRICAL CIRCUIT DESIGN State diagram: Response to question 2: A number is a prime number if it is exactly divisible by 1 and that number itself. Now, a combinational circuit has been designed to detect a 4-bit binary number is prime or not. The four-bit number is A = a4 a3 a2 a1. Here, the MSB of the number is a1 and LSB is a4. The truth table gives the prime number for which the output is 1. Decimal equivalentBinary (a4 a3 a2 a1)Output (True=1, False=0) 000000 100010 200101 300111 State 4 State 1 State 3 State 2 9/1 7/1 0/0 11/1
4ELECTRICAL CIRCUIT DESIGN From the Karnaugh Map the simplified Boolean expression is P=a4a3a2+a4a3a1+a3a2a1+a3a2a1 Logisim circuit:
5ELECTRICAL CIRCUIT DESIGN Testing: Hence, this testing shows that if the input binary number is prime then the output P is 1 otherwise it is 0. Also, by using Shannon’s method the combinations of NOT and AND gates can be replaced by two 2 to 1 Multiplexers(MUX) to have a simplified diagram.
6ELECTRICAL CIRCUIT DESIGN Response to question 3: State transition diagram: According to the diagram the state table is constructed in the following rule. The four circles represent 4 states of the machine. From one state to another state transitions occur based on the input given which is specified beside the arrows before the slash. After the slash the output of the system is specified. A loop indicates there is no state change i.e. the machine remains in the same state irrespective of the input. It is considered that the states of the system are Q1 and Q2. The input and output of the systemare x and Z respectively.Moreover, Dfilp-flop isconsidered for the circuit implementation. Hence, D1, D2 and Z are the outputs in the logic expression.
Secure Best Marks with AI Grader
Need help grading? Try our AI Grader for instant feedback on your assignments.
7ELECTRICAL CIRCUIT DESIGN State table: Present StateNext StateOutput Q1Q2 00 01 10 11 x=0x=1x=0x=1 000100 101100 000100 101111 Now, from the state table the state equations are found by K-maps. K-map for Z: 00011110 00010 10010 Hence, simplified SOP of Z = Q1Q2 Q1Q2 x
8ELECTRICAL CIRCUIT DESIGN K-map for D1: 00011110 00110 10110 Hence, simplified SOP of D1 = Q2 K-Map for D2: 00011110 00000 11111 Hence, simplified SOP of D2 = x. Therefore, the state equations are Z = Q1Q2 D1 = Q2 D2 = x Q1Q2 x Q1Q2 x
9ELECTRICAL CIRCUIT DESIGN Schematic diagram: Response to question 4:
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
10ELECTRICAL CIRCUIT DESIGN From the above circuit the logic expressions of X and Y are X= (A⊕ B)⊕ C = (AB’ + BA’) Y = AC + BC + AB 2 to 4 decoder circuit: Implementation of X:
11ELECTRICAL CIRCUIT DESIGN Implementation of Y: Response to question 5: The Verilog behavioural code for the four bit-full adder module having three inputs a, b, cin and two outputs sum and cout respectively is given below. Verilog code: module fulladder_4bit ( a ,b ,sum ,cout ); output [3:0] sum ; output cout ; input [3:0] a ; input [3:0] b ; wire [2:0]s; full_adder u0 (a[0],b[0],1'b0,sum[0],s[0]); full_adder u1 (a[1],b[1],s[0],sum[1],s[1]);
12ELECTRICAL CIRCUIT DESIGN full_adder u2 (a[2],b[2],s[1],sum[2],s[2]); full_adder u3 (a[3],b[3],s[2],sum[3],cout); endmodule module full_adder (a ,b ,cin ,sum ,cout ); output sum ; output cout ; input a ; input b ; input cin ; assign sum = a ^ b ^ cin; assign cout = (a&b) | (b&cin) | (cin&a); endmodule a)Verilog code of 8-bit full adder: module 8bitFA(a,b,cin,sum,cout); input [7:0]a,b; output [8:0]sum; output cout; input cin; Carry c1(a[0],b[0],cin,sum[0],cinx0); Carry c2(a[1],b[1],cinx0,sum[1],cinx1);
Secure Best Marks with AI Grader
Need help grading? Try our AI Grader for instant feedback on your assignments.