digital
TRANSCRIPT
![Page 1: Digital](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/1.jpg)
COMBINATIONAL CIRCUITS
![Page 2: Digital](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/2.jpg)
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](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/3.jpg)
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](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/4.jpg)
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](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/5.jpg)
Half Adder
Truth table K-Map
![Page 6: Digital](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/6.jpg)
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](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/7.jpg)
Full Adder
![Page 8: Digital](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/8.jpg)
Full Adder
Implementation using two half-adders and an OR gate
or
![Page 9: Digital](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/9.jpg)
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](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/10.jpg)
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](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/11.jpg)
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](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/12.jpg)
Full Subtractor
Boolean function for difference and borrow
![Page 13: Digital](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/13.jpg)
Full Subtractor
Logic diagram
![Page 14: Digital](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/14.jpg)
Full Subtractor
Implementation using two half-subtractors and an OR gate
![Page 15: Digital](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/15.jpg)
Serial Adder/Subtractor
Two numbers stored in right shift registers A and B can be added serially.
Serial Adder
![Page 16: Digital](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/16.jpg)
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](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/17.jpg)
Parallel Adder n-bit parallel adder
4-bit parallel adder
![Page 18: Digital](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/18.jpg)
Parallel Adder
4-bit binary parallel adder(IC74LS83)
Eight bit adder using two 74823IC’s
![Page 19: Digital](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/19.jpg)
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](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/20.jpg)
Parallel Subtractor
![Page 21: Digital](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/21.jpg)
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](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/22.jpg)
Parallel Adder/Subtractor
![Page 23: Digital](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/23.jpg)
Comparison-Serial/Parallel Adder
![Page 24: Digital](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/24.jpg)
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](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/25.jpg)
BCD Adder
Y=S3S2+S3S1
Truth tableLogical expression to add 6
![Page 26: Digital](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/26.jpg)
BCD Adder
![Page 27: Digital](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/27.jpg)
Design-8 bit BCD Adder(IC74283)
![Page 28: Digital](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/28.jpg)
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](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/29.jpg)
Design of 2 bit comparator using gates
![Page 30: Digital](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/30.jpg)
Design of 2 bit comparator using gates
![Page 31: Digital](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/31.jpg)
Logic diagram of 2- bit comparator
![Page 32: Digital](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/32.jpg)
Design of 8- bit comparator using IC7485
![Page 33: Digital](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/33.jpg)
Binary to BCD Code Converter
![Page 34: Digital](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/34.jpg)
Binary to BCD Code Converter
![Page 35: Digital](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/35.jpg)
Binary to BCD Code Converter
![Page 36: Digital](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/36.jpg)
Logic diagram-(Binary-BCD)
![Page 37: Digital](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/37.jpg)
BCD to Binary Converter
![Page 38: Digital](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/38.jpg)
BCD to Binary Converter
![Page 39: Digital](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/39.jpg)
BCD to Binary Converter
![Page 40: Digital](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/40.jpg)
BCD to Binary Converter
![Page 41: Digital](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/41.jpg)
Logic diagram-(BCD to Binary)
![Page 42: Digital](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/42.jpg)
BCD to Excess 3 Converter
• XS3 code can be obtained by adding 3 to each BCD number.
![Page 43: Digital](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/43.jpg)
BCD to Excess 3 Converter
![Page 44: Digital](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/44.jpg)
BCD to Excess 3 Converter
![Page 45: Digital](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/45.jpg)
Excess-3 to BCD Converter
![Page 46: Digital](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/46.jpg)
Excess-3 to BCD Converter
![Page 47: Digital](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/47.jpg)
Excess-3 to BCD Converter
![Page 48: Digital](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/48.jpg)
Binary to Gray Code Converter-Truth table
![Page 49: Digital](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/49.jpg)
Binary to Gray Code Converter-K Map
![Page 50: Digital](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/50.jpg)
Binary to Gray Code Converter-logic diagram
![Page 51: Digital](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/51.jpg)
Gray to Binary Code Converter-Truth table
![Page 52: Digital](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/52.jpg)
Gray to Binary Code Converter-K Map
![Page 53: Digital](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/53.jpg)
Gray to Binary Code Converter-K Map & logic diagram
![Page 54: Digital](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/54.jpg)
BCD to Gray Code Converter-Truth table
![Page 55: Digital](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/55.jpg)
BCD to Gray Code Converter-K Map
![Page 56: Digital](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/56.jpg)
BCD to Gray Code Converter-Logic diagram
![Page 57: Digital](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/57.jpg)
Decoders
• A binary decoder has ‘n’ bit binary input and a one activated exactly one of 2n outputs.
![Page 58: Digital](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/58.jpg)
2-to-4-line decoder –Logic diagram
![Page 59: Digital](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/59.jpg)
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](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/60.jpg)
3-to-8-line decoder –Logic diagram
![Page 61: Digital](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/61.jpg)
3-to-8-line decoder –Truth table
![Page 62: Digital](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/62.jpg)
4x16 decoder using two 74LS138IC’s
![Page 63: Digital](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/63.jpg)
BCD to Decimal Decoder
![Page 64: Digital](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/64.jpg)
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](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/65.jpg)
Decimal to BCD Encoder
![Page 66: Digital](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/66.jpg)
Octal to Binary Encoder-Truth table
![Page 67: Digital](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/67.jpg)
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](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/68.jpg)
4-bit Priority Encoder-K Map
![Page 69: Digital](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/69.jpg)
4-bit Priority Encoder
![Page 70: Digital](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/70.jpg)
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](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/71.jpg)
Multiplexers
Logic diagramLogic diagramTruth tableTruth table
![Page 72: Digital](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/72.jpg)
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](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/73.jpg)
74xx151 8 to 1 multiplexer
![Page 74: Digital](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/74.jpg)
Design of 32x1 MUX using two 74ls150 IC’S
![Page 75: Digital](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/75.jpg)
Design of 32x1 MUX using four 8x1 MUX AND 2X4 DECODER
![Page 76: Digital](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/76.jpg)
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](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/77.jpg)
Implementation of Combinational logic using MUX
![Page 78: Digital](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/78.jpg)
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](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/79.jpg)
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](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/80.jpg)
Implementation of Combinational logic using MUX
![Page 81: Digital](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/81.jpg)
Implementation of Combinational logic using MUX
![Page 82: Digital](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/82.jpg)
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](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/83.jpg)
Demultiplexers (DEMUX)
Function tableFunction table Logic diagramLogic diagram
![Page 84: Digital](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/84.jpg)
Design of 1:8 demux uing two 1:4 demux
![Page 85: Digital](https://reader036.vdocuments.us/reader036/viewer/2022081716/546c3a78b4af9fe2038b4be3/html5/thumbnails/85.jpg)
Implementation of full subtractor using demux