Simple ALU  Half adder  Full adder  Constructing 4 bits adder  ALU does several operations  General ALU structure  Timing diagram of adder  Overflow.

Slides:



Advertisements
Similar presentations
ADDER, HALF ADDER & FULL ADDER
Advertisements

Combinational Circuits
Combinational Circuits. Analysis Diagram Designing Combinational Circuits In general we have to do following steps: 1. Problem description 2. Input/output.
EET 1131 Unit 7 Arithmetic Operations and Circuits
Mohamed Younis CMCS 411, Computer Architecture 1 CMCS Computer Architecture Lecture 7 Arithmetic Logic Unit February 19,
Cosc 2150: Computer Organization Chapter 3: Boolean Algebra and Digital Logic.
Arithmetic-Logic Units CPSC 321 Computer Architecture Andreas Klappenecker.
Combinational circuits
Part 2: DESIGN CIRCUIT. LOGIC CIRCUIT DESIGN x y z F F = x + y’z x y z F Truth Table Boolean Function.
Computer Science 210 Computer Organization The Arithmetic Logic Unit.
Building Adders & Sub tractors Dr Ahmed Telba. Introducing adder circuits Adder circuits are essential inside microprocessors as part of the ALU, or arithmetic.
CS 105 Digital Logic Design
1 CHAPTER 4: PART I ARITHMETIC FOR COMPUTERS. 2 The MIPS ALU We’ll be working with the MIPS instruction set architecture –similar to other architectures.
Binary Numbers.
Binary Addition CSC 103 September 17, 2007.
Basic Arithmetic (adding and subtracting)
ADDERS Half Adders Recall that the basic rules of binary addition are as indicated below in Table 2-9. A circuit known as the half-adder carries out these.
Topic: Arithmetic Circuits Course: Digital Systems Slide no. 1 Chapter # 5: Arithmetic Circuits.
Basic Arithmetic (adding and subtracting)
Module 9.  Digital logic circuits can be categorized based on the nature of their inputs either: Combinational logic circuit It consists of logic gates.
IKI b-Arithmetic Logic Unit (ALU) Bobby Nazief Semester-I The materials on these slides are adopted from: CS231’s Lecture Notes at UIUC,
Computing Systems Designing a basic ALU.
Computer Science 101 Circuit Design - Examples. Sum of Products Algorithm Identify each row of the output that has a 1. Identify each row of the output.
Arithmetic Logic Unit (ALU) Anna Kurek CS 147 Spring 2008.
1 Lecture 6 BOOLEAN ALGEBRA and GATES Building a 32 bit processor PH 3: B.1-B.5.
CDA 3101 Fall 2013 Introduction to Computer Organization The Arithmetic Logic Unit (ALU) and MIPS ALU Support 20 September 2013.
Lecture 18: Hardware for Arithmetic Today’s topic –Intro to Boolean functions (Continued) –Designing an ALU 1.
Half Adder & Full Adder Patrick Marshall. Intro Adding binary digits Half adder Full adder Parallel adder (ripple carry) Arithmetic overflow.
ARITHMETIC MICRO OPERATIONS
Universal college of engineering & technology. .By Harsh Patel)
1 Ethics of Computing MONT 113G, Spring 2012 Session 5 Binary Addition.
Logic and computers 2/6/12. Binary Arithmetic /6/ Only two digits: the bits 0 and 1 (Think: 0 = F, 1.
The Karnaugh Map.
MIPS ALU. Building from the adder to ALU ALU – Arithmetic Logic Unit, does the major calculations in the computer, including – Add – And – Or – Sub –
Computer Architecture
1 Chapter 4 Combinational Logic Logic circuits for digital systems may be combinational or sequential. A combinational circuit consists of input variables,
CHAPTER 2 Digital Combinational Logic/Arithmetic Circuits
Gates AND, OR, NOT NAND, NOR Combinational logic No memory A set of inputs uniquely and unambiguously specifies.
CPS120: Introduction to Computer Science Computer Math: Addition and Subtraction.
1 Ethics of Computing MONT 113G, Spring 2012 Session 4 Binary Addition.
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.
Discrete Systems I Lecture 10 Adder and ALU Profs. Koike and Yukita.
1 The ALU l ALU includes combinational logic. –Combinational logic  a change in inputs directly causes a change in output, after a characteristic delay.
Explain Half Adder and Full Adder with Truth Table.
Logic Design (CE1111 ) Lecture 4 (Chapter 4) Combinational Logic Prepared by Dr. Lamiaa Elshenawy 1.
Computer Organization CS345 David Monismith Based upon notes by Dr. Bill Siever and notes from the Patterson and Hennessy Text.
ETE 204 – Digital Electronics Combinational Logic Design Single-bit and Multiple-bit Adder Circuits [Lecture: 9] Instructor: Sajib Roy Lecturer, ETE,ULAB.
Combinational Circuits
Prof. Sin-Min Lee Department of Computer Science
Computer Science 210 Computer Organization
Combinational Circuit Design
Combinational Circuits
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.
MIPS ALU.
Computer Science 210 Computer Organization
5. Combinational circuits
MIPS ALU.
Week 7: Gates and Circuits: PART II
COSC 2021: Computer Organization Instructor: Dr. Amir Asif
Number Systems and Circuits for Addition
COMS 361 Computer Organization
Combinational Circuits
XOR Function Logic Symbol  Description  Truth Table 
Adder Circuits By: Asst Lec. Basma Nazar
Half & Full Subtractor Half Subtractor Full Subtractor.
Instruction execution and ALU
Half & Full Subtractor Half Subtractor Full Subtractor.
MIPS ALU.
MIPS ALU.
Presentation transcript:

Simple ALU  Half adder  Full adder  Constructing 4 bits adder  ALU does several operations  General ALU structure  Timing diagram of adder  Overflow logic Texbook P&H. Chapter 4.5

Adding 2 bits A key requirement of digital computers is:  the ability to use logical functions to perform arithmetic operations. We start the construction of ALU from simple 2 bit adder.  To create the 2 bit adder first the truth table for it should be created. We can derive the truth table from below addition table = = = = 10

2 bit adder INPUTSOUTPUTS ABCARRYSUM The Carry output is a simple AND function Sum is an Exclusive-OR. Sum = A’B + AB’ = A  B Carry = AB Thus, we can use two gates to add these two bits together. this circuit is known as a "half adder," because it only does half of the job it must also be able to recognize and include a carry from the next lower order of magnitude this circuit is known as a "half adder," because it only does half of the job it must also be able to recognize and include a carry from the next lower order of magnitude

Full adder. 4 bit pairs full adder. To add two 4-bit numbers to produce a 4-bit sum (with a possible carry), you would need 4 full adders with carry lines cascaded, as shown to the right. Take the possible carry from the next lower order of magnitude, and send a carry to the next higher order of magnitude

3 inputs Full Adder To construct a full adder circuit, we'll need three inputs and two outputs. INPUTSOUTPUTS ABC IN C OUT Sum S = A’B’C in + A’BC in ’ + AB’C in ’ + ABC in = C in (A’B’ + AB) + C in ’ (AB’+ A’B) = C in (A’B’ + AB)’’ + C in ’ (AB’+ A’B) = C in (A  B)’ + C in ’ (A  B) = (A  B)  C in C out = A’BC in + AB’C in + ABC in ’ + ABC in = C in (A’B + AB’) + AB (C in + C in ’) = C in (A’B + AB’) + AB (1) = C in (A  B) + AB

Logical operations of ALU The logical operations are easiest, because they map directly onto the hardware components. The multiplexor selects a AND b or a OR b, depending on whether the value of Operation is 0 or 1. Notice that we have renamed the control and output lines of the multiplexor to give them names that reflect the function of the ALU.

Additional operations of ALU A 1-bit ALU that performs AND, OR, and addition The easiest way to add an operation is to expand the multiplexor controlled by the Operation line

More operations of ALU A 1-bit ALU that performs AND, OR, and addition on a and b or a and b’ By selecting b’ (Binvert = 1) and setting Carry In to 1 in the least significant bit of the ALU, we get two’s complement subtraction of b from a instead of addition of b to a.

General ALU structure

ALU on gates

Overflow detection circuits

Overflow circuit Y=a’bc + ab’c = c (a’b+ab’)