Sei sulla pagina 1di 28

Lecture 11

Combinational Logic
Encoder, Decoder, Multiplexer and
De-multiplexer
1
Combinational logic
• Whose outputs are determined from only present inputs
• It performs an operation that can be specified by a set of Boolean
functions
• It consists of input variables, logic gates and output variables
• Example:
Adder, multiplexer

2
Half Adder
• Combinational circuit that performs addition of two bits
- circuit needs two binary inputs and
two binary outputs
• Half adder truth table with sum and carry
• Boolean function from truth table
S = A′B +AB′ Inputs Outputs
= A⊕B A B S C
C= AB 0 0 0 0
• Implementation of half adder 0 1 1 0
1 0 1 0
1 1 0 1
3
Full Adder
• Combinational circuit that performs addition of three bits
- circuit needs three binary inputs and
two binary outputs
• Full adder truth table with sum and carry
• Boolean function from truth table
Inputs Outputs
S = A′B′ C + A′B C ′ + AB′C ′+ AB C
= A⊕B⊕C (check board configuration) A B C S C
C = AB + C (A⊕B) 0 0 0 0 0
• Implementation of full adder 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 4
1 1 0 0 1
1 1 1 1 1
4 Bit Parallel Adder using Full adder
• Combinational circuit that performs 4 bit parallel adder using full adder.

• TG # IC 283 => IC for 4 bit full adder

5
Half Subtractor
• Combinational circuit that performs subtraction of two bits
- circuit needs two binary inputs and
two binary outputs
• Half subtractor truth table with difference and borrow
• Boolean function from truth table
D = A′B +AB′
Inputs Outputs
= A⊕B
A B D B
B = A′B
0 0 0 0
• Implementation of half subtractor
0 1 1 1
1 0 1 0
1 1 0 0
6
Full Subtractor
• Combinational circuit that performs addition of three bits
- circuit needs three binary inputs and
two binary outputs
• Full subtractor truth table with difference and borrow
where Bin=Cin and B=Bo
• Boolean function from truth table Inputs Outputs
D = A′B′C+ A′BC′ + AB′C′ + ABC A B C D B
= A⊕B⊕C (check board configuration) 0 0 0 0 0
B = A′C + BC + A′B 0 0 1 1 1
• Implementation of full subtractor 0 1 0 1 1
0 1 1 0 1
1 0 0 1 0
1 0 1 0 0 7
1 1 0 0 0
1 1 1 1 1
Encoder
• A device that is used to convert a signal or data into code
- data compression
- data encryption for making data secure
• Has 2 input lines and m output lines

8
Encoder
• 8:3 encoder
- Has 2 input lines and 3 output lines

9
Encoder
• Draw:
- 2 input encoder
- 4 input encoder
- 16 input encoder

10
Encoder
• 8:3 encoder
- Has 2 input lines and 3 output lines
A B C D E F G H S S S
0 0 0 1 0 0 0 0 0 1 1

11
Decoder
• It functions the reverse of an encoder
• Device that decodes and encodes signal or data
• Only one of the line will have value 1, others will have 0

12
Decoder
• Draw:
- 2 input decoder
- 4 input decoder

13
Decoder
• 8:3 encoder
- Has 2 input lines and 3 output lines
A B C D E F G H S S S
0 0 0 0 0 0 1 0 1 1 0

14
Encoder to Decoder
• An Encoder is a combinational logic circuit
• It performs the inverse operation of decoder
• An encoder has M input lines, only one of which is activated at a
given time, and produces an N bit output code, depending on which
input is activated

15
Encoder to Decoder
• Example: 4:2 encoder to 2:4 decoder

16
Encoder to Decoder
• Example: 4:2 encoder to 2:4 decoder

17
2:4 Line Decoder
• Block diagram of 2 to 4 decoder
• A and B are the inputs (No. of inputs=2)
• Number of possible input combinations: 22=4
• Number of outputs: 22=4, they are indicated by D0,D1,D2,D3

18
2:4 Line Decoder
• Boolean Expression

• Logical Diagram

19
Decoder
• Example: Implement the following multiple output function
using suitable decoder.

Solution: f1 consists of don’t care conditions. So, we consider them to


be logic 1

20
Decoder
• Example: A combinational circuit is defined by the following
Boolean function. Design circuit with a decoder and external
gates.

Solution: Step 1: write the given F1 in SOP form

21
Decoder
• Boolean function using decoder:

22
Multiplexer
• A digital switch that has multiple input (sources) and single
output (destination)
• Select line determines which input is connected to output
• MUX types
- 2 to 1 (1 select line)
- 4 to 1 (2 select line)
- 8 to 1 (3 select line)
- 16 to 1 (4 select line)
• Advantages
- reduces number of wires
- reduces circuit complexity
23
Multiplexer

24
Multiplexer
• 2:1 MUX
• E: enable, S: selector
• Boolean Function
I
2:1 Y= ES′I + ESI
I Y
MUX = E (S′I + SI )

E S • Implementation circuit
---> draw it
E S Y

0 X 0

1 0 I
1 1 I 25
Demultiplexer
• A digital switch that has single input (sources) and multiple
outputs (destination)
• Select lines determine which output the input is connected
• DEMUX types
- 1 to 2 (1 select line)
- 1 to 4 (2 select line)
- 1 to 8 (3 select line)
- 1 to 16 (4 select line)

26
Demultiplexer

27
Demultiplexer
• 1:2 DEMUX
• I: input, S : selector, E: enabler

1:2 Y • Boolean Function


I
DEMUX
Y Y = ES ′I
Y = ES I
E S
• Implementation circuit
E S Y Y ---> draw it
0 0 0 0

0 1 0 0

1 0 I 0 28
1 1 0 I

Potrebbero piacerti anche