Reference: Moris Mano 4th Edition Chapter 4

Slides:



Advertisements
Similar presentations
ADDER, HALF ADDER & FULL ADDER
Advertisements

Kuliah Rangkaian Digital Kuliah 7: Unit Aritmatika
Conversion and Coding (12)10.
Combinational Circuits. Analysis Diagram Designing Combinational Circuits In general we have to do following steps: 1. Problem description 2. Input/output.
Design of Arithmetic Circuits – Adders, Subtractors, BCD adders
ENGIN112 L14: Binary Adder Subtractor October 3, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 14 Binary Adders and Subtractors.
Part 2: DESIGN CIRCUIT. LOGIC CIRCUIT DESIGN x y z F F = x + y’z x y z F Truth Table Boolean Function.
Adders, subtractors, ALUs
©2008 The McGraw-Hill Companies, Inc. All rights reserved. Digital Electronics Principles & Applications Seventh Edition Chapter 10 Arithmetic Circuits.
CS 105 Digital Logic Design
Logic Design CS221 1 st Term combinational circuits Cairo University Faculty of Computers and Information.
Combinational Logic Chapter 4.
Combinational Logic. Outline 4.1 Introduction 4.2 Combinational Circuits 4.3 Analysis Procedure 4.4 Design Procedure 4.5 Binary Adder- Subtractor 4.6.
Conversion and Coding (12) 10. Conversion and Coding (12) Conversion.
Figure 5.1. Conversion from decimal to binary.. Table 5.1. Numbers in different systems.
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)
ECE 3110: Introduction to Digital Systems Chapter 6 Combinational Logic Design Practices Adders, subtractors, ALUs.
Boolean Algebra and Logic Gates 1 Computer Engineering (Logic Circuits) Lec. # 8 (Combinational Logic Circuit) Dr. Tamer Samy Gaafar Dept. of Computer.
درس مدارهای منطقی دانشگاه قم مدارهای منطقی محاسباتی تهیه شده توسط حسین امیرخانی مبتنی بر اسلایدهای درس مدارهای منطقی دانشگاه.
CHAPTER 4 Combinational Logic Design- Arithmetic Operation (Section 4.6&4.9)
COE 202: Digital Logic Design Combinational Circuits Part 2 KFUPM Courtesy of Dr. Ahmad Almulhem.
Arithmetic Circuits. Half Adder ABSumCarry
ARITHMETIC MICRO OPERATIONS
1 CS 151: Digital Design Chapter 4: Arithmetic Functions and Circuits 4-1,2: Iterative Combinational Circuits and Binary Adders.
EE2174: Digital Logic and Lab Professor Shiyan Hu Department of Electrical and Computer Engineering Michigan Technological University CHAPTER 8 Arithmetic.
Universal college of engineering & technology. .By Harsh Patel)
Combinational Circuits
CS 105 DIGITAL LOGIC DESIGN Chapter 4 Combinational Logic 1.
Outline Binary Addition 2’s complement Binary Subtraction Half Adder
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.
CEC 220 Digital Circuit Design
CHAPTER 2 Digital Combinational Logic/Arithmetic Circuits
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.
1 Lecture 14 Binary Adders and Subtractors. 2 Overview °Addition and subtraction of binary data is fundamental Need to determine hardware implementation.
ECE DIGITAL LOGIC LECTURE 15: COMBINATIONAL CIRCUITS Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2015, 10/20/2015.
Logic Design (CE1111 ) Lecture 4 (Chapter 4) Combinational Logic Prepared by Dr. Lamiaa Elshenawy 1.
Chapter 6. Digital Arithmetic: Operations and Circuits
Gunjeet Kaur Dronacharya Group of Institutions. Binary Adder-Subtractor A combinational circuit that performs the addition of two bits is called a half.
Presented by A. Maleki Fall Semester, 2010
Chap 3. Combinational Logic Design
Combinational Circuits
Chapter 4 Register Transfer and Microoperations
Digital Arithmetic Wen-Hung Liao, Ph.D..
Combinational Logic Logic circuits for digital systems may be combinational or sequential. A combinational circuit consists of input variables, logic gates,
Combinational Circuits
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.
Digital System Design Review.
Chapter 4 Combinational Logic
Combinational Circuits
CSE Winter 2001 – Arithmetic Unit - 1
HALF ADDER FULL ADDER Half Subtractor.
Instructor: Alexander Stoytchev
Instructor: Alexander Stoytchev
Ch 4. Combinational logic
Number Systems and Circuits for Addition
Unit 5 COMBINATIONAL CIRCUITS-1
Logic Gates.
Adders and Subtractors
Homework Reading Machine Projects Labs
Instructor: Alexander Stoytchev
Combinational Circuits
XOR Function Logic Symbol  Description  Truth Table 
Reference: Moris Mano 4th Edition Chapter 5
LOGIC Circuits.
Arithmetic 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)
Half & Full Subtractor Half Subtractor Full Subtractor.
Half & Full Subtractor Half Subtractor Full Subtractor.
Presentation transcript:

Reference: Moris Mano 4th Edition Chapter 4 Arithmetic Functions Reference: Moris Mano 4th Edition Chapter 4

Arithmetic Functions Binary Addition Binary Multiplication Binary Subtraction BCD Addition

Half Adder Adds two bits only Input Output X Y S C 1

Full Adder Adds three bits only After simplifying Sum-of-Minterms: Input Output X Y Z S C 1 Adds three bits only After simplifying Sum-of-Minterms:

Full Adder Logic Diagram of Full Adder

4-bit Ripple Carry Adder

4-bit Ripple Carry Adder

Binary Multiplier Input Output A B R = A x B 1 R = A AND B

2-bit by 2-bit Multiplier

4-Bit by 3-Bit Binary Multiplier

Binary Adder-Subtractor

Binary Subtraction (+A) – (+B) = (+A) + (-B) (+A) – (-B) = (+A) + (+B) (-A) – (+B) = (-A) + (-B) (-A) – (-B) = (-A) + (+B) Required Actual Operation that we perform Reason?

Binary Subtraction A – B = A + (2’s Complement of B) Arithmetic function which we perform is addition 2’s Complement of B = 1’s Complement of B + 1 A – B = A + (1’s Complement of B + 1)

Implementation of 1’s Complement Y0 A1 Y1 A2 Y2 . An-1 Yn-1

Can we implement NOT operation using XOR? XOR Operation X Y F 1 Can we implement NOT operation using XOR?

XOR Operation X Y F 1

Can we implement 1’s Complement using XOR? XOR Operation X Y F 1 X X’ 1 Can we implement 1’s Complement using XOR?

Implementation of 1’s Complement Y0 A1 Y1 A2 Y2 . An-1 Yn-1

Adder-Subtractor Circuit (if S=0, act like an Adder) 1 1 1 1 1 Selection Input

Adder-Subtractor Circuit (if S=1, act like a subtractor) 1 1 1 1 1 1 1 1 1 Selection Input

Overflow When correct answer contains n+1 bits and we have only n bits to save result

BCD Addition

Binary Coded Decimal (BCD)

(396)10 = (?)BCD ( 3 9 6 )10 =( 0011 1001 0110 )BCD =(001110010110)BCD BCD (Contd.) (396)10 = (?)BCD ( 3 9 6 )10 =( 0011 1001 0110 )BCD =(001110010110)BCD

(110000101)BCD = (?)10 =( 0001 1000 0101 )BCD =( 1 8 5 )10 =(185)10 BCD (Contd.) (110000101)BCD = (?)10 =( 0001 1000 0101 )BCD =( 1 8 5 )10 =(185)10

BCD Adder Z3 Z2 Z1 Z0 C S3 S2 S1 S0 BCD Sum

BCD Adder <..1001..> <..1000..> 1000 +1001 --------- Z3 Z2 Z3 Z2 Z1 Z0 C S3 S2 S1 S0 BCD Sum

BCD Adder 1001 1000 1000 +1001 --------- 10001 1 Z3 Z2 Z1 Z0 0001 C S3 BCD Sum

BCD Adder 1001 1000 1000 +1001 --------- 10001 1 Z3 Z2 Z1 Z0 1 C S3 S2 1 C S3 S2 S1 S0 BCD Sum

BCD Adder 1001 1000 1000 +1001 --------- 10001 1 Z3 Z2 Z1 Z0 Logic to check If binary sum is Greater than 9 (1001) or not If sum is greater Than 9 it will Always produce Carry i.e. (0001 0000)BCD = (10)10 (0001 0001)BCD = (11)10 (0001 0010)BCD = (12)10 C S3 S2 S1 S0 Carry BCD Sum

BCD Adder C is function to check if binary Input Output Z3 Z2 Z1 Z0 C 1 C is function to check if binary sum is greater than 9 (1001) or not If binary sum (Z3Z2Z1Z0) is greater than 9 (1001)  C = 1 Else  C = 0 if binary sum > 1111 i.e. K = 1 (Carry produced in 1st Adder)  C = 1

BCD Adder C = Z3Z2 + Z3Z1 1 1 1 1 1 1 Z1’ Z1 Z1Z0 Z3Z2 00 01 11 10 1 3 1 3 2 4 5 7 6 12 13 15 14 8 9 11 10 00 01 Z2 11 1 1 1 1 Z3 1 1 10 Z0 C = Z3Z2 + Z3Z1

BCD Adder 1001 1000 1000 +1001 --------- 10001 1 Z3 Z2 Z1 Z0 Z3Z2 C = Z3Z2 + Z3Z1 Z3Z1 S3 S2 S1 S0 BCD Sum

BCD Adder 1001 1000 1000 +1001 --------- 10001 1 Z3 Z2 Z1 Z0 Binary Sum is greater than 1111 Z3Z2 C Z3Z2 S3 S2 S1 S0 BCD Sum

BCD Adder 1001 1000 1000 +1001 --------- 10001 1 Z3 Z2 Z1 Z0 C 1 S3 S2 BCD Sum

BCD Adder 1001 1000 1000 +1001 --------- 10001 1 Z3 Z2 Z1 Z0 C 1 11 0110 S3 S2 S1 S0 BCD Sum

BCD Adder 1001 1000 1000 +1001 --------- 10001 0001 +0110 1 Z3 Z2 Z1 S3 S2 S1 S0 BCD Sum

BCD Adder 1001 1000 1000 +1001 --------- 10001 0001 +0110 0111 1 Z3 Z2 S3 S2 S1 S0 0111 BCD Sum

BCD Adder 0100 0100 1 0100 +0100 --------- 1001 1 Z3 Z2 Z1 Z0 C 00 00 0000 1001 S3 S2 S1 S0 1001 BCD Sum

Practice Problems Design a high level logic diagram that executes following piece of code if (X+Y < 10) Z = X +Y+1 else Z= X+Y

Practice Problems Design a high level logic diagram that executes following piece of code F(x,y) = if (3x>4y) 2x+5y Else 2x - y