Combinational Logic Circuits www.educlash.com
Comb. Logic in Context Typically part of system with storage Computer looks like this at high level www.educlash.com
Decoders n to 2n decoder n inputs 2n outputs For each input, one and only one output will be active. www.educlash.com
2 to 4 Decoder – Truth Table X1 X0 Y3 Y2 Y1 Y0 1 www.educlash.com
2 to 4 Decoder Equations www.educlash.com
2-to-4 Line Decoder www.educlash.com
2-to-4 with Enable www.educlash.com
Truth Table, 3-to-8 Decoder Notice they are minterms www.educlash.com
Schematic www.educlash.com
Uses for Decoders Binary number might serve to select some operation Computer op codes are encoded Decoder lines might select add, or subtract, or multiply, etc. Memory address lines www.educlash.com
Encoder Encoder is the opposite of decoder 2n inputs (or less – maybe BCD in) n outputs www.educlash.com
Truth Table www.educlash.com
Inputs are Minterms Can OR them together appropriately A0 = D1 + D3 + D5 + D7 www.educlash.com
What’s the Problem? What if D3 and D6 both high? Simple OR circuit will set A to 7 www.educlash.com
Priority Encoder Chooses one with highest priority Note “don’t cares” Largest number, usually Note “don’t cares” What if all inputs are zero? www.educlash.com
Need Another Output A “Valid” output www.educlash.com
Valid is OR of inputs www.educlash.com
Multiplexer(MUX)/Data Selector N to 1 multiplexer n data input lines Log2(n) control inputs One output This circuit will “connect” the selected input to the output. The selected input is specified by a decoding of the control inputs. www.educlash.com
Multiplexer (or Mux) Selects one of a set of inputs to pass on to output Binary control code, n lines Choose from 2n inputs Useful for choosing from sets of data Memory or register to ALU Very common 74153 www.educlash.com
Two Input Mux www.educlash.com
Logic www.educlash.com
Logic is Decoder Plus www.educlash.com
Three-State Implementation www.educlash.com
Demultiplexer Takes one input Out to one of 2n possible outputs www.educlash.com
Demux is a Decoder With an enable www.educlash.com
Code Converters One code to another Book puts seven-segment decoder in this category Typically multiple outputs Each output has function or truth table www.educlash.com
Seven-Segment Decoder This Friday’s lab: Verilog of hex to LEDs Extended version of book example You may want to work out mapping (truth table/function) before lab www.educlash.com