Digital System Design Combinational Logic 13 Summarized from
Digital System Design Combinational Logic 1/3 Summarized from slides by Assoc. Prof. Pradondet Nilagupta pom@ku. ac. th
Two digital circuit types n Combinational digital circuits: ¡ ¡ ¡ n Consist of logic gates Their current outputs are determined from the present combination of inputs. Their operations can be specified logically by sets of Boolean functions. Sequential digital circuits: ¡ ¡ Employ storage elements in addition to logic gates. Their outputs are a function of the inputs and the state of the storage elements. Their outputs depend on current inputs and past input. They have feedback connections. Digital System Design 05 March 2021 2
Combinational circuits n 2 n possible combinations of input values n Specific functions ¡ n Adders, subtractors, comparators, decoders, encoders, and multiplexers MSI circuits or standard cells Digital System Design 05 March 2021 3
Analysis of A Combinational Circuit n make sure that it is combinational not sequential ¡ No feedback path n derive its Boolean functions (truth table) design verification a verbal explanation of its function n Ex. What is the output function of this circuit? n n Digital System Design 05 March 2021 4
Design of Combinational Circuit (1/2) n The design procedure of combinational circuits ¡ State the problem (system spec(. n n ¡ ¡ ¡ determine the inputs and outputs the input and output variables are assigned symbols Derive the truth table Derive the simplified Boolean functions Draw the logic diagram and verify the correctness Digital System Design 05 March 2021 5
Design of Combinational Circuit (2/2) n Functional description ¡ ¡ Boolean function HDL (Hardware description language( n n ¡ n Verilog HDL VHDL Schematic entry Logic minimization ¡ ¡ ¡ number of gates number of inputs to a gate propagation delay number of interconnection limitations of the driving capabilities Digital System Design 05 March 2021 6
Binary Adders n n Addition is important function in computer system What does an adder have to do? ¡ ¡ ¡ n Binary adders operate bit-wise ¡ n Add binary digits Generate carry if necessary Consider carry from previous digit A 16 -bit adder uses 16 one-bit adders Binary adders come in two flavors ¡ ¡ ¡ Half adder : adds two bits and generate result and carry Full adder : also considers carry input Two half adders make one full adder Digital System Design 05 March 2021 7
Binary Half Adder n Specification: ¡ n Outputs: ¡ ¡ ¡ n n Design a circuit that adds two bits and generates the sum and a carry Two inputs: x, y Two output: S (sum), C (carry( 0+0=0 ; 0+1=1 ; 1+0=1 ; 1+1=10 The S output represents the least significant bit of the sum. The C output represents the most significant bit of the sum or (a carry. ( Digital System Design 05 March 2021 8
Implementation of Half Adder n n n the flexibility for implementation S=x y S = (x+y)(x'+y(' S' = xy+x'y' S = (C+x'y'(' C = xy = (x'+y'(' Digital System Design n n 05 March 2021 S = x'y+xy' C = xy X Y Half Adder S C 9
Full-Adder n Specification: ¡ n Inputs: ¡ ¡ n A combinational circuit that forms the arithmetic sum of three bits and generates a sum and a carry Three inputs: x, y, z Two outputs: S, C Truth table: X C Y Full Adder Z S Digital System Design 05 March 2021 10
Implementation of Full Adder S=x’y’z+ x’yz’ + xyz Digital System Design 05 March 2021 C =xy + xz + yz 11
Binary Adder n n n A binary adder is a digital circuit that produces the arithmetic sum of two binary numbers. A binary adder can be implemented using multiple full adders (FA. ( Example: Add 2 binary numbers ¡ ¡ A = 1011 B = 0011 Digital System Design Subscript i: 3 2 1 0 Input carry Augend Addend 0 1 0 0 1 1 1 0 1 1 Ci Ai Bi Sum Carry 1 0 1 Si Ci+1 05 March 2021 12
Example: 4 -bit binary adder n 4 -bit Ripple Carry Adder n Classical example of standard components ¡ C A B S 1110 0101 0111 1100 Would require truth table with 29 entries! Digital System Design 05 March 2021 13
Carry Propagation n In any combinational circuit, the signal must propagate through the gates before the correct output is available in the output terminals. Total propagation time = the propagation delay of a typical gate. X the number of gate levels The longest propagation delay time in a binary adder is the time it takes the carry to propagate through the full adders. This is because each bit of the sum output depends on the value of the input carry. This makes the binary adder very slow. Digital System Design 05 March 2021 14
Carry-Lookahead Adder n n Full adder: Si = Ai Bi Ci , Ci+1 = Ai Bi + (Ai Bi ) Ci Create new signals: ¡ ¡ n Gi = Ai Bi “carry generate” for stage i Pi = Ai Bi “carry propagate” for stage i Full adder equations expressed in terms of Gi and Pi ¡ ¡ S i = P i Ci Ci+1 = Gi + Pi Ci Digital System Design 05 March 2021 15
Carry Lookahead - Equations n Full adder functionality can be expressed recursively ¡ ¡ n S i = P i Ci Ci+1 = Gi + Pi Ci Carry of each stage ¡ ¡ ¡ C 0 = input carry C 1 = G 0 + P 0 C 2 = G 1 + P 1 C 1 = G 1 + P 1(G 0 + P 0 C 0) = G 1 + P 1 G 0 + P 1 P 0 C 3 = G 2 + P 2 C 2 = … = G 2 + P 2 G 1 + P 2 P 1 G 0 + P 2 P 1 P 0 C 4 = G 3 + P 3 G 2 + P 3 P 2 G 1 + P 3 P 2 P 1 G 0 + P 3 P 2 P 1 P 0 C 0 Digital System Design 05 March 2021 16
Carry Lookahead - Circuit Digital System Design 05 March 2021 17
4 -bit Adder with Carry Lookahead n Complete adder: ¡ n Same number of stages for each bit Drawback? ¡ Increasing complexity of lookahead logic for more bits Digital System Design 05 March 2021 18
- Slides: 18