Combinational Circuits - Weebly

21
Combinational Circuits By : Ali Mustafa

Transcript of Combinational Circuits - Weebly

Page 1: Combinational Circuits - Weebly

Combinational Circuits

By : Ali Mustafa

Page 2: Combinational Circuits - Weebly

Multiplexer

• Also called Data selector

• A digital circuit which selects one of the n data inputs and route it to the single output.

• Select lines (n) and Input lines are (2n)

Page 3: Combinational Circuits - Weebly

Multiplexer

• E is enable input

– Useful for cascading

– Its a active low terminal

– It will perform the required operation when it is low

• Multiplexer acts like a multiple way switch

• The output get connected to only one of the n data inputs at given instant of time

Page 4: Combinational Circuits - Weebly

Necessity of Multiplexer

• In most of the digital circuits, data is available on more than 1 line

• It is essential to route this data over a single line

• It reduces the number of wires,complexity,cost

Page 5: Combinational Circuits - Weebly

Classification of Multiplexer

2:1 multiplexer

4:1 multiplexer

8:1 multiplexer

16:1 multiplexer

Page 6: Combinational Circuits - Weebly

2 : 1 Multiplexer

• Data inputs are 2 (D0,D1)

• Select input is 1 (S) Enable S Output

0 X

1 0 D0

1 1 D1

ES’D0

ESD1

AND

AND

OR

S S’ D1 D0

AND

E

OUTPUT

S’D0

SD1

Page 7: Combinational Circuits - Weebly

4 : 1 Multiplexer

• Data inputs are 4 (I0 - I3)

• Select input are 2 (S1 , S2)

Page 8: Combinational Circuits - Weebly

8 : 1 Multiplexer

• Data inputs are 8 (D0 – D7)

• Select input are 3 (S1 , S2 ,S3)

• Make Truth Table

– S1’S2’S3’D0 - S1S2S3D7

8:1 MUX Output

D0

D7

E

S1 S2 S3

Page 9: Combinational Circuits - Weebly

16 : 1 Multiplexer

Home Task

Page 10: Combinational Circuits - Weebly

Cascading of Multiplexers

• Obtain 8:1 MUX using 4:1 MUXES

4:1 MUX

Output

D0

D3

S1 S2

4:1 MUX

E

D4

D7

Page 11: Combinational Circuits - Weebly

Cascading of Multiplexers

• Obtain 16:1 MUX using 8:1 MUXES

• Obtain 4:1 MUX using 2:1 MUXES

Page 12: Combinational Circuits - Weebly

Home Task

• Obtain 16:1 MUX using 4:1 MUXES

Page 13: Combinational Circuits - Weebly

multiplexer demultiplexer 4x4 switch

control control

Making Connections

• Direct point-to-point connections between gates– Wires we've seen so far

• Route one of many inputs to a single output --- multiplexer

• Route a single input to one of many outputs --- demultiplexer

Page 14: Combinational Circuits - Weebly

NAND Gate Implementation of Muxes

• 2:1 mux

• 4:1 mux

Page 15: Combinational Circuits - Weebly

CA B

0

1

2

3

4

5

6

7

1

0

1

0

0

0

1

1S2

8:1 MUX

S1 S0

F

Multiplexers as General-purpose Logic

• 2n:1 multiplexer implements any function of n variables– With the variables used as control inputs and

– Data inputs tied to 0 or 1

– In essence, a lookup table

• Example:– F(A,B,C) = m0 + m2 + m6 + m7

= A'B'C' + A'BC' + ABC' + ABC= A'B'(C') + A'B(C') + AB'(0) + AB(1)

Page 16: Combinational Circuits - Weebly

A B C F

0 0 0 1

0 0 1 0

0 1 0 1

0 1 1 0

1 0 0 0

1 0 1 0

1 1 0 1

1 1 1 1

C'

C'

0

1 A B

S1 S0

F0

1

2

3

4:1 MUX

C'

C'

0

1

F

CA B

0

1

2

3

4

5

6

7

1

0

1

0

0

0

1

1S2

8:1 MUX

S1 S0

Multiplexers as General-purpose Logic

• 2n-1:1 mux can implement any function of n variables

– With n-1 variables used as control inputs and

– Data inputs tied to the last variable or its complement

• Example:

– F(A,B,C) = m0 + m2 + m6 + m7= A'B'C' + A'BC' + ABC' + ABC= A'B'(C') + A'B(C') + AB'(0) + AB(1)

Page 17: Combinational Circuits - Weebly

Example• Implement the following expression using 8:1

MUX

F (a,b,c) = m (0,2,4,6)

8:1MUX

0

2

4

6

Logic 1

Logic 0a b c

Output

Page 18: Combinational Circuits - Weebly

Self Task

• Implement the following expression using 8:1 MUX

–F (a,b,c) = m (1,3,4,6)

–F (a,b,c) = m (1,3,4,6) + d (2)

Page 19: Combinational Circuits - Weebly

Decrementation in MUX

D0 D1 D2 D3 D4 D5 D6 D7

a’ 0 1 2 3 4 5 6 7

a 8 9 10 11 12 13 14 15

D0 D1 D2 D3

a’ 0 1 2 3

a 4 5 6 7

a’ a 1 0

a’ 1 0 a a’ 0 1 a

8 Inputs reduces to 4.

8:1 – 4:1

16 Inputs reduces to 8.

16:1 – 8:1

Page 20: Combinational Circuits - Weebly

Example• Implement the logic function using 4:1 MUX

F (a,b,c) = ∑m (1,3,4,6)

8:1MUX

0

2

4

6

Logic 0abc

Output

Logic 1D0 D1 D2 D3

a’ 0 1 2 3

a 4 5 6 7

a a’ a a’

4:1MUX

bc

Output

a a’

Page 21: Combinational Circuits - Weebly

Solve This

• F(a,b,c) = m0 + m2 + m6 + m7 using 4:1 MUX

• F (a,b,c,d) = ∑m (2,4,5,7,10,14) using 8:1 MUX

• F (a,b,c,d,e) = ∑m (2,4,5,7,10,14,15,17,25,26,30,31)

using 16:1 MUX