Combinational Circuits

Slides:



Advertisements
Similar presentations
Cs 1110 Ch 4-1 Combinational Logic. ° Introduction Logic circuits for digital systems may be: °2°2 combinational sequential OR A combinational circuit.
Advertisements

COE 202: Digital Logic Design Combinational Circuits Part 1
1 Combinational Logic Design&Analysis. 2 Introduction We have learned all the prerequisite material: – Truth tables and Boolean expressions describe functions.
Combinational Circuits. Analysis Diagram Designing Combinational Circuits In general we have to do following steps: 1. Problem description 2. Input/output.
DPSD This PPT Credits to : Ms. Elakya - AP / ECE.
08/07/041 CSE-221 Digital Logic Design (DLD) Lecture-8:
Section 10.3 Logic Gates.
COE 202: Digital Logic Design Combinational Circuits Part 1
Combinational Logic Design
Part 2: DESIGN CIRCUIT. LOGIC CIRCUIT DESIGN x y z F F = x + y’z x y z F Truth Table Boolean Function.
CS 105 Digital Logic Design
Digital Logic Lecture 08 By Amr Al-Awamry. Combinational Logic 1 A combinational circuit consists of an interconnection of logic gates. Combinational.
Morgan Kaufmann Publishers
Combinational Logic Design CS341 Digital Logic and Computer Organization F2003.
Outline Analysis of Combinational Circuits Signed Number Arithmetic
Sahar Mosleh PageCalifornia State University San Marcos 1 Multiplexer, Decoder and Circuit Designing.
Chap 3. Chap 3. Combinational Logic Design. Chap Combinational Circuits l logic circuits for digital systems: combinational vs sequential l Combinational.
Module 9.  Digital logic circuits can be categorized based on the nature of their inputs either: Combinational logic circuit It consists of logic gates.
Ahmad Almulhem, KFUPM 2009 COE 202: Digital Logic Design Combinational Logic Part 2 Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office:
Logic Gates Logic gates are electronic digital circuit perform logic functions. Commonly expected logic functions are already having the corresponding.
COE 202: Digital Logic Design Combinational Circuits Part 2 KFUPM Courtesy of Dr. Ahmad Almulhem.
Logic Design CS 270: Mathematical Foundations of Computer Science Jeremy Johnson.
1 Lecture 6 BOOLEAN ALGEBRA and GATES Building a 32 bit processor PH 3: B.1-B.5.
Sneha.  A combinational circuit that performs the addition of two bits is called a half adder.  It has two inputs.  It has two outputs.
Digital Logic Design (CSNB163)
CS 105 DIGITAL LOGIC DESIGN Chapter 4 Combinational Logic 1.
1 Chapter 4 Combinational Logic Logic circuits for digital systems may be combinational or sequential. A combinational circuit consists of input variables,
1 CS 151: Digital Design Chapter 3: Combinational Logic Design 3-1Design Procedure CS 151: Digital Design.
CS151 Introduction to Digital Design Chapter 3: Combinational Logic Design 3-1 Design Procedure 1Created by: Ms.Amany AlSaleh.
Logic Design CS221 1 st Term combinational circuits Cairo University Faculty of Computers and Information.
Karnaugh Map and Circuit Design.
Combinational Circuits
COMBINATIONAL LOGIC.
Combinational Logic Design. 2 Combinational Circuits A combinational logic circuit has: ♦ A set of m Boolean inputs, ♦ A set of n Boolean outputs ♦ n.
Chapter 3 Digital Logic Structures
4–1. BSCS 5 th Semester Introduction Logic diagram: a graphical representation of a circuit –Each type of gate is represented by a specific graphical.
C OMBINATIONAL L OGIC D ESIGN 1 Eng.Maha AlGubali.
LOGIC CIRCUITLOGIC CIRCUIT. Goal To understand how digital a computer can work, at the lowest level. To understand what is possible and the limitations.
Logic Design (CE1111 ) Lecture 4 (Chapter 4) Combinational Logic Prepared by Dr. Lamiaa Elshenawy 1.
Combinational Logic Design. 2 Combinational Circuits A combinational logic circuit has: ♦ A set of m Boolean inputs, ♦ A set of n Boolean outputs ♦ n.
Gunjeet Kaur Dronacharya Group of Institutions. Binary Adder-Subtractor A combinational circuit that performs the addition of two bits is called a half.
Combinational Design, Part 2: Procedure. 2 Topics Positive vs. negative logic Design procedure.
Lecture 1 Gunjeet kaur Dronacharya group of institutions.
CS151 Introduction to Digital Design Chapter 3: Combinational Logic Design 3-4 Verification 1Created by: Ms.Amany AlSaleh.
Mantıksal Tasarım – BBM231 M. Önder Efe
Dr.Ahmed Bayoumi Dr.Shady Elmashad
Chap 3. Combinational Logic Design
Combinational Logic Design&Analysis.
CS 105 Digital Logic Design
Part 4 Combinational Logic.
Combinational Logic Logic circuits for digital systems may be combinational or sequential. A combinational circuit consists of input variables, logic gates,
Combinational Circuit Design
Combinational Circuits
Computer Architecture CST 250
Summary Half-Adder Basic rules of binary addition are performed by a half adder, which has two binary inputs (A and B) and two binary outputs (Carry out.
HALF ADDER FULL ADDER Half Subtractor.
Week 7: Gates and Circuits: PART II
Digital Logic.
Ch 4. Combinational logic
Unit 5 COMBINATIONAL CIRCUITS-1
Logic Gates.
Adders and Subtractors
Digital Logic.
Combinational Circuits
Chapter-4 Combinational Logic
XOR Function Logic Symbol  Description  Truth Table 
Overview of Digital Electronics
Arithmetic Circuits.
Half & Full Subtractor Half Subtractor Full Subtractor.
Half & Full Subtractor Half Subtractor Full Subtractor.
Presentation transcript:

Combinational Circuits Dr. Ahmad Almulhem Dr Khaled Mostafa Presented by Dr Emad Nabil Lec8

Objectives Types of Logic Circuits Designing Combinational Circuits Sequential Designing Combinational Circuits Procedure Examples Arithmetic Circuits Half Adder Full Adder Binary Subtractor/Adder Ahmad Almulhem, KFUPM 2010

Combinational Circuits Two classes of logic circuits: Combinational Circuits Sequential Circuits A Combinational circuit consists of logic gates Output depends only on input A Sequential circuit consists of logic gates and memory Output depends on current inputs and previous ones (stored in memory) Memory defines the state of the circuit. Ahmad Almulhem, KFUPM 2010

Combinational Circuits n inputs m outputs A combinational circuit has: n Boolean inputs (1 or more), m Boolean outputs (1 or more) logic gates mapping the inputs to the outputs Ahmad Almulhem, KFUPM 2010

Designing Combinational Circuits How to design a combinational circuit? Use all the information and tools you learned Binary system, Boolean Algebra, K-Maps, etc. Follow the step-by-step procedure given next Ahmad Almulhem, KFUPM 2010

Design Procedure Specification Formulation Optimization Write a specification for the circuit if one is not already available Specify/Label input and output Formulation Derive a truth table or initial Boolean equations that define the required relationships between the inputs and outputs, if not in the specification Apply hierarchical design if appropriate Optimization Apply 2-level and multiple-level optimization (Boolean Algebra, K-Map, software) Draw a logic diagram for the resulting circuit using ANDs, ORs, and inverters Technology Mapping Map the logic diagram to the implementation technology selected (e.g. map into NANDs) Verification Verify the correctness of the final design manually or using simulation programs (such as Atanua and DigitalWorks) Practical Considerations: Cost of gates (Number) Maximum allowed delay Fanin (Num. of Inputs to a gate) Fanout (Num. of gates the output is connected to) Ahmad Almulhem, KFUPM 2010

Example 1 Question: Design a circuit that has a 3-bit input and a single output (F) specified as follows: F = 0, when the input is less than (5)10 F = 1, otherwise Solution: Step 1 (Specification): Label the inputs (3 bits) as X, Y, Z X is the most significant bit, Z is the least significant bit The output (1 bit) is F: F = 1  (101)2, (110)2, (111)2 F = 0  other inputs Ahmad Almulhem, KFUPM 2010

AND-OR => NAND-NAND Example 1 (cont.) Step 2 (Formulation) Obtain Truth table Step 3 (Optimization) X YZ 1 00 01 11 10 0 0 0 0 0 1 1 1 X Y Z F 1 F = XZ + XY Circuit Diagram AND-OR => NAND-NAND X Z Y F Ahmad Almulhem, KFUPM 2010

Example 2- Adder Design an Adder for 1-bit numbers? 1. Specification: 2 inputs (X,Y) 2 outputs (C,S) 2. Formulation: 3. Optimization/Circuit X Y C S 1

Example 2- Half Adder (H.A.) This adder is called a Half Adder Q: Why? Because it can’t add a 3rd bit (a carry) from a previous addition operation X Y C S 1

Example 3- Full Adder (F.A.) A combinational circuit that adds 3 input bits to generate a Sum bit and a Carry bit X Y Z C S 1 X YZ 1 00 01 11 10 0 1 0 1 1 0 1 0 Sum S = X’Y’Z + X’YZ’ + XY’Z’ +XYZ = X  Y  Z 0 0 1 0 0 1 1 1 X YZ 1 00 01 11 10 Carry C = XY + YZ + XZ

Full Adder C=C0+C1 S0 _______ Z + S1 C C0 X Y + ______ S0 C0 X + C1

Full Adder = 2 Half Adders By Truth Table: Direct Full Adder X Y Z C0 S0 C1 S1 1 X Y Z C S 1

Full Adder = 2 Half Adders Sum and Carry Equations: From Direct Full Adder: S = X  Y  Z C = XY + XZ + YZ By Manipulating the Equations From 2 Half Adders: S = ( X  Y )  Z C = XY + Z(X  Y)

Full Adder = 2 Half Adders Sum and Carry Equations: From Direct Full Adder: S = X  Y  Z C = XY + XZ + YZ By Manipulating the Equations From 2 Half Adders: S = ( X  Y )  Z C = XY + Z(X  Y)

Full Adder = 2 Half Adders From Direct Full Adder: S = X  Y  Z C = XY + XZ + YZ From 2 Half Adders: S = ( X  Y )  Z C = XY + Z(X  Y) The Proof.. C = XY + XZ + YZ = XY + XZ(Y+Y’) + YZ(X+X’) = XY + XYZ+XZY’ + XYZ+YZX’ = XY + XYZ+XZY’ + YZX’ = XY( 1 + Z) + Z(XY’ + X’Y) = XY + Z(X  Y ) Remember : (X Y )= xy’ +x’y

Example 4- binary subtractor using 2’s Complement How the 2’s complement is calculated? Get 1’s complement, then add 1 => Use Not gates, and input 1 as carry in to the first adder!

Subtraction using 2’s Complement Example: 9 -3 00001001 - 00000011 00001001 + 1’s (11111100) + 1 0 0 0 0 1 0 0 1 2’s (1 1 1 1 1 1 0 1) ------------------------------- 1 0 0 0 0 0 1 1 0 +

Subtraction (2’s Complement) Two’s complement = one’s complement +1 S = A-B=A + ( -B)= A+B’+1 1 Ahmad Almulhem, KFUPM 2010

Example 5 -Adder/Subtractor How to build a circuit that performs both addition and subtraction? => Use XOR instead of NOT When X = 0, the output is Y When X = 1, the output is Y’ X Y Z=XY 1

Using full adders and XOR we can build an Adder/Subtractor! Ahmad Almulhem, KFUPM 2010

Conclusion There are two types of logic circuits Design Procedure Combinational Sequential Design Procedure Specification * Formulation * Optimization * Technology Mapping Verification Examples Ahmad Almulhem, KFUPM 2010