2-input AND/OR/XOR gates Inverters 2:1 MUX

Slides:



Advertisements
Similar presentations
ES 112 Project 2 bit ALU.
Advertisements

1 Register Transfer &  -operations Computer Organization Computer Architectures Lab REGISTER TRANSFER AND MICROOPERATIONS Register Transfer Language Register.
COE 202: Digital Logic Design Signed Numbers
1 ALUs. 2 Topics: ALU Overview - core of the integer datapath - 2 operands, 32-bits wide, plus control signals Exercise: A simple multiplier.
Henry Hexmoor1 Chapter 5 Arithmetic Functions Arithmetic functions –Operate on binary vectors –Use the same subfunction in each bit position Can design.
Arithmetic CPSC 321 Computer Architecture Andreas Klappenecker.
Chapter 6 Arithmetic. Addition Carry in Carry out
Cpe 252: Computer Organization1 Lo’ai Tawalbeh Lecture #4 Register Transfer and Microoperations 23/2/2006 Chapter 4:
Homework Reading Machine Projects Labs
Overview Iterative combinational circuits Binary adders
Chapter 5 Arithmetic Logic Functions. Page 2 This Chapter..  We will be looking at multi-valued arithmetic and logic functions  Bitwise AND, OR, EXOR,
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 4 – Arithmetic Functions Logic and Computer.
L23 – Arithmetic Logic Units. Arithmetic Logic Units (ALU)  Modern ALU design  ALU is heart of datapath  Ref: text Unit 15 9/2/2012 – ECE 3561 Lect.
Computer Science 210 Computer Organization The Arithmetic Logic Unit.
Homework 2 Due 28 th May Implement This Function using 1)a 3-to-8 Line Decoder (with OR gates) 2) a 3-to-8 Line Active Low Decoder (with NAND gates)
 To add numbers in scientific notation: 1) Add the constants 2) Keep the exponent the same  Example: (2.1 x 10 5 ) + (3.2 x 10 5 ) = ( ) x 10.
Computer System Configuration and Function Computer Architecture and Design Lecture 6.
Dr. Ahmed El-Bialy, Dr. Sahar Fawzy Combinational Circuits Dr. Ahmed El-Bialy Dr. Sahar Fawzy.
Computer Organization & Programming Chapter4 Combinatorial Components.
Chapter 6-1 ALU, Adder and Subtractor
Chapter 4 Register Transfer and Micro -operations
Topic: Arithmetic Circuits Course: Digital Systems Slide no. 1 Chapter # 5: Arithmetic Circuits.
1 Microprocessor-based systems Course 2 General structure of a computer.
ECEN 248 Lab 4: Multiplexer Based Arithmetic Logic Unit
Computer Architecture, The Arithmetic/Logic UnitSlide 1 Part III The Arithmetic/Logic Unit.
1 Chapter Four Register Transfer and Micro operations.
Number Systems Revision of conversations What is a register Addition Complementation.
Divide. Evaluate power – 3 = – 3 EXAMPLE – 3 = 3 2 – – 3 = 6 – 3 Multiply. Evaluate expressions Multiply and divide from.
PROPERTIES OF EXPONENTS

Outline Binary Addition 2’s complement Binary Subtraction Half Adder
CS 151: Digital Design Chapter 4: Arithmetic Functions and Circuits
CPEN Digital System Design
Other Arithmetic Functions Section 4-5
Addition, Subtraction, Logic Operations and ALU Design
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.
Registers and Binary Arithmetic Prof. Sirer CS 316 Cornell University.
CSC321 Homework Due Due Tuesday after spring break Turn in –Design information State diagram State table K-map simplifications and expressions for flip-flop.
Chapter 4 Register Transfer and Microoperations Dr. Bernard Chen Ph.D. University of Central Arkansas Spring 2010.
I’m Thinking of a Number
CHAPTER 4 Negative Numbers. ADDITION AND SUBTRACTION USING NEGATIVE NUMBERS A number line is very useful when you have to do additions or subtractions.
Mehmet Can Vuran, Instructor University of Nebraska-Lincoln Acknowledgement: Schematics adapted from those provided by the authors Hennessey and Patterson.
1 Lecture 14 Binary Adders and Subtractors. 2 Overview °Addition and subtraction of binary data is fundamental Need to determine hardware implementation.
MIPS ALU. Exercise – Design a selector? I need a circuit that takes two input bits, a and b, and a selector bit s. The function is that if s=0, f=a. if.
ECEG-3202: Computer Architecture and Organization, Dept of ECE, AAU 1 Register Transfer & Microoperations.
Solving 2 step equations. Two step equations have addition or subtraction and multiply or divide 3x + 1 = 10 3x + 1 = 10 4y + 2 = 10 4y + 2 = 10 2b +
B0110 ALU ENGR xD52 Eric VanWyk Fall Today Back to Gates! Review Timing with Adders Compare Growth Characteristics Construct Adder/Subtractor Construct.
1 Computer Architecture & Assembly Language Spring 2009 Dr. Richard Spillman Lecture 11 – ALU Design.
REGISTER TRANSFER AND MICROOPERATIONS
REGISTER TRANSFER AND MICROOPERATIONS
Computer Science 210 Computer Organization
More Devices: Control (Making Choices)
CSCI206 - Computer Organization & Programming
Register Transfer and Microoperations
Computer Science 210 Computer Organization
Computer Organization and Design
CSCI206 - Computer Organization & Programming
HALF ADDER FULL ADDER Half Subtractor.
Arithmetic Circuits (Part I) Randy H
Enemies make you stronger, allies make you weaker. Frank Herbert
EEL 3705 / 3705L Digital Logic Design
Perform Function Operations and Composition
By: A. H. Abdul Hafez CAO, by Dr. A.H. Abdul Hafez, CE Dept. HKU
To get y, multiply x by 3 then add 2 To get y, multiply x by negative ½ then add 2 To get y, multiply x by 2 then subtract 3 To get y, multiply x.
Homework Reading Machine Projects Labs
Central Processing Unit
Divide the number in C by 10.
MIPS ALU.
MIPS ALU.
Today Binary addition Representing negative numbers 2.
Presentation transcript:

2-input AND/OR/XOR gates Inverters 2:1 MUX Design a 4-bit ALU that implements the following set of operations with only the following components (assume 2’s complement number representation, no need to implement overflow circuit) 1-bit Full-Adders (FA) 2-input AND/OR/XOR gates Inverters 2:1 MUX M2 M1 M0 Function Name F = Add A + B 1 Subtract A – B 1 Increment A + 1 1 1 Decrement A – 1 1 Multiply by 2 A * 2 1 1 Divide by 2 A / 2 1 1 Bitwise-AND A AND B 1 1 1 Bitwise-OR A OR B

M2 M1 M0 Function Name F = Add A + B 1 Subtract A – B 1 Increment A + 1 1 1 Decrement A – 1 1 Multiply by 2 A * 2 1 1 Divide by 2 A / 2 1 1 Bitwise-AND A AND B 1 1 1 Bitwise-OR A OR B

M2 M1 M0 Function Name F = Add A + B 1 Subtract A – B 1 Increment Add A + B 1 Subtract A – B 1 Increment A + 1 1 1 Decrement A – 1 1 Multiply by 2 A * 2 1 1 Divide by 2 A / 2 1 1 Bitwise-AND A AND B 1 1 1 Bitwise-OR A OR B 0 1 MUX M2 Fi

M2 M1 M0 Function Name F = Add A + B 1 Subtract A – B 1 Increment Add A + B 1 Subtract A – B 1 Increment A + 1 1 1 Decrement A – 1 1 Multiply by 2 A * 2 1 1 Divide by 2 A / 2 1 1 Bitwise-AND A AND B 1 1 1 Bitwise-OR A OR B A * 2 = left-shift e.g. 3 * 2 = “011” * 2 = “110” = 6 A / 2 = right-shift e.g. 3 / 2 = “011” / 2 = “001” = 1 0 1 MUX M1 0 1 MUX M2 Fi

M2 M1 M0 Function Name F = Add A + B 1 Subtract A – B 1 Increment Add A + B 1 Subtract A – B 1 Increment A + 1 1 1 Decrement A – 1 1 Multiply by 2 A * 2 1 1 Divide by 2 A / 2 1 1 Bitwise-AND A AND B 1 1 1 Bitwise-OR A OR B Ai-1 Ai+1 A * 2 = left-shift e.g. 3 * 2 = “011” * 2 = “110” = 6 0 1 MUX M0 A / 2 = right-shift e.g. 3 / 2 = “011” / 2 = “001” = 1 0 1 MUX M1 0 1 MUX M2 Fi

M2 M1 M0 Function Name F = Add A + B 1 Subtract A – B 1 Increment Add A + B 1 Subtract A – B 1 Increment A + 1 1 1 Decrement A – 1 1 Multiply by 2 A * 2 1 1 Divide by 2 A / 2 Ai Bi Ai Bi 1 1 Bitwise-AND A AND B 1 1 1 Bitwise-OR A OR B Ai-1 Ai+1 0 1 MUX 0 1 MUX M0 M0 0 1 MUX M1 0 1 MUX M2 Fi

M2 M1 M0 Function Name F = Add A + B 1 Subtract A – B 1 Increment Add A + B 1 Subtract A – B 1 Increment A + 1 1 1 Decrement A – 1 1 Multiply by 2 A * 2 1 1 Divide by 2 A / 2 Ai Bi Ai Bi 1 1 Bitwise-AND A AND B 1 1 1 Bitwise-OR A OR B Ai-1 Ai+1 0 1 MUX 0 1 MUX M0 M0 0 1 MUX M1 0 1 MUX M2 Fi

M2 M1 M0 Function Name F = Add A + B 1 Subtract A – B 1 Increment Add A + B 1 Subtract A – B 1 Increment A + 1 1 1 Decrement A – 1 1 Multiply by 2 A * 2 1 1 Divide by 2 A / 2 Ai Bi Ai Bi 1 1 Bitwise-AND A AND B 1 1 1 Bitwise-OR A OR B Ai-1 Ai+1 0 1 MUX 0 1 MUX M0 M0 Ai 0 1 MUX M1 FA Ci+1 Ci 0 1 MUX M2 Fi

M2 M1 M0 Function Name F = C0 Add A + B Bi 1 Subtract A – B NOT(Bi) 1 Add A + B Bi 1 Subtract A – B NOT(Bi) 1 1 Increment A + 1 “0” 1 1 1 Decrement A – 1 “1” 1 Multiply by 2 A * 2 1 1 Divide by 2 A / 2 Ai Bi Ai Bi 1 1 Bitwise-AND A AND B 1 1 1 Bitwise-OR A OR B Ai-1 Ai+1 0 1 MUX 0 1 MUX M0 M0 Ai 0 1 MUX M1 FA Ci+1 Ci 0 1 MUX M2 Fi

M2 M1 M0 Function Name F = C0 Add A + B Bi 1 Subtract A – B NOT(Bi) 1 Add A + B Bi 1 Subtract A – B NOT(Bi) 1 1 Increment A + 1 “0” 1 1 1 Decrement A – 1 “1” 1 Multiply by 2 A * 2 1 1 Divide by 2 A / 2 Ai Bi Ai Bi 1 1 Bitwise-AND A AND B 1 1 1 Bitwise-OR A OR B Ai-1 Ai+1 Bi M0 0 1 MUX 0 1 MUX M0 M0 Ai 0 1 MUX M1 0 1 MUX M1 FA Ci+1 Ci 0 1 MUX M2 Fi

M2 M1 M0 Function Name F = C0 Add A + B Bi 1 Subtract A – B NOT(Bi) 1 Add A + B Bi 1 Subtract A – B NOT(Bi) 1 1 Increment A + 1 “0” 1 1 1 Decrement A – 1 “1” 1 Multiply by 2 A * 2 1 1 Divide by 2 A / 2 Ai Bi Ai Bi 1 1 Bitwise-AND A AND B 1 1 1 Bitwise-OR A OR B Ai-1 Ai+1 Bi M0 0 1 MUX 0 1 MUX M0 M0 Ai 0 1 MUX M1 0 1 MUX M1 FA Ci+1 Ci 0 1 MUX M2 Fi

M2 M1 M0 Function Name F = C0 Add A + B Bi 1 Subtract A – B NOT(Bi) 1 Add A + B Bi 1 Subtract A – B NOT(Bi) 1 1 Increment A + 1 “0” 1 1 1 Decrement A – 1 “1” 1 Multiply by 2 A * 2 1 1 Divide by 2 A / 2 Ai Bi Ai Bi 1 1 Bitwise-AND A AND B 1 1 1 Bitwise-OR A OR B Ai-1 Ai+1 Bi M0 0 1 MUX 0 1 MUX M0 M0 M0 Ai 0 1 MUX M1 0 1 MUX M1 FA Ci+1 Ci 0 1 MUX M2 Fi

M2 M1 M0 Function Name F = C0 Add A + B Bi 1 Subtract A – B NOT(Bi) 1 Add A + B Bi 1 Subtract A – B NOT(Bi) 1 1 Increment A + 1 “0” 1 1 1 Decrement A – 1 “1” 1 Multiply by 2 A * 2 1 1 Divide by 2 A / 2 Ai Bi Ai Bi 1 1 Bitwise-AND A AND B 1 1 1 Bitwise-OR A OR B Ai-1 Ai+1 Bi M0 0 1 MUX 0 1 MUX M0 M0 M0 Ai 0 1 MUX M1 0 1 MUX M1 FA Ci+1 Ci 0 1 MUX M2 Fi

M1 M0 M2 M1 M0 Function Name F = C0 Add A + B Bi 1 Subtract A – B Add A + B Bi 1 Subtract A – B NOT(Bi) 1 1 Increment A + 1 “0” 1 1 1 Decrement A – 1 “1” C0 1 Multiply by 2 A * 2 1 1 Divide by 2 A / 2 Ai Bi Ai Bi 1 1 Bitwise-AND A AND B 1 1 1 Bitwise-OR A OR B Ai-1 Ai+1 Bi M0 0 1 MUX 0 1 MUX M0 M0 M0 Ai 0 1 MUX M1 0 1 MUX M1 FA Ci+1 Ci 0 1 MUX M2 Fi

M1 M0 M2 M1 M0 Function Name F = C0 1 1 Ai Bi Ai Bi 1 1 Ai-1 Ai+1 Bi C0 1 1 Ai Bi Ai Bi 1 1 Ai-1 Ai+1 Bi M0 0 1 MUX 0 1 MUX M0 M0 M0 Ai 0 1 MUX M1 0 1 MUX M1 FA Ci+1 Ci 0 1 MUX M2 Fi

M1 M0 M2 M1 M0 Function Name F = C0 1 1 Ai Bi Ai Bi 1 1 Bitwise-AND C0 1 1 Ai Bi Ai Bi 1 1 Bitwise-AND A AND B 1 1 1 Bitwise-OR A OR B Ai-1 Ai+1 Bi M0 0 1 MUX 0 1 MUX M0 M0 M0 Ai 0 1 MUX M1 0 1 MUX M1 FA Ci+1 Ci 0 1 MUX M2 Fi

M1 M0 M2 M1 M0 Function Name F = C0 1 1 Multiply by 2 A * 2 1 1 C0 1 1 Multiply by 2 A * 2 1 1 Divide by 2 A / 2 Ai Bi Ai Bi 1 1 Ai-1 Ai+1 Bi M0 0 1 MUX 0 1 MUX M0 M0 M0 Ai 0 1 MUX M1 0 1 MUX M1 FA Ci+1 Ci 0 1 MUX M2 Fi