digital

85
COMBINATIONAL CIRCUITS

Upload: raghavan23

Post on 19-Nov-2014

49 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Digital

COMBINATIONAL CIRCUITS

Page 2: Digital

Combinational Circuit

• When logic gates are connected together to produce a specified output for certain specified combinations of input variables, with no storage involved, the resulting circuit is called combinational logic.

• The output variables at all times depend on the combination of input variables.

•Example: ~(A*B) and ~(C*D) with an OR gate

CombinationalcircuitInputs Outputs

Page 3: Digital

Combinational Circuits

Applications:• Derive the boolean expression for some binary calculation (e.g.,

addition)

• Then build the circuit using the various logic gates

Page 4: Digital

Half Adder– Notice that sum computes the same as XOR and carry

computes the same as AND– We build an Adder using just one XOR and one AND gate

Block diagram Logic Diagram

Page 5: Digital

Half Adder

Truth table K-Map

Page 6: Digital

Full Adder• The half adder really only does half

the work

– adds 2 bits, but only 2 bits

• If we want to add 2 n-bit numbers, we need to also include the carry in from the previous half adder which is possible using full adder circuit.

• The sum is 1 only if one of x, y and carry in are 1, or if all three are 1, the sum is 0 otherwise

• The carry out is 1 if two or three of x, y and carry in were 1, 0 otherwise

Page 7: Digital

Full Adder

Page 8: Digital

Full Adder

Implementation using two half-adders and an OR gate

or

Page 9: Digital

Subtractors

A half-subtractor is a combinational circuit that subtracts two bits and produces their difference.

• Half subtractor

Truth table K-Map

Page 10: Digital

Subtractors

Limitations of half subtractor

In multidigit subtraction ,we have to subtract two bits along with

the borrow of the previous digit subtraction. Effectively such subtraction

requires subtraction of three bits, This is not possible with half-subtractor.

Page 11: Digital

Full Subtractor

A full subtractor is a combinational circuit that performs a subtraction between three bits taking into account borrow of the lower significant stage.

Truth table K-Map

Page 12: Digital

Full Subtractor

Boolean function for difference and borrow

Page 13: Digital

Full Subtractor

Logic diagram

Page 14: Digital

Full Subtractor

Implementation using two half-subtractors and an OR gate

Page 15: Digital

Serial Adder/Subtractor

Two numbers stored in right shift registers A and B can be added serially.

Serial Adder

Page 16: Digital

Parallel Adder

• A single full adder is capable of adding two one-bit numbers and an carry.

• In order to add binary numbers with more than one bit, additional full adders must be employed.

• A n-bit, parallel adders can be constructed using number of full adder circuits connected in parallel i.e. the carry output of each adder is connected to the carry input of the next higher-order adder.

Page 17: Digital

Parallel Adder n-bit parallel adder

4-bit parallel adder

Page 18: Digital

Parallel Adder

4-bit binary parallel adder(IC74LS83)

Eight bit adder using two 74823IC’s

Page 19: Digital

Parallel Subtractor

• Subtraction of binary numbers can be done most conveniently by means of complements.

• Subtaction A-B can be done by taking 2’s complement of B and adding it to A.

• Take 1’s complement of B (using an inverter)and add one to LSB pair of bits

Page 20: Digital

Parallel Subtractor

Page 21: Digital

Parallel Adder/Subtractor

• The addition and subtraction operations can combined into one ciruit with one

common binary adder using an XOR gate with each full adder.

• Mode M controls the operation of the circuit.

• M=0; Adder M=1; Subtractor

• When M=0, we have, the full adders receive the value of B,

with the input carry being zero, it performs the function of A+B.

• When M=1,we have .The B inputs are all

complemented and a 1 is added through input carry.The circuit performs the

operation A plus the 2’s Complement of b,i.e., A-B.

Page 22: Digital

Parallel Adder/Subtractor

Page 23: Digital

Comparison-Serial/Parallel Adder

Page 24: Digital

BCD Adder

• It is a circuit that adds two BCD digits and produces a sum digit also in BCD.

• To implement the BCD Adder we require:– 4-bit binary adder for initial addition

– Logic circuit to detect sum greater than 9

– One more 4-bit adder to add six in the sum if the sum is greater than 9 or carry is 1.

– The logic circuit to detect sum >9 can be determined by simplifying the boolean expression of given truth table.

Page 25: Digital

BCD Adder

Y=S3S2+S3S1

Truth tableLogical expression to add 6

Page 26: Digital

BCD Adder

Page 27: Digital

Design-8 bit BCD Adder(IC74283)

Page 28: Digital

Magnitude Comparator

• A comparator is a special combinational circuit designed primarily to compare the relative magnitude of two binary numbers.

i.e.,(A<B,A=B,A>B).

• Depending upon the relative magnitudes of the two number, one of the outputs will be high.

Page 29: Digital

Design of 2 bit comparator using gates

Page 30: Digital

Design of 2 bit comparator using gates

Page 31: Digital

Logic diagram of 2- bit comparator

Page 32: Digital

Design of 8- bit comparator using IC7485

Page 33: Digital

Binary to BCD Code Converter

Page 34: Digital

Binary to BCD Code Converter

Page 35: Digital

Binary to BCD Code Converter

Page 36: Digital

Logic diagram-(Binary-BCD)

Page 37: Digital

BCD to Binary Converter

Page 38: Digital

BCD to Binary Converter

Page 39: Digital

BCD to Binary Converter

Page 40: Digital

BCD to Binary Converter

Page 41: Digital

Logic diagram-(BCD to Binary)

Page 42: Digital

BCD to Excess 3 Converter

• XS3 code can be obtained by adding 3 to each BCD number.

Page 43: Digital

BCD to Excess 3 Converter

Page 44: Digital

BCD to Excess 3 Converter

Page 45: Digital

Excess-3 to BCD Converter

Page 46: Digital

Excess-3 to BCD Converter

Page 47: Digital

Excess-3 to BCD Converter

Page 48: Digital

Binary to Gray Code Converter-Truth table

Page 49: Digital

Binary to Gray Code Converter-K Map

Page 50: Digital

Binary to Gray Code Converter-logic diagram

Page 51: Digital

Gray to Binary Code Converter-Truth table

Page 52: Digital

Gray to Binary Code Converter-K Map

Page 53: Digital

Gray to Binary Code Converter-K Map & logic diagram

Page 54: Digital

BCD to Gray Code Converter-Truth table

Page 55: Digital

BCD to Gray Code Converter-K Map

Page 56: Digital

BCD to Gray Code Converter-Logic diagram

Page 57: Digital

Decoders

• A binary decoder has ‘n’ bit binary input and a one activated exactly one of 2n outputs.

Page 58: Digital

2-to-4-line decoder –Logic diagram

Page 59: Digital

2-to-4-line decoder –Truth table

• If the enable input is one,and only one , of the outputs Y0 to Y3 is active for the given input.

•If the enable input is 0, then all the outputs are 0.

Page 60: Digital

3-to-8-line decoder –Logic diagram

Page 61: Digital

3-to-8-line decoder –Truth table

Page 62: Digital

4x16 decoder using two 74LS138IC’s

Page 63: Digital

BCD to Decimal Decoder

Page 64: Digital

Encoder

• An encoder is a digital circuit that performs the inverse operation of a decoder.

• An encoder has 2n input lines and n output lines.

• In encoder the output lines generate the binary

code corresponding to the input value.

Page 65: Digital

Decimal to BCD Encoder

Page 66: Digital

Octal to Binary Encoder-Truth table

Page 67: Digital

Priority Encoder

• It is an encoder circuit that includes priority function.

• If two or more inputs are equal to 1 at the same time, the input having the highest priority will take precedence.

• D3-higest priority ,

• D0- lowest priority.

Page 68: Digital

4-bit Priority Encoder-K Map

Page 69: Digital

4-bit Priority Encoder

Page 70: Digital

Multiplexers

• It is a digital switch. It allows digital information from several sources to be routed onto a single output line.

• Normally it has 2n input lines and n output lines.

• Selection lines are decoded to select a particular AND gate.

• Multiplexers means ‘many to one’.

• It is also called as data selector because the output bit depends on the input data bit that is selected.

Page 71: Digital

Multiplexers

Logic diagramLogic diagramTruth tableTruth table

Page 72: Digital

Quadruple 2-to-1 line multiplexer•It has 4 MUX each capable of It has 4 MUX each capable of selecting one of the two input selecting one of the two input lines.lines.

•Output Y1 can be selected to Output Y1 can be selected to have the value of 1 or B1 have the value of 1 or B1 respectively.respectively.

•The selection line ‘s’ selects The selection line ‘s’ selects one of the two lines in all 4 one of the two lines in all 4 MUX.MUX.

•The control input ‘E’ enables The control input ‘E’ enables the MUX in ‘0’ state and the MUX in ‘0’ state and disables them in ‘1’ state.disables them in ‘1’ state.

•When E=1,o/p have all o’s, When E=1,o/p have all o’s, regardless of the value of S.regardless of the value of S.

Page 73: Digital

74xx151 8 to 1 multiplexer

Page 74: Digital

Design of 32x1 MUX using two 74ls150 IC’S

Page 75: Digital

Design of 32x1 MUX using four 8x1 MUX AND 2X4 DECODER

Page 76: Digital

Implementation of Combinational logic using MUX

• F(A,B,C)= Σ m(1,3,5,6)

Truth tableTruth tableMUX MUX

implementationimplementationImplementation tableImplementation table

Page 77: Digital

Implementation of Combinational logic using MUX

Page 78: Digital

Implementation of Combinational logic using MUX

• F(P,Q,R,S)= Σ m(0,1,3,4,8,9,15)

Implementation tableImplementation table

MUX implementationMUX implementation

Page 79: Digital

Implementation of Combinational logic using MUX

F(A,B,C,D)=Σ(0,1,2,4,6,9,12,14)

Implementation tableImplementation table MUX ImplementationMUX Implementation

Page 80: Digital

Implementation of Combinational logic using MUX

Page 81: Digital

Implementation of Combinational logic using MUX

Page 82: Digital

Demultiplexers (DEMUX)

• It is a circuit that receives information on a single line and transmits this information on one of 2n possible output lines.

• The selection of specific output line is controlled by the values of n selection lines.

• The single input variable Din has a path to all four outputs, but the input information is directed to only one of the output lines.

Page 83: Digital

Demultiplexers (DEMUX)

Function tableFunction table Logic diagramLogic diagram

Page 84: Digital

Design of 1:8 demux uing two 1:4 demux

Page 85: Digital

Implementation of full subtractor using demux