IDOL Institute of Distance and Online Learning ENHANCE YOUR QUALIFICATION, ADVANCE YOUR CAREER.
B.C.A 2 All right are reserved with CU-IDOL Digital Circuits and Logic Designs Course Code: BCA111 Semester: First SLM Units: e-Lesson No: 9 6 www.cuidol.in Unit-9 (BCA111)
Combinational Logic Circuits 33 OBJECTIVES INTINRTORDOUDCUTCIOTNION After studying this unit, you will be able to: In this session we are going to learn about : • Define combinational circuits and sequential • Combinational circuits and sequential circuits • Block diagram of multiplexer, demultiplexer, adder and circuits • Draw the block diagram of multiplexer, subtractor • Functioning of multiplexer, demultiplexer, adder and demultiplexer, adder and subtractor • Explain functioning of multiplexer, demultiplexer, subtractor adder and subtractor www.cuidol.in Unit-9 (BCA111) IANlSlTIrTigUhTtEaOreF rDeIsSeTArvNeCdEwAiNthDCOUN-LIDINOELLEARNING
TOPICS TO BE COVERED 4 1. Difference between Combinational and Sequential Circuit 2. Multiplexer 3. Demultiplexer 4. Flip-flop 5. Adder 6. Subtractor www.cuidol.in Unit-9 (BCA111) All right are reserved with CU-IDOL
Difference between Combinational and Sequential Circuit 5 Combinational Circuits properties • Output depends only upon present input. • Speed is fast. • It is designed easily. • There is no feedback between input and output. • This is time-independent. • Elementary building blocks: Logic gates. •Used for arithmetic as well as Boolean operations. • Combinational circuits do not have capability to store any state. • As combinational circuits do not have clock, they do not require triggering. • These circuits do not have any memory element. • It is easy to use and handle. • Examples – Encoder, Decoder, Multiplexer and Demultiplexer. www.cuidol.in Unit-9 (BCA111) All right are reserved with CU-IDOL
Difference between Combinational... 6 Sequential Circuit properties •In this, output depends upon present as well as past input. • Speed is slow. • It is designed tough as compared to combinational circuits. • There exists a feedback path between input and output. • This is time-dependent. • Elementary building blocks: Flip-flops. • Mainly used for storing data. • Sequential circuits have capability to store any state or to retain earlier state. • As sequential circuits are clock dependent, they need triggering. • These circuits have memory element. www.cuidol.in Unit-9 (BCA111) All right are reserved with CU-IDOL
Multiplexer 7 •A Multiplexer is a device that selects between several (analog or digital) input signals and forwards it to a single output line. •If a multiplexer has n data inputs, m select input and only one output, then relation between number of data inputs (n) and number of select lines (m) is given by •Depending on the digital code apply at the select lines, one of the n data is selected and transmitted to the single output. •Hence, Multiplexer is also called as Data Selector. The function of the multiplexer can be easily understood from the above block diagram. www.cuidol.in Unit-9 (BCA111) All right are reserved with CU-IDOL
Different Multiplexers 8 16:1 Multiplexer •Implement 16 × 1 Multiplexer using 8 × 1 Multiplexer and 2 × 1 Multiplexer. We know that 8 × 1 Multiplexer has 8 data inputs, 3 selection lines and one output whereas 16 × 1 Multiplexer has 16 data inputs, 4 selection lines and one output. •So, we require two 8 × 1 Multiplexers in the first stage in order to get the 16 data inputs. •Since each 8 × 1 Multiplexer produces one output, we require a 2 × 1 Multiplexer in second stage by considering the outputs of first stage as inputs and to produce the final output. • A, B, C and D are control inputs. D0 to D15 are data inputs. www.cuidol.in Unit-9 (BCA111) All right are reserved with CU-IDOL
De-Multiplexers 9 Demultiplexer is a circuit which performs the reverse operation of Multiplexer. It accepts a single input and distributes it over several outputs. In Demultiplexer, there is only one input line. If m select lines are present and n output lines are present, then relation is established Different Demultiplexers 1. 1:8 Demultiplexer 2. 1:4 Demultiplexer 3. 1:2 Demultiplexer www.cuidol.in Unit-9 (BCA111) All right are reserved with CU-IDOL
Different Multiplexers truth table 10 www.cuidol.in Unit-9 (BCA111) All right are reserved with CU-IDOL
Types of Flip-flops Flip-flop is formed using logic gates, which are in turn made of transistors. They are basic 11 building blocks in the memory of electronic devices. Based on their operations, flip-flops are basically of four types. They are: 1. R-S flip-flop 2. D flip-flop 3. J-K flip-flop 4. T flip-flop S-R Flip-flop The S-R flip-flop is basic flip-flop among all the flipflops. All the other flip-flops are developed after SR-flipflop. S-R stands for SET and RESET. This can also be called RS flip-flop. Difference is RS is inverted SR flip-flop. Any flip-flop can be build using logic gates. NAND and NOR gates were used as they are universal gates. www.cuidol.in Unit-9 (BCA111) All right are reserved with CU-IDOL
S-R Flip-flop 12 The S-R flip-flop is basic flip-flop among all the flipflops. All the other flip-flops are developed after SR-flipflop. S-R stands for SET and RESET. This can also be called RS flip-flop. Difference is RS is inverted SR flip-flop. Any flip-flop can be build using logic gates. NAND and NOR gates were used as they are universal gates. www.cuidol.in Unit-9 (BCA111) All right are reserved with CU-IDOL
SR Flip-flops 13 Working: From the above truth table, it is clear that SR flip-flop will be set or reset for four conditions. 1. For last condition, it will be in invalid state. 2. SR flip-flop will be set when S = 1 and R = 0. If S = 1 and R = 1, then the previous state is remembered by the flip-flop. 3. Flip-flop will be reset when S = 0 and R = 1. If S = 1 and R = 1, then it will remember the previous state. 4. But when both the inputs are zeros, SR flip-flop will be in an uncertain state where both Q and Q’ will be same. This is not same allowed.. www.cuidol.in Unit-9 (BCA111) All right are reserved with CU-IDOL
D Flip-flops 14 In the SR flip-flop, an uncertain state occurred. This can be avoided by using D flip-flop. Here, D stands for “Data”. It is constructed from SR flip-flop. The two inputs (S and R) of the clocked SR flip-flop are connected to an inverter. It is one of the most widely used flip-flops. It has a clock signal (Clk) as one input and data (D) as other. There are two outputs and these outputs are complement to each other www.cuidol.in Unit-9 (BCA111) All right are reserved with CU-IDOL
J-K Flip-flops 15 Working: When J is low and K is low, Q returns its previous state value, i.e., it holds the current state. When J is low and K is high, the flip-flop will be in reset state, i.e., Q = 0, Q’ = 1. When J is high and K is low, the flip-flop will be in set state, i.e., Q = 1, Q’ = 0. When J is high and K is high, the flip-flop will be in Toggle state or flip state. This means that the output will complement to the previous state value. www.cuidol.in Unit-9 (BCA111) All right are reserved with CU-IDOL
T Flip-flops 16 Working: When the T input is low, the next sate of the T flip-flop is same as the present state, i.e., it holds the current state. T = 0 and present state = 0 then the next state = 0. T = 0 and present state = 1 then the next state = 1. When the T input is high, then the next sate of the T flip-flop is toggled, i.e., it is same as the complement of present state on clock transition. T = 1 and present state = 0 then the next state = 1. T = 1 and present state = 1 then the next state = 0. www.cuidol.in Unit-9 (BCA111) All right are reserved with CU-IDOL
Adder 17 An adder, also called summer, is a digital circuit that performs addition of numbers. Adder circuit is a combinational digital circuit that is used for adding two numbers. It produces a sum bit (denoted by S) and a carry bit (denoted by C) as the output. Adders are used for adding binary numbers but they can also be used for adding other formats like BCD (Binary Coded Decimal, XS-3, etc.). www.cuidol.in Unit-9 (BCA111) All right are reserved with CU-IDOL
Adder 18 Binary calculation: 0 + 0 = 0 0+1=1 1+0=1 1 + 1 = 10 Boolean Equation: www.cuidol.in Unit-9 (BCA111) All right are reserved with CU-IDOL
Full adder 19 The main difference between a half adder and a full adder is that the full adder has three inputs and two outputs. The first two inputs are A and B and the third input is an input carry designated as Cin. www.cuidol.in Unit-9 (BCA111) All right are reserved with CU-IDOL
Full Adder 20 www.cuidol.in Unit-9 (BCA111) All right are reserved with CU-IDOL
Full Adder using Half adder 21 www.cuidol.in Unit-9 (BCA111) All right are reserved with CU-IDOL
Half Subtractor 22 A half subtractor is a logical circuit that performs a subtraction operation on two binary digits. The half subtractor produces a difference (D) and a borrow bit (B) for the next stage. If X and Y are the input bits, then difference bit (D) is the X-OR of X and Y and the borrow bit (B) will be the AND of compliment of X and Y. Thus, a half subtractor circuit can be easily constructed using one X-OR gate, one NOT gate and one AND gate. www.cuidol.in Unit-9 (BCA111) All right are reserved with CU-IDOL
Full Subtractor 23 This type of subtractor is a little more difficult to implement than a half subtractor. The main difference between a half subtractor and a full subtractor is that the full subtractor has three inputs and two outputs. The first two inputs are X and Y and the third input is a borrow designated as Bin. Thus, the combinational circuit of a “full subtractor ” performs the operation of subtraction on three binary bits producing outputs for the difference D and borrow Bout. www.cuidol.in Unit-9 (BCA111) All right are reserved with CU-IDOL
Full Subtractor 24 www.cuidol.in Unit-9 (BCA111) All right are reserved with CU-IDOL
Multiple Choice Questions 25 1. Which of the following combinations of logic gates can decode binary 1101? (a) One 4-input AND gate (b) One 4-input AND gate, one inverter (c) One 4-input AND gate, one OR gate (d) One 4-input NAND gate, one inverter 2. What is the indication of a short to ground in the output of a driving gate? (a) Only the output of the defective gate is affected (b) There is a signal loss to all load gates (c) The node may be stuck in either the HIGH or the LOW state (d) The affected node will be stuck in the HIGH state 3. For the device shown here, assume the D input is LOW, both S inputs are LOW and the input is LOW. What is the status of the Y’ outputs? (a) All are HIGH (b) All are LOW (c) All but Y0 are LOW (d) All but Y0 are HIGH Answers:1.(b) 2.(b) 3.(d) www.cuidol.in Unit-9 (BCA111) All right are reserved with CU-IDOL
SUMMARY 26 Let us recapitulate the important concepts discussed in this session: •In combinational circuits, Output depends only upon present input. Speed is fast. Whereas in sequential circuit, output depends upon present as well as past input. Speed is slow. •A Multiplexer is a device that selects between several (analog or digital) input signals and forwards it to a single output line. •Demultiplexer is a circuit which performs the reverse operation of Multiplexer. It accepts a single input and distributes it over several outputs. •Flip-flop is formed using logic gates, which are in turn made of transistors. They are basic building blocks in the memory of electronic devices. •An adder, also called summer, is a digital circuit that performs addition of numbers. •The main difference between a half adder and a full adder is that the full adder has three inputs and two outputs. •A half subtractor is a logical circuit that performs a subtraction operation on two binary digits. •This type of subtractor is a little more difficult to implement than a half subtractor. The main difference between a half subtractor and a full subtractor is that the full subtractor has three inputs and two outputs. www.cuidol.in Unit-9 (BCA111) All right are reserved with CU-IDOL
FREQUENTLY ASKED QUESTION 27 Q1. Differentiate between Combinational and Sequential circuits. Ans: In combinational circuits, Output depends only upon present input. Speed is fast. Whereas in sequential circuit, output depends upon present as well as past input. Speed is slow. For further details refer SLM unit 9. Q2. Define multiplexer. Implement 4 × 1 Multiplexer using 2 × 1 Multiplexer. Ans: A Multiplexer is a device that selects between several (analog or digital) input signals and forwards it to a single output line. For further details refer SLM unit 9. Q3. What is flip-flop? Explain different types of flip-flops. Ans: Flip-flop is formed using logic gates, which are in turn made of transistors. They are basic building blocks in the memory of electronic devices. For further details refer SLM unit 9. www.cuidol.in Unit-9 (BCA111) All right are reserved with CU-IDOL
References 28 1. Self Learning Material, Chandigarh University, Institute of Distance and Online Learning 2. www.electronicshub.org www.cuidol.in Unit-9 (BCA111) All right are reserved with CU-IDOL
29 THANK YOU www.cuidol.in Unit-9 (BCA111) All right are reserved with CU-IDOL
Search
Read the Text Version
- 1 - 29
Pages: