Logic and Computer Design Fundamentals Chapter 3 Combinational Logic Design Part 1- Implementation Technology and Logic Design
Overview Part 1-Implementation Technology and Logic Design Design Concepts Fundamental concepts of Design Procedure The major design steps: specification, formulation, optimization, technology mapping, and verification Technology Mapping From AND, OR, and NOT to other gate types Verification Does the designed circuit meet the specifications? Chapter 3 - Part 1 IT321 2
Overview Part 2 Combinational Logic Rudimentary logic functions Decoding Encoding Selecting Chapter 3 - Part 1 IT321 3
Combinational Circuit A combinational logic circuit has: A set of n Boolean inputs, A set of m Boolean outputs, and Logic gates and interconnections Block Diagram of Combinational Circuit Chapter 3 - Part 1 IT321 4
Combinational Circuit The combinational circuit can be described by: Truth table that lists the output values for each of combination of the input variables m Boolean functions, one for each output variable. Each functioned is expressed as a function of n input variables Chapter 3 - Part 1 IT321 5
Analysing Logic Circuit When a logic circuit is provided, we can analyse the circuit to obtain the logic expression. Example: What is the Boolean expression of F4? A' A'B' B' C A'B'+C (A'B'+C)' F4 F4 = (A'B'+C)' = (A+B).C' Chapter 3 - Part 1 IT321 6
Designing circuits The goal in circuit design is to build hardware that solves some problem. The basic approach is to express the solution as a Boolean function, which can then be converted to a circuit. Chapter 3 - Part 1 IT321 7
Design Procedure 1. Specification make sure you completely understand all the design requirements 2. Formulation Figure out how many inputs and outputs you need. Assign letter symbols to the input and output variables Derive a truth table or initial Boolean equations that define the required relationships between the inputs and outputs. Chapter 3 - Part 1 IT321 8
Design Procedure-continued 3. Optimization Find a simplified Boolean expression for the function. Draw a logic diagram using ANDs, ORs, and inverters Chapter 3 - Part 1 IT321 9
Design Procedure-continued 4. Technology Mapping Map the logic diagram to the implementation technology selected 5. Verification Verify the correctness of the final design Chapter 3 - Part 1 IT321 10
EXAMPLE PROBLEM: Design a combinational circuit with 3 inputs (a, b, c) and 1 output, f such that: f is 1 when all 3 inputs are 1, or f is 1 when a is 1 and either b or c is 1, or f is 1 when all three inputs are 0 Chapter 3 - Part 1 IT321 11
Create a Truth Table List all possible inputs and outputs: F is one when: all three inputs are 1 A is 1 and either B or C is 1 all three inputs are 0 A B C F 0 0 0 1 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 1 1 1 0 1 1 1 1 1 F is zero for all other inputs 1 Chapter 3 - Part 1 IT321 12
SOP Equation Use a Kmap to find the reduced SOP expression B C A 00 01 11 10 0 1 1 1 1 1 = ABC + AC + AB A B C F 0 0 0 1 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 1 1 1 0 1 1 1 1 1 Chapter 3 - Part 1 IT321 13
Circuit F = ABC + AC + AB The final circuit: ABC A B AB C AC Chapter 3 - Part 1 IT321 14
Example: comparing 2-bit numbers Design a circuit that compares two 2-bit numbers, A and B. There are three possible results: A > B, A = B or A < B. Chapter 3 - Part 1 IT321 15
Step 1: How many inputs and outputs? How many inputs and outputs will this circuit have? Two (2-bit numbers) means a total of four inputs. Let s say the first number consists of bits called A1and A0(from left to right), while second number has bits B1and B0. Inputs A and B will be 00, 01, 10, or 11 (0, 1, 2 or 3 in decimal). Chapter 3 - Part 1 IT321 16
Step 1: How many inputs and outputs? (continued) We will represent the results using three separate outputs. G ( Greater ) should be 1 only when A > B. E ( Equal ) should be 1 only when A = B. L ( Lesser ) should be 1 only when A < B. For any inputs A and B, exactly one of the three outputs will be1. Chapter 3 - Part 1 IT321 17
Step 1: How many inputs and outputs? (continued) Here is a block diagram that shows the inputs and outputs explicitly. Now the hard part is to design the circuitry that goes inside the box. Chapter 3 - Part 1 IT321 18
Step 2: Functional specification Chapter 3 - Part 1 IT321 19
Step 3: Simplified Boolean expressions Use K-maps to simplify the circuit. There are three functions (each with the same inputs A1 A0 B1 B0), so we need three K-maps. Chapter 3 - Part 1 IT321 20
Step 3: Simplified Boolean expressions (continued) Chapter 3 - Part 1 IT321 21
Step 4: Drawing the circuits Chapter 3 - Part 1 IT321 22
Mapping to NAND gates The mapping is accomplished by: 1) Replacing AND and OR symbols, 2) Pushing inverters through circuit fan-out points, and 3) Canceling inverter pairs Chapter 3 - Part 1 IT321 23
NAND Mapping Algorithm 1. Replace ANDs and ORs:............ a+b= a. b 2. Repeat the following pair of actions until there is at most one inverter between : a. A circuit input or driving NAND gate output, and b. The attached NAND gate inputs....... Chapter 3 - Part 1 IT321 24
NAND Mapping Example Chapter 3 - Part 1 IT321 25
Mapping to NOR gates The mapping is accomplished by: 1) Replacing AND and OR symbols, 2) Pushing inverters through circuit fan-out points, and 3) Canceling inverter pairs Chapter 3 - Part 1 IT321 26
NOR Mapping Algorithm 1. Replace ANDs and ORs:...... ab= a + b...... 2. Repeat the following pair of actions until there is at most one inverter between : a. A circuit input or driving NOR gate output, and b.the attached NOR gate inputs....... Chapter 3 - Part 1 IT321 27
NOR Mapping Example A B A B C F C 1 X 3 2 F D E (a) A D E (b) B C F D E (c) Chapter 3 - Part 1 IT321 28