PowerPoint Presentation: 1
B.Sc. Electrical Engineering (2nd Year) DIGIAL LOGIC & DESIGN (EE-204): B.Sc . Electrical Engineering ( 2 nd Year ) DIGIAL LOGIC & DESIGN (EE-204) COMBINATIONA L LOGIC
Combinational Circuits: Combinational Circuits Output is function of input only i.e. no feedback • • • • • • n inputs m outputs Combinational Circuits When input changes , output may change (after a delay )
Combinational Circuits: Combinational Circuits Design Given a desired function, determine its circuit Function may be expressed as : Boolean function Truth table ? ? ? Analysis Given a circuit, find out its function Function may be expressed as : Boolean function Truth table
Design Procedure: Design Procedure The problem is stated The number of available input variables and required output variables is determined The input & output variables are assigned letter symbols The truth table that defines the required relationship between inputs and outputs is derived The simplified Boolean function for each output is obtained The logic diagram is drawn
ADDERS: ADDERS Digital computers perform a variety of information-processing tasks . Among the basic functions Encountered are the various arithmetic operations . The most basic arithmetic operation , no doubt, is the addition of two binary digits. This simple addition consists of adding two binary bits (0+0=0, 0+1=1, 1+0=1, & 1+1 = 10). The first three operations produce a sum whose length is one digit, but when both augend and addend bits are equal to 1, the binary sum consists of two digits. The higher significant bit of this result is called a CARRY . When the augend and addend numbers contain more significant digits, the carry obtained from the addition of two bits is added to the next higher-order pair of significant bits . A combinational circuit that performs the addition of two bits is called a half-adder . One that performs the addition of three bits ( two significant bits and a previous carry ) is a full-adder .
HALF ADDER: HALF ADDER Half Adder Adds 1-bit plus 1-bit Produces Sum and Carry HA x y S C x y C S 0 0 0 0 0 1 0 1 1 0 0 1 1 1 1 0 x + y ─── C S x y S C
HALF ADDER: HALF ADDER
FULL ADDER: FULL ADDER Full Adder Adds 1-bit plus 1-bit plus 1-bit Produces Sum and Carry x y z C S 0 0 0 0 0 0 0 1 0 1 0 1 0 0 1 0 1 1 1 0 1 0 0 0 1 1 0 1 1 0 1 1 0 1 0 1 1 1 1 1 x + y + z ─── C S FA x y z S C y 0 1 0 1 x 1 0 1 0 z y 0 0 1 0 x 0 1 1 1 z S = xy'z' + x' yz ' + x'y'z + xyz = x y z C = xy + xz + yz
FULL ADDER: FULL ADDER x y z S C x y z S C S = xy'z' + x'yz' + x'y'z + xyz = x y z C = xy + xz + yz
FULL ADDER: FULL ADDER x y z S C HA x y z HA S C
HALF SUBTRACTOR: HALF SUBTRACTOR Half Subtractor Subtracts 1-bit from 1-bit Produces Difference and Borrow HS x y D B x y B D 0 0 0 0 0 1 1 1 1 0 0 1 1 1 0 0 B x - y ─── D x y D B
FULL SUBTRACTOR: FULL SUBTRACTOR Full Subtractor Subtracts 1-bit from 1-bit and from another 1-bit Produces Difference and Borrow x y z B D 0 0 0 0 0 0 0 1 1 1 0 1 0 1 1 0 1 1 1 0 1 0 0 0 1 1 0 1 0 0 1 1 0 0 0 1 1 1 1 1 x - y - z ─── B D FS x y z D B y 0 1 0 1 x 1 0 1 0 z y 0 1 1 1 x 0 0 1 0 z D = xy'z' + x' yz ' + x'y'z + xyz = x y z D = x'y + x'z + yz
FULL SUBTRACTOR: FULL SUBTRACTOR x y z D B x y z D B D = xy'z' + x' yz ' + x'y'z + xyz = x y z B = x'y + x'z + yz
FULL SUBTRACTOR: FULL SUBTRACTOR x y z D B HS x y z HS D B
BCD TO EXCESS-3 CODE CONERTER: BCD TO EXCESS-3 CODE CONERTER A B C D w x y z 0 0 0 0 0 0 1 1 0 0 0 1 0 1 0 0 0 0 1 0 0 1 0 1 0 0 1 1 0 1 1 0 0 1 0 0 0 1 1 1 0 1 0 1 1 0 0 0 0 1 1 0 1 0 0 1 0 1 1 1 1 0 1 0 1 0 0 0 1 0 1 1 1 0 0 1 1 1 0 0 1 0 1 0 x x x x 1 0 1 1 x x x x 1 1 0 0 x x x x 1 1 0 1 x x x x 1 1 1 0 x x x x 1 1 1 1 x x x x C 1 1 1 B A x x x x 1 1 x x D C 1 1 1 1 B A x x x x 1 x x D C 1 1 1 1 B A x x x x 1 x x D C 1 1 1 1 B A x x x x 1 x x D w = A + BC+BD x = B’C+B’D+BC’D’ y = C’D’+CD z = D’
BCD TO EXCESS-3 CODE CONERTER: BCD TO EXCESS-3 CODE CONERTER A B C D w x y z 0 0 0 0 0 0 1 1 0 0 0 1 0 1 0 0 0 0 1 0 0 1 0 1 0 0 1 1 0 1 1 0 0 1 0 0 0 1 1 1 0 1 0 1 1 0 0 0 0 1 1 0 1 0 0 1 0 1 1 1 1 0 1 0 1 0 0 0 1 0 1 1 1 0 0 1 1 1 0 0 1 0 1 0 x x x x 1 0 1 1 x x x x 1 1 0 0 x x x x 1 1 0 1 x x x x 1 1 1 0 x x x x 1 1 1 1 x x x x w = A + B ( C + D ) x = B’ ( C + D ) + B ( C + D ) ’ y = ( C + D ) ’ + CD z = D’
SEVEN SEGMENT DECODER: SEVEN SEGMENT DECODER a b c g e d f ? w x y z a b c d e f g w x y z a b c d e f g 0 0 0 0 1 1 1 1 1 1 0 0 0 0 1 0 1 1 0 0 0 0 0 0 1 0 1 1 0 1 1 0 1 0 0 1 1 1 1 1 1 0 0 1 0 1 0 0 0 1 1 0 0 1 1 0 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 0 1 1 1 1 1 0 1 1 1 1 1 1 0 0 0 0 1 0 0 0 1 1 1 1 1 1 1 1 0 0 1 1 1 1 1 0 1 1 1 0 1 0 x x x x x x x 1 0 1 1 x x x x x x x 1 1 0 0 x x x x x x x 1 1 0 1 x x x x x x x 1 1 1 0 x x x x x x x 1 1 1 1 x x x x x x x y 1 1 1 1 1 1 x w x x x x 1 1 x x z BCD code a = w + y + xz + x’z ’ b = . . . c = . . . d = . . .
DESIGN PROBLEMS: DESIGN PROBLEMS Design a combinational circuit with three inputs and one output. The output is equal to logic-1 when the binary value of the input is less than 3. The output is logic-0 otherwise. Design a combinational circuit with three inputs, x, y, and z, and three outputs, A, B, and C . When the binary input is 0, 1, 2, or 3, the binary output is one greater than the input. When the binary input is 4, 5, 6, or 7, the binary output is one less than the input. A majority function is generated in a combinational circuit when the output is equal to 1 if the input variables have more 1's than 0's. The output is 0 otherwise. Design a 3-input majority function. Design a combinational circuit that adds one to a 4-bit binary number, A 3 A 2 A 1 A 0 . For example, if the input of the circuit is A 3 A 2 A 1 A 0 = 1101, the output is 11 10. The circuit can be designed using four half-adders . A combinational circuit produces the binary sum of two 2-bit numbers, X 1 X 0 and Y 1 Y 0 . The outputs are C , S 1 , and S 0 . Provide a truth table of the combinational circuit .
DESIGN PROBLEMS: DESIGN PROBLEMS Design the circuit of Problem 4-5 using two full-adders. Design a combinational circuit that multiplies two 2-Bit numbers, A 1 A 0 and B 1 B 0 , to produce a 4-bit product, C 3 C 2 C 1 C 0 . Use AND gates and half-adders . Show that a Full- Subtractor can be constructed with two half- Subtractors and an OR gate . Design a combinational circuit with three inputs and six outputs. The output binary number should he the square of the input binary number. Design a combinational circuit with four inputs that represent a decimal digit in BCD and four outputs that produce the 9's complement of the input digit. The six unused combinations can be treated as don't-care conditions. Design a combinational circuit with four inputs and four outputs. The output generates the 2's complement of the input binary number .
DESIGN PROBLEMS: DESIGN PROBLEMS Design a combinational circuit that detects an error in the representation of a decimal digit in BCD. The output of the circuit must he equal to Logic -1 when the input contains any one of the six unused bit combinations in the BCD code. 4-13 Design a code converter that converts a decimal digit from the 8 4 -2 -1 code to BCD Design a combinational circuit that converts a decimal digit from the 2 4 2 1 code to the 8 4 -2 - 1 code Design a combinational circuit that converts a binary number of four bits to a decimal number in BCD. Note that the BCD number is the same as the binary number as long as the input is less than or equal to 9. The binary number from 1010 to 1111 converts into BCD numbers from 1 0000 to 1 0101. 21
ANALYSIS PROCEDURE (BOOLEAN EXPRESSION APPROACH): ANALYSIS PROCEDURE ( BOOLEAN EXPRESSION APPROACH ) Label with arbitrary symbols all gate outputs that are a function of the input variables . Obtain the Boolean functions for each gate . Label with other arbitrary symbols those gates that are a function of input variables and/or previously labeled gates . Find the Boolean functions for these gates . Repeat the process outlined in step 2 until the outputs of the circuit are obtained . By repeated substitution of previously defined functions , obtain the output Boolean functions in terms of input variables only.
ANALYSIS PROCEDURE (BOOLEAN EXPRESSION APPROACH): ANALYSIS PROCEDURE (BOOLEAN EXPRESSION APPROACH ) ABC A+B+C AB+AC+BC ( A’+ B ’ )( A’+ C’ )( B’+C’ ) AB'C'+A'BC'+A'B'C F 1 = AB'C' + A'BC' + A'B'C + ABC F 2 = AB + AC + BC
ANALYSIS PROCEDURE (TRUTH TABLE APPROACH): ANALYSIS PROCEDURE ( TRUTH TABLE APPROACH ) Determine the number of input variables to the circuit. For n inputs, form the 2 n possible input combinations of 1's and 0's by listing the binary numbers from 0 to 2 n - 1. Label the outputs of selected gates with arbitrary symbols. Obtain the truth table for the outputs of those gates that are a function of the input variables only. Proceed to obtain the truth table for the outputs of those gates that are a function of previously defined values until the columns for all outputs are determined .
ANALYSIS PROCEDURE (TRUTH TABLE APPROACH): ANALYSIS PROCEDURE ( TRUTH TABLE APPROACH ) A B C F 1 F 2 0 0 0 = 0 = 0 = 0 = 0 = 0 = 0 = 0 = 0 = 0 = 0 = 0 = 0 0 0 0 0 0 0 1 0 0 0 0
ANALYSIS PROCEDURE (TRUTH TABLE APPROACH): = 0 = 0 = 1 = 0 = 0 = 1 = 0 = 0 = 0 = 1 = 0 = 1 0 1 0 0 0 0 1 1 1 A B C F 1 F 2 0 0 0 0 0 0 0 1 1 0 ANALYSIS PROCEDURE ( TRUTH TABLE APPROACH )
ANALYSIS PROCEDURE (TRUTH TABLE APPROACH): = 0 = 1 = 0 = 0 = 1 = 0 = 0 = 1 = 0 = 0 = 1 = 0 0 1 0 0 0 0 1 1 1 A B C F 1 F 2 0 0 0 0 0 0 0 1 1 0 0 1 0 1 0 ANALYSIS PROCEDURE ( TRUTH TABLE APPROACH )
ANALYSIS PROCEDURE (TRUTH TABLE APPROACH): = 0 = 1 = 1 = 0 = 1 = 1 = 0 = 1 = 0 = 1 = 1 = 1 0 1 0 0 1 1 0 0 0 A B C F 1 F 2 0 0 0 0 0 0 0 1 1 0 0 1 0 1 0 0 1 1 0 1 ANALYSIS PROCEDURE ( TRUTH TABLE APPROACH )
ANALYSIS PROCEDURE (TRUTH TABLE APPROACH): = 1 = 0 = 0 = 1 = 0 = 0 = 1 = 0 = 1 = 0 = 0 = 0 0 1 0 0 0 0 1 1 1 A B C F 1 F 2 0 0 0 0 0 0 0 1 1 0 0 1 0 1 0 0 1 1 0 1 1 0 0 1 0 ANALYSIS PROCEDURE ( TRUTH TABLE APPROACH )
ANALYSIS PROCEDURE (TRUTH TABLE APPROACH): = 1 = 0 = 1 = 1 = 0 = 1 = 1 = 0 = 1 = 1 = 0 = 1 0 1 0 1 0 1 0 0 0 A B C F 1 F 2 0 0 0 0 0 0 0 1 1 0 0 1 0 1 0 0 1 1 0 1 1 0 0 1 0 1 0 1 0 1 ANALYSIS PROCEDURE ( TRUTH TABLE APPROACH )
ANALYSIS PROCEDURE (TRUTH TABLE APPROACH): = 1 = 1 = 0 = 1 = 1 = 0 = 1 = 1 = 1 = 0 = 1 = 0 0 1 1 0 0 1 0 0 0 A B C F 1 F 2 0 0 0 0 0 0 0 1 1 0 0 1 0 1 0 0 1 1 0 1 1 0 0 1 0 1 0 1 0 1 1 1 0 0 1 ANALYSIS PROCEDURE ( TRUTH TABLE APPROACH )
ANALYSIS PROCEDURE (TRUTH TABLE APPROACH): = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 = 1 1 1 1 1 1 1 0 0 1 A B C F 1 F 2 0 0 0 0 0 0 0 1 1 0 0 1 0 1 0 0 1 1 0 1 1 0 0 1 0 1 0 1 0 1 1 1 0 0 1 1 1 1 1 1 B 0 1 0 1 A 1 0 1 0 C B 0 0 1 0 A 0 1 1 1 C F 1 = AB'C' + A'BC' + A'B'C + ABC F 2 = AB + AC + BC ANALYSIS PROCEDURE ( TRUTH TABLE APPROACH )
QUESTIONS: QUESTIONS