Combinational Logic Chapter 4 1 Combinational Circuits Combinational

Combinational Logic Chapter 4 1

Combinational Circuits

Combinational Circuits • Adders • Subtractors • Comparators • Decoders • Encoders • Multiplexers Available as MSI Circuits and as Standard Cells in VLSI (Bonus Assignment: Get one example of each type of combinational circuits in the CMOS family, 5 points for the second exam)

Analysis Procedure • Given a logical diagram, determine or more of the following: – Boolean functions; – Truth table; – Explanation of circuit operation • Make sure the circuit is combinational, not sequential (No feedback loops)

Analysis Procedure 1. Label all gate outputs that are a function of input variables. Determine the Boolean function for each gate output 2. Label the gates that are a function of input variables and previously labeled gates. Find the Boolean functions for these gates 3. Repeat step 2 until output of circuits are obtained 4. By repeated substitution of previously defined functions, obtain the output Boolean functions in terms of input variables

Analysis Procedure

Analysis Procedure Step 1 Step 2 Steps 3 and 4

Analysis Procedure •

Analysis Procedure

Design Procedure 1. From the specifications of the circuit, determine the required number of inputs and outputs and assign a symbol to each 2. Derive the truth table that defines the required relationship between inputs and outputs 3. Obtain the simplified Boolean functions for each output as a function of the input variables 4. Draw the logical diagram and verify correctness of the design

Code conversion example

Code conversion example

Code conversion example

Code conversion example

Binary Adder-Subtractor Half adder

Half adder

Full adder

Full adder Implementation of full adder in sum-of-products

Full Adder

Full adder Implementation of full adder using two half adders and one or gate

Binary adder

Carry propagation Carry Generate

Carry propagation Carry lookahead generator

Four-bit adder with carry lookahead Carry lookahead generator

Four-bit adder with carry lookahead

Binary subtractor

Overflow • Occurs only when adding two positive numbers or two negative numbers; • Overflow produces change in result sign Example: eight-bit adder Carry bits 0 1 0 +70 0 1000110 -70 1 0111010 +80 0 1010000 -80 1 0110000 +150 1 0010110 -150 0 1101010

Decimal Adder • Consider adding two decimal digits in BCD • Output sum cannot exceed 9+9+1=19 (the last 1 is the carry from previous digit)

Decimal Adder Need correction Carry Condition for correcting result

Decimal Adder

Binary Multiplier Explain how you carried the multiplication out. How many bits at the output?

Binary Multiplier Two-bit multiplier

Binary Multiplier Exercise: With your neighbor classmate discuss its operation.

Magnitude Comparator

Magnitude Comparator Does this circuit correspond to what you wrote down in the exercise? Discuss again with your neighbor classmate the comparison of your result with this circuit.

Decoders Exercise: Minimize the functions for two of the eight output lines.

Decoders Exercise: Compare your function with the circuit. Three-to-eight-line decoder

Decoders 0

Decoders Exercise: Explain how this decoder works.

Combinational logic implementation

Combinational Logic Implementation Compare in terms of propagation time and number of gates this Full Adder with the previously studied implementation.

Encoders

Priority encoder Highest priority Valid output

Priority encoder

Priority encoder

Multiplexers •

Multiplexers Two-to-one-line multiplexer

Multiplexers Four-to-one-line multiplexer

Multiplexers Quadruple two-to-one-line multiplexer

Boolean function implementation •

Boolean function implementation •

Boolean function implementation • Selected input line 0 1 2 3 Implementation of a three-input Boolean function

Boolean function implementation 0 1 2 3 4 5 6 7

Three-state gates

Three-state gates Multiplexers with three-state gates

Homework Assignment • • • 4. 3 4. 9 4. 17 4. 27 4. 33 Using Logic. Works, simulate a 4 -bit full adder with and without carry-lookahead.
- Slides: 56