Chapter 4: Arithmetic for Computers Part 2 - PowerPoint PPT Presentation

About This Presentation
Title:

Chapter 4: Arithmetic for Computers Part 2

Description:

For the adder, let's minimize the logic using a Karnaugh Map... There's no way to minimize this equation, so we need the full sum of products: ... – PowerPoint PPT presentation

Number of Views:37
Avg rating:3.0/5.0
Slides: 8
Provided by: admi49
Learn more at: https://www.cse.sc.edu
Category:

less

Transcript and Presenter's Notes

Title: Chapter 4: Arithmetic for Computers Part 2


1
Chapter 4 Arithmetic for Computers(Part 2)
  • CS 447
  • Jason Bakos

2
Logic/Arithmetic
  • From the truth table for the mux, we can use
    sum-of-products to derive the logic equation
  • With sum-of-products, for each 1 row for each
    output, we AND together all the inputs (inverting
    the input 0s), then OR all the row products
  • To make it simpler, lets add dont cares to
    the table

3
Logic/Arithmetic
  • This gives us the following equation
  • (A and (not D)) or (B and D)
  • We dont need the inputs for the dont cares in
    our partial products
  • This is one way to simplify our logic equation
  • Other ways include propositional calculus,
    Karnaugh Maps, and the Quine-McCluskey algorithm

4
Logic/Arithmetic
  • Here is a (crude) digital logic design for the
    2-to-1 mux
  • Note that multiple muxes can be assembled in
    stages to implement multiple-input muxes

5
Logic/Arithmetic
  • For the adder, lets minimize the logic using a
    Karnaugh Map
  • For CarryOut, we need 23 entries
  • We can minimize this to
  • CarryOutABCarryInBCarryInC

6
Logic/Arithmetic
  • Theres no way to minimize this equation, so we
    need the full sum of products
  • Sum(not A)(not B)CarryIn ABCarryIn (not
    A)BCarryIn A(not B)CarryIn

7
Logic/Arithmetic
  • In order to implement subtraction, we can invert
    the B input to the adder and set CarryIn to be 1
  • This can be implemented with a mux select B or
    not B (call this input Binvert)
  • Now we can build a 1-bit ALU using an AND, OR,
    addition, and subtraction operation
  • We can perform the AND, OR, and ADD in parallel
    and switch the results with a 4-input mux
    (Operation will be our D-input)
  • To make the adder a subtractor, well need to
    have to set Binvert and CarryIn to 1
Write a Comment
User Comments (0)
About PowerShow.com