lec4

33
• Any logic circuits can be transformed to an implementation where only NAND gates (and inverters) are used. • The general approach to finding a NAND-gate realization: Use DeMorgan’s theorem to eliminate all the OR operations. NAND-ONLY LOGIC CIRCUITS

Transcript of lec4

Page 1: lec4

• Any logic circuits can be transformed to an implementation where only NAND gates (and inverters) are used.

• The general approach to finding a NAND-gate realization: Use DeMorgan’s theorem to eliminate all the OR operations.

NAND-ONLY LOGIC CIRCUITS

Page 2: lec4

(Example)F = A + B • (C + D’)= A + B • (C’D)’ Note that (C’D)’ = C + D’ and (A’X’)’ = A +

XF = (A’ • (B • (C’D)’)’)’ Now there is no OR operation in the Boolean

expression. Note thatA NAND B = (AB)’

NAND-ONLY LOGIC CIRCUITS

Page 3: lec4

F= (A’ • (B • (C’D)’)’)’

The logic circuit for this function is given by:

We can also use the same procedure to do NOR only gates.

Page 4: lec4

Ch2. Decoder

Dr. Bernard Chen Ph.D.University of Central Arkansas

Spring 2009

Page 5: lec4

Integrated Circuits An integrated circuit is a piece (also

called a chip) of silicon on which multiple gates or transistors have been embedded

These silicon pieces are mounted on a plastic or ceramic package with pins along the edges that can be soldered onto circuit boards or inserted into appropriate sockets

Page 6: lec4

Integrated Circuits

SSI, MSI, LSI: They perform small tasks such as addition of few bits. small memories, small processors

 VLSI Tasks: - Large memory - Complex microprocessors, CPUs

Page 7: lec4

An SSI chip contains independent NAND gates

Page 8: lec4

Examples of Combinational Circuits

a) Decoders b) Encoders c) Multiplexers d) Demultiplexers

Page 9: lec4

Decoder Accepts a value and decodes it

Output corresponds to value of n inputs

Consists of: Inputs (n) Outputs (2n , numbered from 0 2n - 1) Selectors / Enable (active high or active

low)

Page 10: lec4

The truth table of 2-to-4 Decoder

Page 11: lec4

2-to-4 Decoder

Page 12: lec4

2-to-4 Decoder

Page 13: lec4

The truth table of 3-to-8 DecoderA2 A1 A0 D0 D1 D2 D3 D4 D5 D6 D7

0 0 0 1

0 0 1 1

0 1 0 1

0 1 1 1

1 0 0 1

1 0 1 1

1 1 0 1

1 1 1 1

Page 14: lec4

3-to-8 Decoder

Page 15: lec4

3-to-8 Decoder with Enable

Page 16: lec4

2-to-4 Decoder: NAND implementation

Decoder is enabled when E=0 and an output is active if it is 0

Page 17: lec4

2-4 Decoder with 2-input and Enable

Page 18: lec4

Decoder Expansion

Decoder expansion Combine two or more small decoders

with enable inputs to form a larger decoder

3-to-8-line decoder constructed from two 2-to-4-line decoders

The MSB is connected to the enable inputs if A2=0, upper is enabled; if A2=1, lower is

enabled.

Page 19: lec4

Decoder Expansion

Page 20: lec4

Combining two 2-4 decoders to form one 3-8 decoder using enable switch

The highest bit is used for the enables

Page 21: lec4

Combinational Circuit Design with Decoders

Combinational circuit implementation with decoders A decoder provide 2n minterms of n

input variables Since any Boolean function can be

expressed as a sum of minterms, one can use a decoder and external OR gates to implement any combinational function.

Page 22: lec4

Combinational Circuit Design with Decoders

Example Realize F (X,Y,Z) = Σ (1, 4, 7) with a decoder:

Page 23: lec4

23

Encoders

An encoder has 2N inputs N outputs

An encoder outputs the binary value of the selected (or active) input.

An encoder performs the inverse operation of a decoder.

Issues What if more than one input is active? What if no inputs are active?

Page 24: lec4

Fall 2010ECE 331 - Digital System

Design 24

Encoders

A B C D Y Z

0 0 0 1 0 0

0 0 1 0 0 1

0 1 0 0 1 0

1 0 0 0 1 1

DZY

I0

I1C

B I2

I3A

Out0

Out1

Page 25: lec4

Fall 2010ECE 331 - Digital System

Design 25

Priority Encoders If more than one input is active, the higher-order

input has priority over the lower-order input. The higher value is encoded on the output

A valid indicator, d, is included to indicate whether or not the output is valid.

Output is invalid when no inputs are active d = 0

Output is valid when at least one input is active

d = 1Why is the valid indicator needed?

Page 26: lec4

Fall 2010ECE 331 - Digital System

Design 26

Priority Encoders

Valid bit

msb

Page 27: lec4

Fall 2010ECE 331 - Digital System

Design 27

Multiplexers A multiplexer has

N control inputs 2N data inputs 1 output

A multiplexer routes (or connects) the selected data input to the output.

The value of the control inputs determines the data input that is selected.

Page 28: lec4

Fall 2010ECE 331 - Digital System

Design 28

Multiplexers

Z = A′.I0 + A.I1

Datainputs

Controlinput

Page 29: lec4

Fall 2010ECE 331 - Digital System

Design 29

Multiplexers

Z = A′.B'.I0 + A'.B.I1 + A.B'.I2 + A.B.I3

A B F

0 0 I0

0 1 I1

1 0 I2

1 1 I3

MSB LSB

Page 30: lec4

Fall 2010ECE 331 - Digital System

Design 30

Multiplexers

Z = A′.B'.C'.I0 + A'.B'.C.I1 + A'.B.C'.I2 + A'.B.C.I3 + A.B'.C'.I0 + A.B'.C.I1 + A'.B.C'.I2 + A.B.C.I3

MSB LSB

A B C F

0 0 0 I0

0 0 1 I1

0 1 0 I2

0 1 1 I3

1 0 0 I4

1 0 1 I5

1 1 0 I6

1 1 1 I7

Page 31: lec4

Fall 2010ECE 331 - Digital System

Design 31

Multiplexers

Page 32: lec4

Fall 2010ECE 331 - Digital System

Design 32

Demultiplexers A demultiplexer has

N control inputs 1 data input 2N outputs

A demultiplexer routes (or connects) the data input to the selected output.

The value of the control inputs determines the output that is selected.

A demultiplexer performs the opposite function of a multiplexer.

Page 33: lec4

Fall 2010ECE 331 - Digital System

Design 33

Demultiplexers

A B W X Y Z

0 0 I 0 0 0

0 1 0 I 0 0

1 0 0 0 I 0

1 1 0 0 0 I

W = A'.B'.I

X = A.B'.I

Y = A'.B.I

Z = A.B.I

Out0

In

S1 S0

I

WXY

Z

A B

Out1

Out2

Out3