Multiple function unit design

Slides:



Advertisements
Similar presentations
Combinational Circuits. Analysis Diagram Designing Combinational Circuits In general we have to do following steps: 1. Problem description 2. Input/output.
Advertisements

DPSD This PPT Credits to : Ms. Elakya - AP / ECE.
1 ALUs. 2 Topics: ALU Overview - core of the integer datapath - 2 operands, 32-bits wide, plus control signals Exercise: A simple multiplier.
Part 2: DESIGN CIRCUIT. LOGIC CIRCUIT DESIGN x y z F F = x + y’z x y z F Truth Table Boolean Function.
Logic Gates Combinational Circuits
Adders, subtractors, ALUs
CS 105 Digital Logic Design
CS1Q Computer Systems Lecture 9 Simon Gay. Lecture 9CS1Q Computer Systems - Simon Gay2 Addition We want to be able to do arithmetic on computers and therefore.
ECE 3110: Introduction to Digital Systems Chapter 6 Combinational Logic Design Practices Adders, subtractors, ALUs.
ECEN 248 Lab 4: Multiplexer Based Arithmetic Logic Unit
Morgan Kaufmann Publishers
A four function ALU A 00 ADD B MUX SUB 11 Result AND OR
1 Understand the examples again Overflow –When two positive numbers added together or a negative number subtracted from a positive number yields negative.
CS 151: Digital Design Chapter 4: Arithmetic Functions and Circuits
COMBINATIONAL LOGIC.
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.
Multiplexors Decoders  Decoders are used for forming separate signals for different combination of input signals.  The multiplexer circuit is a digital.
Number Representation (Part 2) Computer Architecture (Fall 2006)
1 Ethics of Computing MONT 113G, Spring 2012 Session 4 Binary Addition.
Simple ALU  Half adder  Full adder  Constructing 4 bits adder  ALU does several operations  General ALU structure  Timing diagram of adder  Overflow.
MicroProcessors Lec. 4 Dr. Tamer Samy Gaafar. Course Web Page —
President UniversityErwin SitompulDigital Systems 7/1 Lecture 7 Digital Systems Dr.-Ing. Erwin Sitompul President University
Gunjeet Kaur Dronacharya Group of Institutions. Binary Adder-Subtractor A combinational circuit that performs the addition of two bits is called a half.
Combinational Circuits
ECE 3130 Digital Electronics and Design
Exclusive OR Gate.
Digital Systems Section 8 Multiplexers. Digital Systems Section 8 Multiplexers.
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.
XOR, XNOR, and Binary Adders
FUNCTION OF COMBINATIONAL LOGIC CIRCUIT
MIPS ALU.
Instructor: Alexander Stoytchev
Computer Organization and Design Arithmetic & Logic Circuits
ECE 331 – Digital System Design
CSE Winter 2001 – Arithmetic Unit - 1
Computer Organization and Design Arithmetic & Logic Circuits
HALF ADDER FULL ADDER Half Subtractor.
XOR, XNOR, & Binary Adders
MIPS ALU.
Enemies make you stronger, allies make you weaker. Frank Herbert
EEL 3705 / 3705L Digital Logic Design
Week 7: Gates and Circuits: PART II
COSC 2021: Computer Organization Instructor: Dr. Amir Asif
Digital Systems Section 12 Binary Adders. Digital Systems Section 12 Binary Adders.
Logic Gates.
Adders and Subtractors
Overview Part 1 – Design Procedure Part 2 – Combinational Logic
COMS 361 Computer Organization
2’s Complement form 1’s complement form 2’s complement form
Instructor: Alexander Stoytchev
Instructor: Alexander Stoytchev
Logic Circuits I Lecture 3.
Instructor: Alexander Stoytchev
XOR, XNOR, and Binary Adders
ECE 352 Digital System Fundamentals
Combinational Circuits
Chapter-4 Combinational Logic
ECE 352 Digital System Fundamentals
XOR Function Logic Symbol  Description  Truth Table 
Computer Organization and Design 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)
XOR, XNOR, and Binary Adders
Arithmetic Circuits.
Half & Full Subtractor Half Subtractor Full Subtractor.
2's Complement Arithmetic
Half & Full Subtractor Half Subtractor Full Subtractor.
MIPS ALU.
MIPS ALU.
Arithmetic and Logic Circuits
Presentation transcript:

Multiple function unit design We want to design a unit that can do more than one function In that case, we can design a function unit for each operation like add, sub, and, or…. And then select the desired output For example, if we want to be able to perform ADD and SUB on two given operand A and B and select any one on demand Then the following set up will work ADD A B SUB MUX Select Result

Design of a SUB unit a b w r An n-bit subtract unit can be designed in the same way as an n-bit adder One bit subtract unit: It has two inputs a and b (b is subtracted from a) and a borrow (w) in case the previous stage had one It produces an output (result) and a borrow (cascading output) Borrow from one stage is fed from a stage to the next stage Truth table is shown An n-bit subtract circuit is shown 1-bit sub a b w r

Simplifying ADD/SUB unit design Separate ADD and SUB units are expensive We can simplify the design SUB is same as adding negation of B to A How to negate? Take one’s complement and add 1 Adding one is also expensive It needs an n-bit adder However, we only need to add two bits in each stage In the first stage we need to add 1’s complement of first bit and 1 In other stages, we need to a carry output to 1’s complement of bit We select B or negative of B depending on the requirement We add A to the selected input to obtain the result

Alternate ADD/SUB unit design 2’s complement generation of B is expensive For subtract, we can take 1’s complement of B and add it to A Then we need to add 1 to the result This can be achieved by adding 1 as input carry to n-bit adder For Add operation, we simply add B to A with carry = 0 Signal ADD/SUB = 0 for Add and 1 for Sub The block diagram is shown below MUX and inverter can be replaced by XOR of b and ADD/SUB 1-bit add a b c s MUX ADD/SUB 1