1 KU College of Engineering Elec 204: Digital Systems Design Lecture 11 Binary Adder/Subtractor.

Slides:



Advertisements
Similar presentations
DIGITAL ELECTRONICS & it0203 Semester - 3
Advertisements

1 KU College of Engineering Elec 204: Digital Systems Design Lecture 9 Programmable Configurations Read Only Memory (ROM) – –a fixed array of AND gates.
A. Abhari CPS2131 Sequential Circuits Most digital systems like digital watches, digital phones, digital computers, digital traffic light controllers and.
1 Fundamentals of Computer Science Sequential Circuits.
Computer Architecture CS 215
1 KU College of Engineering Elec 204: Digital Systems Design Lecture 12 Basic (NAND) S – R Latch “Cross-Coupling” two NAND gates gives the S -R Latch:
Sequential Circuits1 DIGITAL LOGIC DESIGN by Dr. Fenghui Yao Tennessee State University Department of Computer Science Nashville, TN.
SYEN 3330 Digital SystemsJung H. Kim 1 SYEN 3330 Digital Systems Chapter 6 – Part 1.
Module 12.  In Module 9, 10, 11, you have been introduced to examples of combinational logic circuits whereby the outputs are entirely dependent on the.
Overview Part 1 - Storage Elements and Analysis
Overview Part 1 - Storage Elements and Analysis
CPEN Digital System Design Chapter 5 Sequential Circuits Storage Elements and Sequential Circuit Analysis C. Gerousis © Logic and Computer Design.
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 5 – Sequential Circuits Logic and Computer.
Asynchronous Sequential Logic
Circuits require memory to store intermediate data
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 5 – Sequential Circuits Part 1 – Storage.
Sequential Circuit Analysis & Design Dr. Aiman H. El-Maleh Computer Engineering Department King Fahd University of Petroleum & Minerals Dr. Aiman H. El-Maleh.
1. 2 Logic Circuits Sequential Circuits Combinational Circuits Consists of logic gates whose outputs are determined from the current combination of inputs.
Henry Hexmoor1 Chapter 5 Arithmetic Functions Arithmetic functions –Operate on binary vectors –Use the same subfunction in each bit position Can design.
ECE 331 – Digital System Design Introduction to and Analysis of Sequential Logic Circuits (Lecture #20) The slides included herein were taken from the.
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 5 – Sequential Circuits Part 1 – Storage.
Logic and Computer Design Fundamentals Registers and Counters
KU College of Engineering Elec 204: Digital Systems Design
So far, all of the logic circuits we have studied were basically based on the analysis and design of combinational digital circuits. The other major aspect.
Digital Logic Design CHAPTER 5 Sequential Logic. 2 Sequential Circuits Combinational circuits – The outputs are entirely dependent on the current inputs.
CS 105 Digital Logic Design
Lecture 10 Topics: Sequential circuits Basic concepts Clocks
Digital Computer Design Fundamental
Some Useful Circuits Lecture for CPSC 5155 Edward Bosworth, Ph.D. Computer Science Department Columbus State University.
Sequential Circuits. Combinational Circuits + Storage element output depends both on previous state and input Fig. 5-1.
Rabie A. Ramadan Lecture 3
1 Boolean Algebra & Logic Gates. 2 Objectives Understand the relationship between Boolean logic and digital computer circuits. Learn how to design simple.
1 KU College of Engineering Elec 204: Digital Systems Design Lecture 21 Multiplier Example Example: (101 x 011) Base 2 Note that the partial product summation.
Chap 4. Sequential Circuits
Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. Terms of Use (Hyperlinks are active in View Show mode) Terms of Use Logic and Computer Design.
Introduction to State Machine
EE2174: Digital Logic and Lab Professor Shiyan Hu Department of Electrical and Computer Engineering Michigan Technological University CHAPTER 8 Arithmetic.
Sequential Circuit: Analysis BIL- 223 Logic Circuit Design Ege University Department of Computer Engineering.
CS 151: Digital Design Chapter 4: Arithmetic Functions and Circuits
EKT 221 / 4 DIGITAL ELECTRONICS II
CPEN Digital System Design
1 Fundamentals of Computer Science Combinational Circuits.
Synchronous Sequential Logic A digital system has combinational logic as well as sequential logic. The latter includes storage elements. feedback path.
5 Chapter Synchronous Sequential Circuits 1. Logic Circuits- Review 2 Logic Circuits Sequential Circuits Combinational Circuits Consists of logic gates.
Synchronous Sequential Circuits by Dr. Amin Danial Asham.
CS151 Introduction to Digital Design Chapter 5: Sequential Circuits 5-1 : Sequential Circuit Definition 5-2: Latches 1Created by: Ms.Amany AlSaleh.
ECE DIGITAL LOGIC LECTURE 15: COMBINATIONAL CIRCUITS Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2015, 10/20/2015.
Synchronous Sequential Circuits by Dr. Amin Danial Asham.
CENG 241 Digital Design 1 Lecture 7 Amirali Baniasadi
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.
TOPIC : Introduction to Sequential Circuits UNIT 1: Modeling and Simulation Module 4 : Modeling Sequential Circuits.
1. 2 Logic Circuits Sequential Circuits Combinational Circuits Consists of logic gates whose outputs are determined from the current combination of inputs.
Mealy and Moore Machines Lecture 8 Overview Moore Machines Mealy Machines Sequential Circuits.
Overview Part 1 - Storage Elements and Analysis
EKT 221 : Digital 2 COUNTERS.
FIGURE 5.1 Block diagram of sequential circuit
KU College of Engineering Elec 204: Digital Systems Design
Synchronous Sequential Circuits
EKT 121 / 4 DIGITAL ELECTRONICS I
ECE Digital logic Lecture 16: Synchronous Sequential Logic
KU College of Engineering Elec 204: Digital Systems Design
Boolean Algebra and Digital Logic
KU College of Engineering Elec 204: Digital Systems Design
Synchronous Sequential Circuits
CSE 370 – Winter Sequential Logic - 1
KU College of Engineering Elec 204: Digital Systems Design
Sequential Circuit Analysis & Design
Thought of the Day To be what we are, and to become
Binary Adder/Subtractor
Chapter 5 Sequential Circuits.
Presentation transcript:

1 KU College of Engineering Elec 204: Digital Systems Design Lecture 11 Binary Adder/Subtractor

2 KU College of Engineering Elec 204: Digital Systems Design Lecture 11 Overflow When does it occur? How do we detect it? ? ? 10110

3 KU College of Engineering Elec 204: Digital Systems Design Lecture 11 Binary Multiplication The binary digit multiplication table is trivial: This is simply the Boolean AND function. Form larger products the same way we form larger products in base 10. (a × b) b = 0 b = 1 a = a = 1 0 1

4 KU College of Engineering Elec 204: Digital Systems Design Lecture 11 Review - Decimal Example: (237 × 149) 10 Partial products are: 237 × 9, 237 × 40, and 237 × 100 Note that the partial product summation for n digit, base 10 numbers requires adding up to n digits (with carries). Note also n × m digit multiply generates up to an m + n digit result.

5 KU College of Engineering Elec 204: Digital Systems Design Lecture 11 Example: (101 x 011) Base 2 Partial products are: 101 × 1, 101 × 10, and 101 × 000 Note that the partial product summation for n digit, base 2 numbers requires adding up to n digits (with carries) in a column. Note also n × m digit multiply generates up to an m + n digit result (same as decimal). 101 ×

6 KU College of Engineering Elec 204: Digital Systems Design Lecture 11 Multiplier Boolean Equations We can also make an n × m “block” multiplier and use that to form partial products. Example: 2 × 2 – The logic equations for each partial- product binary digit are shown below: We need to "add" the columns to get the product bits P0, P1, P2, and P3. Note that some columns may generate carries. b1b1 b0b0  a1a1 a0a0 (a 0  b1)b1)  b0)b0) + (a 1  b1)b1)  b0)b0) P3P3 P2P2 P1P1 P 0

7 KU College of Engineering Elec 204: Digital Systems Design Lecture 11 Multiplier Arrays Using Adders An implementation of the 2 × 2 multiplier array is shown:

8 KU College of Engineering Elec 204: Digital Systems Design Lecture 11 4-bit by 3-bit multiplier

9 KU College of Engineering Elec 204: Digital Systems Design Lecture 11 Design by Contraction Contraction is a technique for simplifying the logic in a functional block to implement a different function –The new function must be realizable from the original function by applying rudimentary functions to its inputs –Contraction is treated here only for application of 0s and 1s (not for X and X’) –After application of 0s and 1s, equations or the logic diagram are simplified

10 KU College of Engineering Elec 204: Digital Systems Design Lecture 11 Design by Contraction Example: Increment Contraction of a ripple carry adder to incrementer for n = 3 bits –Set B = 001 –The middle cell can be repeated to make an incrementer with n > 3.

11 KU College of Engineering Elec 204: Digital Systems Design Lecture 11 Incrementing & Decrementing Incrementing –Adding a fixed value to an arithmetic variable –Fixed value is often 1, called counting (up) –Examples: A + 1, B + 4 –Functional block is called incrementer Decrementing –Subtracting a fixed value from an arithmetic variable –Fixed value is often 1, called counting (down) –Examples: A  1, B  4 –Functional block is called decrementer

12 KU College of Engineering Elec 204: Digital Systems Design Lecture 11 Introduction to Sequential Circuits A Sequential circuit contains: –Storage elements: Latches or Flip-Flops –Combinatorial Logic: Implements a multiple-output switching function Inputs are signals from the outside. Outputs are signals to the outside. Other inputs, State or Present State, are signals from storage elements. The remaining outputs, Next State are inputs to storage elements. Combina- tional Logic Storage Elements Inputs Outputs State Next State

13 KU College of Engineering Elec 204: Digital Systems Design Lecture 11 Combinatorial Logic – Next state function Next State = f (Inputs, State) – Output function (Mealy) Outputs = g (Inputs, State) – Output function (Moore) Outputs = h (State) Output function type depends on specification and affects the design significantly Combina- tional Logic Storage Elements Inputs Outputs State Next State Introduction to Sequential Circuits

14 KU College of Engineering Elec 204: Digital Systems Design Lecture 11 Types of Sequential Circuits Depends on the times at which: –storage elements observe their inputs, and –storage elements change their state Synchronous –Behavior defined from knowledge of its signals at discrete instances of time –Storage elements observe inputs and can change state only in relation to a timing signal (clock pulses from a clock) Asynchronous –Behavior defined from knowledge of inputs an any instant of time and the order in continuous time in which inputs change –If clock just regarded as another input, all circuits are asynchronous! –Nevertheless, the synchronous abstraction makes complex designs tractable!

15 KU College of Engineering Elec 204: Digital Systems Design Lecture 11 Discrete Event Simulation In order to understand the time behavior of a sequential circuit we use discrete event simulation. Rules: –Gates modeled by an ideal (instantaneous) function and a fixed gate delay –Any change in input values is evaluated to see if it causes a change in output value –Changes in output values are scheduled for the fixed gate delay after the input change –At the time for a scheduled output change, the output value is changed along with any inputs it drives

16 KU College of Engineering Elec 204: Digital Systems Design Lecture 11 Simulated NAND Gate Example: A 2-Input NAND gate with a 0.5 ns. delay: Assume A and B have been 1 for a long time At time t=0, A changes to a 0 at t= 0.8 ns, back to 1. F A B DELAY 0.5 ns. F(Instantaneous)

17 KU College of Engineering Elec 204: Digital Systems Design Lecture 11 Gate Delay Models Suppose gates with delay n ns are represented for n = 0.2 ns, n = 0.4 ns, n = 0.5 ns, respectively:

18 KU College of Engineering Elec 204: Digital Systems Design Lecture 11 Consider a simple 2-input multiplexer: With function: –Y = A for S = 0 –Y = B for S = 1 “Glitch” is due to delay of inverter A S B Y 0.2 Circuit Delay Model A S B Y S

19 KU College of Engineering Elec 204: Digital Systems Design Lecture 11 Storing State What if A con- nected to Y? Circuit becomes: With function: –Y = B for S = 1, and Y(t) dependent on Y(t – 0.9) for S = 0 The simple combinational circuit has now become a sequential circuit because its output is a function of a time sequence of input signals! B S Y S S B Y Y is stored value in shaded area

20 KU College of Engineering Elec 204: Digital Systems Design Lecture 11 Storing State (Continued) Simulation example as input signals change with time. Changes occur every 100 ns, so that the tenths of ns delays are negligible. Y represent the state of the circuit, not just an output. Time

21 KU College of Engineering Elec 204: Digital Systems Design Lecture 11 Storing State (Continued) Suppose we place an inverter in the “feedback path.” The following behavior results: The circuit is said to be unstable. For S = 0, the circuit has become what is called an oscillator. Can be used as crude clock. S B Y

22 KU College of Engineering Elec 204: Digital Systems Design Lecture 11 Basic (NAND) S – R Latch “Cross-Coupling” two NAND gates gives the S -R Latch: Which has the time sequence behavior: S = 0, R = 0 is forbidden as input pattern Q S (set) R (reset) Q 1101Now Q “remembers” Both go high 11??Unstable! Time

23 KU College of Engineering Elec 204: Digital Systems Design Lecture 11 Basic (NOR) S – R Latch Cross-coupling two NOR gates gives the S – R Latch: Which has the time sequence behavior: S (set) R (reset) Q Q