Combinational Circuits in Digital Logic PDF
Document Details

Uploaded by BeneficialComputerArt281
Shivaji University, Kolhapur
Tags
Summary
This document explores combinational circuits, fundamental components in digital electronics. It details half adders, full adders, subtractors, multiplexers, and demultiplexers along with important applications like registers and binary counters. The document also covers flip-flops, decoders, and encoders, explaining their function within digital systems.
Full Transcript
3.Combinational CirCuits Definition of Combinational Circuit Combinational circuits are specially designed using multiple interconnected logic gates such that the output will be generated by computing the logical combinations of the present input only. No clock pulse is present here. What is Half...
3.Combinational CirCuits Definition of Combinational Circuit Combinational circuits are specially designed using multiple interconnected logic gates such that the output will be generated by computing the logical combinations of the present input only. No clock pulse is present here. What is Half Adder? Half Adder is a combinational logic circuit that is designed by connecting one EX-OR gate and one AND gate. The half-adder circuit has two inputs: A and B, which add two input digits and generate a carry and a sum. Half Adder The output obtained from the EX-OR gate is the sum of the two numbers while that obtained by AND gate is the carry. There will be no forwarding of carry addition because there is no logic gate to process that. Thus, this is called the Half Adder circuit. Logical Expression of Half Adder The Logical Expression for half added is given as Sum = A ⊕ B Carry = A AND B Truth Table of Half Adder The Truth Table for Half Added is Given as What is Full Adder ? Full Adder is the circuit that consists of two EX-OR gates, two AND gates, and one OR gate. Full Adder is the adder that adds three inputs and produces two outputs which consist of two EX-OR gates, two AND gates, and one OR gate. The first two inputs are A and B and the third input is an input carry as C-IN. The output carry is designated as C-OUT and the normal output is designated as S which is SUM. Full Adder The equation obtained by the EX-OR gate is the sum of the binary digits. While the output obtained by AND gate is the carry obtained by addition. Logical Expression of Full Adder Given Below is the Logical Expression of Full Adder SUM = (A XOR B) XOR Cin = (A ⊕ B) ⊕ Cin CARRY-OUT = A AND B OR Cin(A XOR B) = A.B + Cin(A ⊕ B) Truth Table of Full Adder Given Below is the truth Table of Full Adder Subtractor: A half subtractor is a combinational logic circuit that performs the subtraction of two bits. It is a fundamental building block of a full subtractor and is used in various digital circuits. Truth Table The truth table of a half subtractor is as follows: A B Difference (D) Borrow (B) 0 0 0 0 0 1 1 1 1 0 1 0 1 1 0 1 Working The half subtractor circuit consists of two XOR gates and one AND gate. The XOR gates are used to calculate the difference between the two input bits, and the AND gate is used to calculate the borrow. The difference (D) is calculated as follows: D = A XOR B The borrow (B) is calculated as follows: B = A AND B Applications Half subtractors are used in various digital circuits, including: Full subtractors Adders Comparators Decoders Encoders Multiplexers Demultiplexers Advantages Half subtractors are simple to design and implement. They are also relatively inexpensive to manufacture. Disadvantages Half subtractors can only subtract two bits at a time. For subtracting larger numbers, multiple half subtractors must be cascaded. Full Subtractor A full subtractor is a combinational logic circuit that performs subtraction of two bits. It takes three inputs: the minuend (A), the subtrahend (B), and the borrow-in (Bin) from the previous stage. It produces two outputs: the difference (D) and the borrow-out (Bout). Truth Table The truth table for a full subtractor is as follows: A B Bin D Bout 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 Explanation The full subtractor circuit consists of two half subtractors connected in cascade. The first half subtractor subtracts the subtrahend (B) from the minuend (A), and the second half subtractor subtracts the borrow-in (Bin) from the difference (D) of the first half subtractor. The output of the first half subtractor is the difference (D) and the borrow-out (Bout1). The output of the second half subtractor is the final difference (D) and the final borrow-out (Bout). Applications Full subtractors are used in a variety of digital circuits, including: Arithmetic logic units (ALUs) Central processing units (CPUs) Graphics processing units (GPUs) Digital signal processors (DSPs) Full subtractors are an essential component of many digital circuits. They perform the basic operation of subtraction, and they are used in a wide variety of applications. Decoder The combinational circuit that change the binary information into 2N output lines is known as Decoders. The binary information is passed in the form of N input lines. The output lines define the 2N-bit code for the binary information. In simple words, the Decoder performs the reverse operation of the Encoder. At a time, only one input line is activated for simplicity. The produced 2N- bit output code is equivalent to the binary information. What is Encoder? An Encoder is a combinational circuit that performs the reverse operation of a Decoder. It has a maximum of 2^n input lines and ‘n’ output lines, hence it encodes the information from 2^n inputs into an n-bit code. It will produce a binary code equivalent to the input, which is active High. Therefore, the encoder encodes 2^n input lines with ‘n’ bits. Types of Encoders There are different types of Encoders which are mentioned below. 4 to 2 Encoder Octal to Binary Encoder (8 to 3 Encoder) Decimal to BCD Encoder Priority Encoder 4 to 2 Encoder The 4 to 2 Encoder consists of four inputs Y3, Y2, Y1 & Y0, and two outputs A1 & A0. At any time, only one of these 4 inputs can be ‘1’ in order to get the respective binary code at the output. The figure below shows the logic symbol of the 4 to 2 encoder. 4 to 2 Encoder The Truth table of 4 to 2 encoders is as follows. INPUTS OUTPUTS Y3 Y2 Y1 Y0 A1 A0 0 0 0 1 0 0 0 0 1 0 0 1 0 1 0 0 1 0 1 0 0 0 1 1 Logical expression for A1 and A0: A1 = Y3 + Y2 A0 = Y3 + Y1 The above two Boolean functions A1 and A0 can be implemented using two input OR gates : What Are Multiplexers? A multiplexer is a combinational circuit that has many data inputs and a single output, depending on control or select inputs. For N input lines, log2(N) selection lines are required, or equivalently, for 2n2n input lines, n selection lines are needed. Multiplexers are also known as “N-to-1 selectors,” parallel-to-serial converters, many-to-one circuits, and universal logic circuits. They are mainly used to increase the amount of data that can be sent over a network within a certain amount of time and bandwidth. The 2×1 is a fundamental circuit which is also known 2-to-1 multiplexer that are used to choose one signal from two inputs and transmits it to the output. The 2×1 mux has two input lines, one output line, and a single selection line. De-multiplexer A De-multiplexer is a combinational circuit that has only 1 input line and 2N output lines. Simply, the multiplexer is a single-input and multi-output combinational circuit. The information is received from the single input lines and directed to the output line. On the basis of the values of the selection lines, the input will be connected to one of these outputs. De-multiplexer is opposite to the multiplexer. Block Diagram: Truth Table: The logical expression of the term Y is as follows: Y0=S0'.A Y1=S0.A Logical circuit of the above expressions is given below: Sequential Circuit Sequential circuits are digital circuits that store and use previous state information to determine their next state. They are commonly used in digital systems to implement state machines, timers, counters, and memory elements and are essential components in digital systems design. Sequential circuits are commonly used in digital systems to implement state machines, timers, counters, and memory elements. The memory elements in sequential circuits can be implemented using flip-flops, which are circuits that store binary values and maintain their state even when the inputs change. 2….. What is Flip Flop? Flip-Flop is a term that comes under digital electronics, and it is an electronic component that is used to store one single bit of information. Construction of SR Flip Flop We can construct SR flip flop with two ways, one is with 2 NOR Gates + 2 AND Gates and other is with 4 NAND Gates. SR Flip Flop Construction using 4 NAND Gates SR Flip Flop Construction using 2 NOR + 2 AND Gates: Applications of SR Flip Flop There are numerous applications of SR Flip Flop in Digital System, which are listed below: Register : SR Flip Flop used to create register. Designer can create any size of register by combining SR Flip Flops. Counters : SR Flip Flops used in counters. Counters counts the number of events that occurs in a digital system. Memory : SR Flip Flops used to create memory which are used to store data, when the power is turned off. Synchronous System : SR Flip Flop are used in synchronous system which are used to synchronize the operation of different component. D Flip Flop D flip flop is an electronic devices that is known as “delay flip flop” or “data flip flop” which is used to store single bit of data.D flip flops are synchronous or asynchronous. The clock single required for the synchronous version of D flip flops but not for the asynchronous one.The D flip flop has two inputs, data and clock input which controls the flip flop. when clock input is high, the data is transferred to the output of the flip flop and when the clock input is low, the output of the flip flop is held in its previous state. What is JK Flip-Flop? It is one kind of sequential logic circuit which stores binary information in bitwise manner. It consists of two inputs and two outputs. Inputs are Set(J) & Reset(K) and their corresponding outputs are Q and Q’. JK flipflop has two modes of operation which are synchronous mode and asynchronous mode. In synchronous mode, the state will be changed with the clock(clk) signal, and in asynchronous mode, the change of state is independent from its clock signal. Let’s see its diagram structure. What is T Flip Flop? T flip flop or to be precise is known as Toggle Flip Flop because it can able to toggle its output depending upon on the input. T here stands for Toggle. Toggle basically indicates that the bit will be flipped i.e., either from 1 to 0 or from 0 to 1. Here, a clock pulse is supplied to operate this flop, hence it is a clocked flip-flop. Construction of T Flip Flop We can construct T flip in three ways namely: By using SR Flip Flops. By using D Flip Flops. By using JK Flip Flops Ways to Construct T Flip Flop Let’s see the construction of T Flip Flop using SR Flip Flops, which require 2 AND gates and 2 NOR gates as shown below: Resister: Flip flops can be used to store a single bit of binary data (1 or 0). However, in order to store multiple bits of data, we need multiple flip-flops. N flip flops are to be connected in order to store n bits of data 4 bit register with parallel load: Shift resister: A Register is a device that is used to store such information. It is a group of flip-flops connected in series used to store multiple bits of data. The information stored within these registers can be transferred with the help of shift registers Types: Serial In Serial Out shift register Serial In parallel Out shift register Parallel In Serial Out shift register Parallel In parallel Out shift register Bidirectional Shift Register Universal Shift Register Shift Register Counter Bidirectional Shift Register with parallel load: If we shift a binary number to the left by one position, it is equivalent to multiplying the number by 2 and if we shift a binary number to the right by one position, it is equivalent to dividing the number by 2. To perform these operations we need a register which can shift the data in either direction. Binary counter : n digital electronics, a binary counter is a type of sequential logic circuit which is able to count in binary numbers. A binary counter can counter from 0 to 2(n-1), where n is the total number of bits in the counter. Asynchronous Counter − The type of binary counter in which the flip flops do not receive the same clock pulse at the same time is called an asynchronous counter. The asynchronous counter is also known as ripple counter. It is the simplest type of binary counter. In the case of asynchronous binary counter, each flip flop is triggered by the output of the previous flip flop. Therefore, the asynchronous counters suffer from propagation delay. Synchronous Counter − The type of binary counter in which all the flip flops receive the same clock pulse at the same time is known as a synchronous counter. Since, all the flip flops of the synchronous counter are triggered by the same clock pulse, therefore, their outputs change simultaneously. This will result in the no propagation delay between the flip flops. 4-bit Binary Synchronous Counter The 4-bit binary synchronous counter comprises four JK flip-flops and represents an M=2 4-bit binary synchronous counter. The counting pulse N is simultaneously applied to the clock pulse input CP terminal of each flip-flop. When the counting pulse arrives, all the flip-flops are triggered simultaneously. The state of each subsequent flip-flop is determined by the current state of its preceding flip-flop.