decoders and multiplexers prof. sin-min lee department of computer science san jose state university

30
Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University

Upload: shanna-ray

Post on 24-Dec-2015

224 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University

Decoders and Multiplexers

Prof. Sin-Min Lee

Department of Computer Science

San Jose State University

Page 2: Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University

Decoders

• A combinational circuit that converts binary info from n inputs into a max. of 2n unique objects.

• N - to - m decoders: given n inputs, it outputs m <= 2n minterms.

• Note the ``3'' with a slash, which signifies a three bit input. This notation represents three (1-bit) wires.

• A decoder with n input bits, produces 2^n output bits.

Page 3: Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University
Page 4: Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University
Page 5: Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University
Page 6: Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University
Page 7: Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University
Page 8: Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University
Page 9: Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University
Page 10: Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University
Page 11: Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University
Page 12: Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University
Page 13: Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University
Page 14: Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University
Page 15: Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University
Page 16: Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University

Combinational circuit implementation using Decoders

• We can use decoders to express Boolean functions.

• Any Boolean function can be expressed as a sum of products(minterms).

• So, we can use decoders to produce the minterms and OR gates to produce their logical sum.

Page 17: Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University

Design a digital circuit which compares the magnitude of two 2-bit numbers               and             . It has one output f1 such that

f1=1 if and only if X>Y.

Step 1: Derive the truth table that describes the relation between f1

and the inputs x1,x2,y1, and y2, where x1 and y1 each denotes the

most significant bit of X and Y respectively.

Comparator

Page 18: Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University

Example: expressing full adder with decoder

• We have 3 inputs. So, we use the 3-to-8 decoder to generate the minterms.

• Then we OR 1, 2, 4, 7 and 3,5,6,7 according to the Boolean equations:– S(X,Y,Z) = Sm(1,2,4,7)

– C(X,Y,Z) = Sm(3,5,6,7)

Page 19: Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University

Step 2: Now use the 4-variable K-map to derive the minimal sum of product (SOP) expression for f1.

Page 20: Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University

Implementation using MUXs: Now we implement the output f1

using an 8x1MUX. Selection inputs to the MUX are x2 y1 y2

(that is, if x2y1y2=001, input I1 of the MUX is selected).

The implementation table is tabulated as

Page 21: Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University

Implementation using decoders: Now we implement the output f1

using an          decoder and 3-input OR gates.

Page 22: Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University
Page 23: Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University

Decoders

A B C O7 O6 O5 O4 O3 O2 O1 O00 0 0 0 0 0 0 0 0 0 10 0 1 0 0 0 0 0 0 1 00 1 0 0 0 0 0 0 1 0 00 1 1 0 0 0 0 1 0 0 01 0 0 0 0 0 1 0 0 0 01 0 1 0 0 1 0 0 0 0 01 1 0 0 1 0 0 0 0 0 01 1 1 1 0 0 0 0 0 0 0

ABC

O0O1O2O3O4O5O6O7

Inputs Outputs

Page 24: Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University

Multiplexers• 2**n data inputs,

n control input, one data output

• Data inputs selected by control are gated are gated to output

• Each AND gate gets 3 control and one data input, selects input based on control

• OR gate adds all selected inputs

Page 25: Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University

Majority Function using a Multiplxer

• Each input wired to 1 or 0• If 0 in table ground Else connect to Vcc. Check if it works!

Page 26: Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University

Other Users of Multiplexers

• Parallel to Serial Conversion• Put 8 bit data in input lines• Step through 000 to 111 in control lines to select

inputs serially• Used in serializing device inputs such as key

board inputs over telephone lines• Inverse operation: Demultiplexing routes single

serial input into multiple outputs depending on value of control lines

Page 27: Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University

Decoders

• Selects one of 2**n inputs

• Each AND gate implements one Boolean expression ABC etc.

Page 28: Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University

Comparators• 4 address

words, A, B compared.

• Output (A =B)

• Users XOR gates: 1 iff both inputs are same

Page 29: Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University

Programmable Logic Arrays (PLA)

• Used to form Sums of products

• Select inputs by burning out fuses

• Example has 12 inputs, 6 outputs, PWR and GND

Page 30: Decoders and Multiplexers Prof. Sin-Min Lee Department of Computer Science San Jose State University

PGA Computing Majority function

• Can burn appropriate fuses to fabricate Majority function from a PGA. Choose– 3 inputs, 4 AND gates and

1 OR gate– Burn appropriate fuses

• Which one is best for Majority: – SSI with 4 gates– 1 MSI multiplexer– PLA: more efficient