CO_Unit-2
CO_Unit-2
UNIT-2
Combinational Circuits
Combinational circuit is a circuit in which we combine the different gates in the circuit, for
example encoder, decoder, multiplexer and demultiplexer. Some of the characteristics of
combinational circuits are following −
• The output of combinational circuit at any instant of time, depends only on the
levels present at input terminals.
• The combinational circuit do not use any memory. The previous state of input
does not have any effect on the present state of the circuit.
• A combinational circuit can have an n number of inputs and m number of
outputs.
Block diagram
Half Adder
Half adder is a combinational logic circuit with two inputs and two outputs. The half adder
circuit is designed to add two single bit binary number A and B. It is the basic building block
for addition of two single bit numbers. This circuit has two outputs carry and sum.
Block diagram
Truth Table
Circuit Diagram
2
Full Adder
Full adder is developed to overcome the drawback of Half Adder circuit. It can add two one-
bit numbers A and B, and carry c. The full adder is a three input and two output combinational
circuit.
Block diagram
Truth Table
Circuit Diagram
3
The number to be subtracted (B) is first passed through inverters to obtain its 1's complement.
The 4-bit adder then adds A and 2's complement of B to produce the subtraction.
S3 S2 S1 S0 represents the result of binary subtraction (A-B) and carry output Cout represents the
polarity of the result. If A > B then Cout = 0 and the result of binary form (A-B) then Cout = 1
and the result is in the 2's complement form.
Block diagram
Half Subtractors
Half subtractor is a combination circuit with two inputs and two outputs (difference and
borrow). It produces the difference between the two binary bits at the input and also produces
an output (Borrow) to indicate if a 1 has been borrowed. In the subtraction (A-B), A is called
as Minuend bit and B is called as Subtrahend bit.
Truth Table
Circuit Diagram
5
Full Subtractors
The disadvantage of a half subtractor is overcome by full subtractor. The full subtractor is a
combinational circuit with three inputs A,B,C and two output D and C'. A is the 'minuend', B
is 'subtrahend', C is the 'borrow' produced by the previous stage, D is the difference output and
C' is the borrow output.
Truth Table
Circuit Diagram
6
Multiplexers
Multiplexer is a special type of combinational circuit. There are n-data inputs, one output and
m select inputs with 2m = n. It is a digital circuit which selects one of the n data inputs and
routes it to the output. The selection of one of the n inputs is done by the selected inputs.
Depending on the digital code applied at the selected inputs, one out of n data sources is
selected and transmitted to the single output Y. E is called the strobe or enable input which is
useful for the cascading. It is generally an active low terminal that means it will perform the
required operation when it is low.
Block diagram
• 2 : 1 multiplexer
• 4 : 1 multiplexer
• 16 : 1 multiplexer
• 32 : 1 multiplexer
Block Diagram
7
Truth Table
Demultiplexers
A demultiplexer performs the reverse operation of a multiplexer i.e. it receives one input and
distributes it over several outputs. It has only one input, n outputs, m select input. At a time
only one output line is selected by the select lines and the input is transmitted to the selected
output line. A de-multiplexer is equivalent to a single pole multiple way switch as shown in
fig.
Demultiplexers comes in multiple variations.
• 1 : 2 demultiplexer
• 1 : 4 demultiplexer
• 1 : 16 demultiplexer
• 1 : 32 demultiplexer
Block diagram
Truth Table
8
Decoder
A decoder is a combinational circuit. It has n input and to a maximum m = 2n outputs. Decoder
is identical to a demultiplexer without any data input. It performs operations which are exactly
opposite to those of an encoder.
Block diagram
• Code converters
• BCD to seven segment decoders
• Nixie tube decoders
• Relay actuator
2 to 4 Line Decoder
The block diagram of 2 to 4 line decoder is shown in the fig. A and B are the two inputs where
D through D are the four outputs. Truth table explains the operations of a decoder. It shows
that each output is 1 for only a specific combination of inputs.
Block diagram
Truth Table
9
Logic Circuit
Encoder
Encoder is a combinational circuit which is designed to perform the inverse operation of the
decoder. An encoder has n number of input lines and m number of output lines. An encoder
produces an m bit binary code corresponding to the digital input number. The encoder accepts
an n input digital word and converts it into an m bit another digital word.
Block diagram
• Priority encoders
• Decimal to BCD encoder
• Octal to binary encoder
• Hexadecimal to binary encoder
Priority Encoder
This is a special type of encoder. Priority is given to the input lines. If two or more input line
are 1 at the same time, then the input line with highest priority will be considered. There are
four input D0, D1, D2, D3 and two output Y0, Y1. Out of the four input D3 has the highest priority
and D0 has the lowest priority. That means if D3 = 1 then Y1 Y1 = 11 irrespective of the other
inputs. Similarly if D3 = 0 and D2 = 1 then Y1 Y0 = 10 irrespective of the other inputs.
10
Block diagram
Truth Table
Logic Circuit
11
• At any instant of time, the output is based only on the levels of current input terminals
and not on the past state inputs.
• These circuits do not need any kind of memory states or clock, so the past inputs
show no influence on the current state of the circuit.
• A combinational circuit can intake ‘n’ number of inputs and delivers only one output.
Either the complicated or simple combinational logic, these can be represented through
‘NAND’, ‘NOT’ or ‘NOR gates’.
• Logic gates – These are the basic building blocks in the development of
combinational logic circuits. NAND, NR, NOT, NOR, OR, AND are all logic gates.
• Boolean algebra – This representation stipulates the association that is between
Boolean variables and is used to design digital circuitry through logic gates. Every
digital system is basically designed with logic gates and so Boolean algebra is the one
foremost approach to represent a combinational logic circuit.
• Truth table – This method computes the operational values of logical expressions for
every combination of values taken by their logical variables. For every single-bit
12
output in the logic block, a truth table is necessary to represent the logic. In general,
all the output columns are represented in a single table.
For example, an expression that can be represented in the above three approaches as follows:
The foremost implementation of the combinational logic circuit is Multiplexer and de-
multiplexer. In these, many numbers of inputs or outputs are on a single line and the logic gates
are employed to decode corresponding output for the specified input.
Half Adder
It is the combinational logic derived by using two inputs and two outputs. The circuit design
allowed us to add two one-bit binary numbers. So, the main purpose of using half adder is for
addition. With the inputs as A and B, the circuit can be designed as follows
Truth Table
Inputs Outputs
A B S C
L L L L
L H H L
H L H L
H H L H
Circuit Diagram
To gain the outputs Sum and Carry, the circuit is connected in the below format
14
Full Adder
To surmount the disadvantage that is in half adder circuit, the full adder is designed. It holds
the ability to add two binary numbers along with carrying input. So, it is the circuit with three
inputs and two outputs.
Truth Table
Inputs Outputs
A B Cin S C
L L L L L
L L H H L
L H L H L
L H H L H
H L L H L
H L H L H
H H L L H
H H H H H
15
Circuit Diagram
To gain the outputs Sum and Carry, the circuit is connected in the below format
Note: As full adder holds the ability to add two one-bit binary numbers, in many cases we need
to add n-bit numbers along with the carry. In those cases, an n-bit parallel adder holds the
ability to add n-bit binary numbers. It is the combination of many full adders. So, the carry
output of the previous adder is connected as an input to the next adder.
Half Subtractor
Accepting two binary numbers ‘A’ and ‘B’ as inputs, half subtractor derives the outputs borrow
and difference. ‘Difference’ is the difference between two input numbers and while ‘Borrow’
is the one that carries borrow if any. In both the inputs, A is termed as Minuend and B is termed
as Subtrahend.
Truth Table
Inputs Outputs
A B Difference Borrow
L L L L
L H H H
H L H L
H H L L
16
Circuit Diagram
To gain the outputs Difference and Borrow, the circuit is connected in the below format
Full Subtractor
To take away the disadvantage of half-subtractor, a full subtractor is designed. The circuit is
designed with three inputs that deliver two outputs one is Difference and Borrow. Where
‘Difference’ is the difference of two inputs and ‘Borrow’ is the carried borrow.
Truth Table
Inputs Outputs
A B Cin A-B-C Borrow
L L L L L
L L H H H
L H L H H
L H H L H
H L L H L
H L H L L
H H L L L
H H H H H
17
Circuit Diagram
To gain the outputs Difference and Borrow, the circuit is connected in the below format
Note: Subtraction operation can be performed either by 1’s or 2’s complement of the number
that has to be subtracted. For instance, we can carry out A-B either by the addition of 1’s or 2’s
complement of B to the A input. So, here we make use of binary adder to carry out the
subtraction process.
• The subtracted number has to be passed through an inverter to get its complement.
• Then the 4-bit adder adds A and the complement of B and delivers subtraction results.
• When A>B and C is 0 and the result of A-B in binary format, then C =1 and the output is in
2’s complement form.
The below circuit diagram clearly explains the flow of the n-bit parallel subtractor.
Multiplexer
A multiplexer is the foremost application of a combinational logic circuit. The circuit has ‘n’
inputs, ‘m’ selection inputs with 2m = n and one output. This is the digital circuitry that chooses
one data input and directs it to output. The selection of the inputs is carried out by selection
inputs. Based on the applied digital code, one of the inputs is selected and addressed to the
output. Cascading operation is performed by ‘E’ input which is the active low terminal input.
The block diagram of the multiplexer is as follows
18
multiplexer
Multiplexers are used in many of the applications as because they are in available as
• 2:1 Mux
• 4:1 Mux
• 16:1 Mux
• 32:1 Mux
Block Diagram – This is the basic block diagram of how a 2:1 mux operates
Truth Table
Demultiplexer
A de-mux performs the operations reverse to that of a multiplexer. It has only one input and
delivers multiple outputs. The circuit is designed with one input, ‘m’ select inputs and ‘n’
outputs. At a single instance, only one output is chosen through selection inputs and it is
directed to the output. Demultiplexers are used in many of the applications as because they are
in available as
• 1: 2 demux
• 1:4 demux
• 1:16 demux
• 1:32 demux
Block Diagram – This is the basic block diagram of how a 1:2 demux operates
Truth Table
Decoders, encoders, priority encoders are all examples of the combinational logic circuits.
20
Combinational logic circuits are the basic building blocks of digital systems. They have an
extensive variety of applications. They are used in
• Comparators
• Programmable logic devices
• Adders & Subtractors