Adders and Subtractors

Slides:



Advertisements
Similar presentations
Kuliah Rangkaian Digital Kuliah 7: Unit Aritmatika
Advertisements

Digital Circuits. Review – Getting the truth table The first step in designing a digital circuit usually is to get the truth table. That is, for every.
Cs 1110 Ch 4-1 Combinational Logic. ° Introduction Logic circuits for digital systems may be: °2°2 combinational sequential OR A combinational circuit.
Combinational Circuits. Analysis Diagram Designing Combinational Circuits In general we have to do following steps: 1. Problem description 2. Input/output.
التصميم المنطقي Second Course
Combinational circuits
Part 2: DESIGN CIRCUIT. LOGIC CIRCUIT DESIGN x y z F F = x + y’z x y z F Truth Table Boolean Function.
©2008 The McGraw-Hill Companies, Inc. All rights reserved. Digital Electronics Principles & Applications Seventh Edition Chapter 10 Arithmetic Circuits.
CS 105 Digital Logic Design
Outline Analysis of Combinational Circuits Signed Number Arithmetic
Chapter 3.5 Logic Circuits. How does Boolean algebra relate to computer circuits? Data is stored and manipulated in a computer as a binary number. Individual.
Chapter 3 Combinational Design Digital Logic Design III
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.
Discrete Mathematics CS 2610 February 19, Logic Gates: the basic elements of circuits Electronic circuits consist of so-called gates connected.
1 Adders & Subtractors Adders –An adder is a combinational logic circuit that performs the addition of 2 binary numbers (A & B) to generate the sum (S)
Chapter 10 (Part 2): Boolean Algebra  Logic Gates (10.3) (cont.)  Minimization of Circuits (10.4)
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.
Universal college of engineering & technology. .By Harsh Patel)
1 Ethics of Computing MONT 113G, Spring 2012 Session 5 Binary Addition.
Sneha.  A combinational circuit that performs the addition of two bits is called a half adder.  It has two inputs.  It has two outputs.
ECE 320 Homework #4 1. Using 8 data input selector logic (MUX), implement the following two functions: a) F(A,B,C)=S 0 S 2 S 3 S 5 b) F(A,B,C,D)=P 0 +P.
Simple ALU  Half adder  Full adder  Constructing 4 bits adder  ALU does several operations  General ALU structure  Timing diagram of adder  Overflow.
Explain Half Adder and Full Adder with Truth Table.
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.
Gunjeet Kaur Dronacharya Group of Institutions. Binary Adder-Subtractor A combinational circuit that performs the addition of two bits is called a half.
Logic Gates Learning Objectives Learn that there is a one-to-one relationship between logic gates and Boolean expressions Learn how logic gates are combined.
Combinational Circuits
Combinational Circuits
CS2100 Computer Organisation
Multiplexer.
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
Gate-level Design: Full Adder
Reference: Moris Mano 4th Edition Chapter 4
Principles & Applications
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.
XOR, XNOR, and Binary Adders
Combinational Circuits
CSE Winter 2001 – Arithmetic Unit - 1
FIGURE 4.1 Block diagram of combinational circuit
XOR, XNOR, & Binary Adders
ELL100: INTRODUCTION TO ELECTRICAL ENGG.
Week 7: Gates and Circuits: PART II
Digital Logic.
Number Systems and Circuits for Addition
Unit 5 COMBINATIONAL CIRCUITS-1
By: A. H. Abdul Hafez CAO, by Dr. A.H. Abdul Hafez, CE Dept. HKU
Digital System Design Combinational Logic
Digital Logic.
DIGITAL ELECTRONICS B.SC FY
Chapter 10.3 and 10.4: Combinatorial Circuits
Multiple function unit design
XOR, XNOR, and Binary Adders
Combinational Circuits
Chapter-4 Combinational Logic
XOR Function Logic Symbol  Description  Truth Table 
Adder Circuits By: Asst Lec. Basma Nazar
Digital Circuits.
Adder and Subtractors Discussion D4.1. Adder and Subtractor Circuits Objective: (i) To construct half and full adder circuit and verify its working (ii)
XOR, XNOR, and Binary Adders
Half & Full Subtractor Half Subtractor Full Subtractor.
Chapter 11 (Part 2): Boolean Algebra
Half & Full Subtractor Half Subtractor Full Subtractor.
Unit IV Adders Subtractors Flip Flops Counters Multiplexes and De multiplexes. Integrated circuits-Op. amp – Characteristics Inverting amplifier - Non-inverting.
Presentation transcript:

Adders and Subtractors Week 7 Adders and Subtractors M. Ammad uddin

Half Adder Half Adder: is a combinational circuit that performs the addition of two bits, this circuit needs two binary inputs and two binary outputs.

Binary Addition by Hand

Adding Two Bits

Adder Design an Adder for 1-bit numbers? 1. Specification: 2 inputs (X,Y) 2 outputs (C,S)

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

Adder Design an Adder for 1-bit numbers? 1. Specification: 3. Optimization/Circuit 2 inputs (X,Y) 2 outputs (C,S) 2. Formulation: X Y C S 1 From the equation it is clear that this 1-bit adder can be easily implemented with the help of EXOR Gate for the output ‘SUM’ and an AND Gate for the carry.

Half Adder This adder is called a Half Adder Q: Why? X Y C S 1

Full Adder A combinational circuit that adds 3 input bits to generate a Sum bit and a Carry bit X Y Z C S 1

Full Adder A combinational circuit that adds 3 input bits to generate a Sum bit and a Carry bit X Y Z C S 1

Full Adder = 2 Half Adders Manipulating the Equations: S = X  Y  Z C = XY + XZ + YZ We can see that the output S is an EXOR between the input A and the half-adder SUM output with B and CIN inputs. We must also note that the COUT will only be true if any of the two inputs out of the three are HIGH. Thus, we can implement a full adder circuit with the help of two half adder circuits. The first will half adder will be used to add A and B to produce a partial Sum. The second half adder logic can be used to add CIN to the Sum produced by the first half adder to get the final S output. If any of the half adder logic produces a carry, there will be an output carry. Thus, COUT will be an OR function of the half-adder Carry outputs. Take a look at the implementation of the full adder circuit shown below.

Full Adder = 2 Half Adders Manipulating the Equations: S = ( X  Y )  Z C = XY + XZ + YZ = XY + XYZ + XY’Z + X’YZ + XYZ = XY( 1 + Z) + Z(XY’ + X’Y) = XY + Z(X  Y )

Full Adder = 2 Half Adders Manipulating the Equations: S = ( X  Y )  Z C = XY + XZ + YZ = XY + Z(X  Y ) Think of Z as a carry in Src: Mano’s Book

Subtractor Subtractor : Subtractor is the one which used to subtract two binary number and provides Difference and Borrower as a output. Basically we have two types of subtractor. Half Subtractor Full Subtractor

Subtractor The arithmetic operation, subtraction of two binary digits has four possible elementary operations, namely, 0 - 0 = 0 0 - 1 = 1 (with 1 borrow) 1 - 0 = 1 1 - 1 = 0

Half Subtractor Half Subtractor :Half Subtractor is used for subtracting one single bit binary number from another single bit binary number(in general, subtraction of 2 bits). The truth table of Half Subtractor is shown below. Like Adders, here also equation of Difference and Borrow is calculated Difference = A'B+AB'=A B Borrow=A'B

Half Subtractor As we know, So, the Circuit Diagram using Karnaugh map is shown here While, the Logic Diagram of Half Subtractor is Difference = A'B+AB'=A B Borrow=A'B

Full Subtractor Full Subtractor : A logic Circuit Which is used for Subtracting Three Single bit Binary numbers is known as Full Subtractor. The Truth Table of Full Subtractor is Shown Below. A full subtractor circuit can be implemented with two half subtractors and one OR gate.

Full Subtractor… Truth Table Explanation Note: Borrow is set when the answer is negative Difference is set when the magnitude of the difference is 1. as 0 - 0 - 1 = -1 D=1, B=1 0 - 1 - 0 = -1 0 - 1 - 1 = -2 D=0, B=1 1 - 0 - 0 = 1 D=1, B=0 00 difference is 0 10 difference is a positive 1 11 difference is a negative 1 01 difference is negative 2 The only time you can get a 0 for difference and a 1 for borrow is when your answer is -2.

Full Subtractor Using Karnaugh maps the reduced expression for the output bits can be obtained as (Circuit diagram of Difference) Difference=A'B'C+A'BC'+AB'C'+ABC Reduce it like adder Then We got Difference=A B C Borrow=A'B'C+A'BC'+A'BC+ABC =A'B'C+A'BC'+A'BC+A'BC+A'BC+ABC    ---------->  A'BC=A'BC+A'BC+A'BC =A'C(B'+B)+A'B(C'+C)+BC(A'+A)

Full Subtractor Using Karnaugh maps the reduced expression for the output bits can be obtained as (Circuit diagram of Borrow) Borrow=A'C+A'B+BC While, the logic diagram of Full subtractor is here (2-half-sub and one OR gate)