3 Combinational Circuit 4.1 Introduction (1-2)Logic circuits for digital systems may be combinational or sequential.Combinational CircuitConsists of logic gates whose outputs at any time are determined from only the present combination of inputs.Performs an operation that can be specified logically by a set of Boolean functions.
4 4.1 Introduction (2-2) Sequential Circuit Employs storage elements in addition to logic gates.Their outputs are a function of the inputs and the state of the storage elements.Because the state of the storage elements is a function of previous inputs, the outputs of a sequential circuit depend not only on present value of inputs, but also on past inputs.
5 Combinational circuits Input VariablesConsists of:Logic GatesOutput VariablesTransforms input data into required output data.Combinational circuitsn inputsm outputs..Block diagram
6 Standard Combination Circuits 4.2 Combinational Circuit (2-2)n input variables 2n binary input combinations.Each possible combination one possible combination output.Combinational circuit can be specified with truth table.Combinational circuit can be described by m Boolean functions.Each output function is expressed in terms of the n input variables.Standard Combination CircuitsAdders, subtractors, comparators, decoders, encoders and multiplexers
7 4.3 Analysis Procedure (1-4) Determine the function that the circuit implements from a logic diagram.Circuit’s function can be determined by either Boolean function or truth table.StepsMake sure that it is combinational not sequential.No memory elements.No feedback path (feedback path: a connection from the output of one gate to the input of a second gate that forms part of the input to the first gate).Obtain Boolean function or the truth table.
10 4.4 Design Procedure (1-7) Steps State the problem. From the specifications of the circuit, determine the required number of inputs and outputs and assign a symbol to each.Derive the truth table that defines the required relationship between inputs and outputs.Obtain the simplified Boolean functions for each output as a function of the input variables.Draw the logic diagram and verify the correctness of the design
11 4.4 Design Procedure (2-7) Example Design a circuit that converts binary coded decimal (BCD) to the excess-3 code for the decimal digits.InputsOutputsBCD (4 bits).4 inputs.Symbols: A, B, C, D.Ex-3 (4 bits).4 outputs.Symbols: w, x, y, z.
13 Binary Adder-Subtractor Is a combinational circuit that performs the arithmetic operations of addition and subtraction with binary numbers.
14 Elementary Operations 4-5 Binary Adder-Subtractor (2-20)Half adderIs a combinational circuit that performs the addition of two bits.Elementary Operations0 + 0 = 0 ; = 1 ; = 1 ; = 10Truth Tabletwo input variablesx, y.two output variables.C (output carry), S (least significant bit of the sum).
15 4-5 Binary Adder-Subtractor (3-20) Half adderSimplified Boolean Function (Sum of Products)Logic Diagram (Sum of Products)S = x'y+xy'C = xy
16 Simplified Boolean Function (XOR and AND gates) 4-5 Binary Adder-Subtractor (4-20)Half adderSimplified Boolean Function (XOR and AND gates)Logic Diagram(XOR and AND gates)S=xÅ yC = xy
17 Functional Block: Full-Adder 4-5 Binary Adder-Subtractor (5-20)Functional Block: Full-AdderIt is a combinational circuit that performs the arithmetic sum of three bits (two significant bits and previous carry).It is similar to a half adder, but includes a carry-in bit from lower stages.Two half adders can be employed to implement a full adder.Inputs & OutputsThree input bits:x, y : two significant bitsZ : the carry bit from the previous lower significant bit.Two output variables:C (output carry), S (least significant bit in sum).
18 Functional Block: Full-Adder 4-5 Binary Adder-Subtractor (6-20)Functional Block: Full-AdderOperationsZX1+ Y+ 0+ 1C S0 11 0For a carry-in (Z) of , it is the same as the half-adder:For a carry- in (Z) of 1:Z1X+ Y+ 0+ 1C S0 11 0
20 4-5 Binary Adder-Subtractor (8-20) Functional Block: Full-AdderSimplified Boolean Function (Sum of products)S = x'y'z + x'yz' + xy'z' + xyzC = xy + xz + yz
21 Functional Block: Full-Adder Logic Diagram (Sum of Products) 4-5 Binary Adder-Subtractor (9-20)Functional Block: Full-AdderLogic Diagram (Sum of Products)
22 4-5 Binary Adder-Subtractor (10-20) Functional Block: Full-AdderImplementation of full adder with two half adders and an OR gate:S = zÅ (xÅ y)= z'(xy'+x‘y) + z(xy'+x'y)'= z‘xy' + z'x'y + z(xy+x‘y')= xy'z' + x'yz' + xyz + x'y'zC = z(xÅ y)+xy= z(xy'+x'y)+xy= xy'z + x'yz + xy
23 4-5 Binary Adder-Subtractor (11-20) Functional Block: Full-AdderLogic Diagram of full adder with two half adders and an OR gate
24 4-5 Binary Adder-Subtractor (12-20) 244-5 Binary Adder-Subtractor (12-20)Binary AdderIs a digital circuit that produces the arithmetic sum of two binary numbers.Constructed with full adders connected in cascade.The output carry from each full adder connected to the input carry of the next full adder.An n-bit binary adder requires n full adders.
25 We need a four –bit adder 254-5 Binary Adder-Subtractor (13-20)Binary AdderDesign a combinational circuit that finds the sum of two binary numbers: A=1011, B=0011Must be 0We need a four –bit adder
27 4-5 Binary Adder-Subtractor (15-20) Binary SubtractorThe subtraction of signed and unsigned binary numbers:A-B = A+(2’s complement of B) (as discussed in chapter 1)Note: This circuit is incomplete, it requires additional circuits to deal with all cases of signed numbers
28 For detecting an overflow 4-5 Binary Adder-Subtractor (16-20)Binary SubtractorLogic DiagramFor detecting an overflow
29 Binary Adder- Subtractor For detecting an overflow Logic DiagramFor detecting an overflow
30 4-5 Binary Adder-Subtractor (19-20) OverflowAn overflow occurs: When two numbers with n digits each are added and the sum is a number occupying n+1 digits.The storage is limited.Unsigned numbersDetected by output carry:C=0, no overflow .C=1 , overflow.Signed numbersAdd two positive numbers and obtain a negative number.Add two negative numbers and obtain a positive number.
31 4-5 Binary Adder-Subtractor (20-20) OverflowSigned numbersDetected by comparing sign carry and output carry (V):V=0, no overflow .V=1 , overflow.