Logic Gates Logic gates are electronic digital circuit perform logic functions. Commonly expected logic functions are already having the corresponding.

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

Combinational Circuits. Analysis Diagram Designing Combinational Circuits In general we have to do following steps: 1. Problem description 2. Input/output.
Comparator.
DPSD This PPT Credits to : Ms. Elakya - AP / ECE.
ECE 331 – Digital System Design
CSE-221 Digital Logic Design (DLD)
08/07/041 CSE-221 Digital Logic Design (DLD) Lecture-8:
Design of Arithmetic Circuits – Adders, Subtractors, BCD adders
Combinational Logic1 DIGITAL LOGIC DESIGN by Dr. Fenghui Yao Tennessee State University Department of Computer Science Nashville, TN.
ECE 301 – Digital Electronics
ECE 301 – Digital Electronics
Part 2: DESIGN CIRCUIT. LOGIC CIRCUIT DESIGN x y z F F = x + y’z x y z F Truth Table Boolean Function.
Chapter 7 Arithmetic Operations and Circuits Hexadecimal Arithmetic 4 binary bits represent a single hexadecimal digit Addition –Add the digits.
Logic Gates Combinational Circuits
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.
Logic Design CS221 1 st Term combinational circuits Cairo University Faculty of Computers and Information.
Binary Numbers.
Outline Analysis of Combinational Circuits Signed Number Arithmetic
Dr. Ahmed El-Bialy, Dr. Sahar Fawzy Combinational Circuits Dr. Ahmed El-Bialy Dr. Sahar Fawzy.
+ CS 325: CS Hardware and Software Organization and Architecture Combinational Circuits 1.
Eng. Mohammed Timraz Electronics & Communication Engineer University of Palestine Faculty of Engineering and Urban planning Software Engineering Department.
ADDERS Half Adders Recall that the basic rules of binary addition are as indicated below in Table 2-9. A circuit known as the half-adder carries out these.
IKI a-Combinatorial Components Bobby Nazief Semester-I The materials on these slides are adopted from those in CS231’s Lecture Notes.
F = ∑m(1,4,5,6,7) F = A’B’C+ (AB’C’+AB’C) + (ABC’+ABC) Use X’ + X = 1.
1 The Chinese University of Hong Kong Faculty of Education Diploma in Education (Part-Time) Winter 1997 Educational Communications and Technology Assignment.
WEEK #10 FUNCTIONS OF COMBINATIONAL LOGIC (ADDERS)
1 © 2015 B. Wilkinson Modification date: January 1, 2015 Designing combinational circuits Logic circuits whose outputs are dependent upon the values placed.
Module 9.  Digital logic circuits can be categorized based on the nature of their inputs either: Combinational logic circuit It consists of logic gates.
Digital Electronics Lecture 6 Combinational Logic Circuit Design.
Lecture 9 Topics: –Combinational circuits Basic concepts Examples of typical combinational circuits –Half-adder –Full-adder –Ripple-Carry adder –Decoder.
CHAPTER 4 Combinational Logic
درس مدارهای منطقی دانشگاه قم مدارهای منطقی محاسباتی تهیه شده توسط حسین امیرخانی مبتنی بر اسلایدهای درس مدارهای منطقی دانشگاه.
4. Computer Maths and Logic 4.2 Boolean Logic Logic Circuits.
Digital Logic. 2 Abstractions in CS (gates) Basic Gate: Inverter IO IO GNDI O Vcc Resister (limits conductivity) Truth Table.
1 Lecture 6 BOOLEAN ALGEBRA and GATES Building a 32 bit processor PH 3: B.1-B.5.
Half Adder & Full Adder Patrick Marshall. Intro Adding binary digits Half adder Full adder Parallel adder (ripple carry) Arithmetic overflow.
1 CS 151: Digital Design Chapter 4: Arithmetic Functions and Circuits 4-1,2: Iterative Combinational Circuits and Binary Adders.
CS221: Digital Logic Design Combinational Circuits
CS 105 DIGITAL LOGIC DESIGN Chapter 4 Combinational Logic 1.
1 KU College of Engineering Elec 204: Digital Systems Design Lecture 10 Multiplexers MUX: –Selects binary information from one of many input lines and.
1 Chapter 4 Combinational Logic Logic circuits for digital systems may be combinational or sequential. A combinational circuit consists of input variables,
Logic Design CS221 1 st Term combinational circuits Cairo University Faculty of Computers and Information.
Karnaugh Map and Circuit Design.
Combinational Circuits
CPEN Digital System Design
Addition and multiplication Arithmetic is the most basic thing you can do with a computer, but it’s not as easy as you might expect! These next few lectures.
1 Lecture 14 Binary Adders and Subtractors. 2 Overview °Addition and subtraction of binary data is fundamental Need to determine hardware implementation.
BOOLEAN ALGEBRA LOGIC GATES. Introduction British mathematician George Boole( ) was successful in finding the link between logic and mathematics.
ECE DIGITAL LOGIC LECTURE 15: COMBINATIONAL CIRCUITS Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2015, 10/20/2015.
CS151 Introduction to Digital Design Chapter 4: Arithmetic Functions and HDLs 4-1: Iterative Combinational Circuits 4-2: Binary Adders 1Created by: Ms.Amany.
WORKING PRINCIPLE OF DIGITAL LOGIC
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.
ETE 204 – Digital Electronics Combinational Logic Design Single-bit and Multiple-bit Adder Circuits [Lecture: 9] Instructor: Sajib Roy Lecturer, ETE,ULAB.
Gunjeet Kaur Dronacharya Group of Institutions. Binary Adder-Subtractor A combinational circuit that performs the addition of two bits is called a half.
Dr.Ahmed Bayoumi Dr.Shady Elmashad
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.
ECE 331 – Digital System Design
FIGURE 4.1 Block diagram of combinational circuit
Boolean Algebra.
Week 7: Gates and Circuits: PART II
Digital Logic.
Logic Gates.
Chapter 10.3 and 10.4: Combinatorial Circuits
XOR, XNOR, and Binary Adders
Chapter-4 Combinational Logic
XOR Function Logic Symbol  Description  Truth Table 
Adder Circuits By: Asst Lec. Basma Nazar
Presentation transcript:

Logic Gates Logic gates are electronic digital circuit perform logic functions. Commonly expected logic functions are already having the corresponding logic circuits in Integrated Circuit (I.C.) form.

Design of Circuit Procedures 1. Obtain a precise circuit specification Obtain a precise circuit specification 2. Development of a truth table Development of a truth table 3. Identifying the minterms corresponding to each row in the table. Identifying the minterms corresponding to each row in the table. 4. Drawing Karnaugh maps Drawing Karnaugh maps 5. Forming groups of 1's on the Karnough map Forming groups of 1's on the Karnough map 6. Writing the reduced expression Writing the reduced expression 7. Converting the reduced expression into a realizable expression Converting the reduced expression into a realizable expression 8. Drawing the circuit diagram Drawing the circuit diagram 9. Construct and test a prototype circuit. Construct and test a prototype circuit.

Types of Logic Gates

Basic Gates AND, OR, NOT

AND Gate The AND gate implements the Boolean AND function where the output only is logical 1 when all inputs are logical 1. The standard symbol and the truth tabel for a two input AND gate is:

Boolean expression of AND The Boolean expression for the AND gate is R=A.B ABR

OR Gate The OR gate implements the Boolean OR function where the output is logical 1 when just input is logical 1. The standard symbol and the truth table for a two input OR gate is:

Boolean Expression of OR ABR The Boolean expression for the OR gate is: R=A+B

NOT Gate The NOT gate implements the Boolean NOT function where the output is the inverse of the input. The standard symbol and the truth table for the NOT gate is:

Boolean Expression of NOT The Boolean expression for the NOT gate is: R=-A AR 01 00

Derived Gates NAND, NOR, XOR

NAND Gate The NAND gate is an AND gate followed by a NOT gate. The output is logical 1 when one of the inputs are logical 0 The standard symbol and the truth table for the NAND gate is:

Boolean expression of NAND ABR

NOR Gate The NOR is a combination of an OR followed by a NOT gate. The output is logical 1 when non of the inputs are logical 0 The standard symbol and the truth table for the NOR gate is:

Boolean Expression of NOR ABR

XOR Gate The XOR gate produces a logic 1 output only if its two inputs are different. If the inputs are the same, the output is a logic 0 The XOR symbol is a variation on the standard OR symbol. It consists of a plus (+) sign with a circle around it. The logic symbol, as shown here, is a variation on the standard OR symbol.

Exercise 1

De-Morgan ’ s Theorem and Logic Conversion 1) 2) 3) 4)

Implement the logic expression using NAND gates only 1) 2)

Implement logic expression using NOR gates only 1)

Revision Exercise d/TestCourses/logic/logic-intro.html d/TestCourses/logic/logic-intro.html /demos.html /demos.html boolalg/gate.html boolalg/gate.html e/start.htm e/start.htm

Combinational Logic Designs A combinational logic circuit can be described by the block schematic shown Each output is a function of some or all of the input variables, Hence O 1 =f(I 1,I 2,....,I n ) O 2 =f(I 1,I 2, …,I n )... andO n =f(I 1,I 2, …,I n ) :::: :::: Combinational Logic I1I1 InIn O1O1 OnOn

Half Adder

What is a Half adder? Logic gate that perform addition for 1- bit When occurs, a carry produce 1

Half Adder Perform arithmetic additions two inputs A, B to half-adder. Resultants are Sum(S) and Carry(C out ) Using K-Map to simplify the sum term, we get H.A A BC out S

Full Adder

What is Full Adder? A full adder is a circuit that computes the sum of three bits and gives a two-bit answer. A circuit for adding two 16-bit numbers can be built from 16 full-adder circuits. Each full- adder does one column of the sum. The full adder for a given column adds two bits from the input numbers together with a one-bit carry from the previous column to the right. The adder produces a two-bit answer; one of these bits is used as a carry into the next column.

Full Adder A full adder has 3 inputs and 2 outputs The truth table of the full-adder can be drawn with inputs A,B and Cin with outputs S and Cout From the truth table we can write the Boolean equation for the S and Cout Simplify using Boolean Algebra and K-map, we get

Sum = Any 2 of the three inputs are 1 Cout = XOR between A, B, Cin ABCinSumCout

Full Adder diagram

Half Subtractor

What is a Half Subtractor A logic gate that perform 1 bit subtraction When 0-1 occurs, a carry produces 1

Half Subtractor CABD A 0 B 0 D 0 C

Half Subtractor Operation: A - B

Full Subtractor

What is a Full Subtraction? Logic gates that perform two bits subtraction

Full Subtractor C i A i B i D i C i CiCi AiBiAiBi DiDi D i = C i $ (A i $ B i ) Same as S i in full adder

Full Subtractor C i A i B i D i C i+1 CiCi AiBiAiBi C i+1 C i+1 = !A i & B i # C i & !A i & !B i # C i & A i & B i

Full Subtractor C i+1 = !A i & B i # C i & !A i & !B i # C i & A i & B i C i+1 = !A i & B i # C i & (!A i & !B i # A i & B i ) C i+1 = !A i & B i # C i & !(A i $ B i ) Recall: D i = C i $ (A i $ B i ) C i+1 = !A i & B i # C i & !(A i $ B i )

Full Subtractor D i = C i $ (A i $ B i ) C i+1 = !A i & B i # C i & !(A i $ B i ) half subtractor

Full Subtractor Operation: A - B - B in

Adder/Subtractor - 1 A 0 B 0 D 0 C 1 A 0 B 0 S 0 C 1 Half adder Half subtractor E = 0: Half adder E = 1: Half subtractor

Adder/Subtractor-1 i+1 E = 0: Full adder E = 1: Full subtractor

C i A i B i S i C i C i A i B i S i C i+1 Full Adder Reordered Full Adder C i A i B i D i C i+1 Full Subtractor NOT

Making a full subtractor from a full adder

Four-Bit Parallel Adder This circuit is sometimes referred to as a ripple- through adder C0 ripples through four two-level logic circuits and hence the sum cannot be completed until eight gate delays For this kind of adder, the maximum delay is directly proportional to the number of stages n.

Adder/Subtractor-2 E = 0: 4-bit adder E = 1: 4-bit subtractor

Carry Look-Ahead Circuit To improve the speed of addition Consider the carry output equation for a full adder is Which can be expressed as follows or as where

Carry Look-Ahead Circuit Four a four-bit adder the generate and propagate terms for each stage are while the carries for the various stages are

Carry Look-Ahead Circuit Substituting for C 0 in the C 1 equation etc leads to the following equations: And the sum Since the number of levels of logic required when a large number of bits has to be added does not increase then the Carry Look-Ahead adder will provide a faster addition time

Binary Multiplication Paper and Pen method which is implemented using 9 AND gates, 3 FA and 3 HA