Arithmetic Logic Units: Understanding ALUs and Their Role in Computer Systems, Study notes of Engineering

An introduction to arithmetic logic units (alus), which are the main computation units in most computer systems. Alus perform various functions such as addition, subtraction, or, and, etc. The document also covers rom-based moore machine timing, the functionality of alu chips, and expanding alus to form larger ones. Students will learn how alus are synchronized with a clock, how to determine alu outputs for given inputs, and how to model control as a state machine.

Typology: Study notes

Pre 2010

Uploaded on 08/18/2009

koofers-user-z32
koofers-user-z32 🇺🇸

10 documents

1 / 16

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
ENGIN112 L33: Arithmetic Logic Units November 21, 2003
ENGIN 112
Intro to Electrical and Computer Engineering
Lecture 33
Arithmetic Logic Unit (ALU)
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff

Partial preview of the text

Download Arithmetic Logic Units: Understanding ALUs and Their Role in Computer Systems and more Study notes Engineering in PDF only on Docsity!

ENGIN 112

Intro to Electrical and Computer Engineering

Lecture 33

Arithmetic Logic Unit (ALU)

Overview

°Main computation unit in most computer systems

°ALUs perform a vaiety of different functions

  • Add, subtract, OR, AND…

°Example: ALU chip (74LS382)

  • Has data and control inputs

°Individual chips can be chained together to make larger

ALUs

°ALUs are important parts of datapaths

  • ROMs often are usd in the control path

°Build a data and control path

Arithmetic Logic Unit

°Arithmetic logic unit

functions

  • Two multi-bit data inputs
  • Function indicates action (e.g. add, subtract, OR… )

°DataOut is same bit

width as multi-bit inputs

(DataA and DataB)

°ALU is combinational

°Conditions indicate

special conditions of

arithmetic activity (e.g.

overflow).

ALU

Function Conditions

DataA DataB

DataOut

Think of ALU as a number of other arithmetic and logic blocks in a single box! Function selects the block

Adder Subtract

… AND

ALU Integrated Circuit

°Integrated circuit –off-the-shelf components

°Examine the functionality of this ALU chip

Performs 8 functions

Expanding the ALU

°Multi-bit ALU created by connecting carry output of

low-order chip to carry in of high order

Eight-bit ALU formed from 2 four-bit ALUs

Datapath components

°Tri-state buffer

°Loadable register

In Out

Enable

If Enable asserted, Out = In Otherwise Out open-circuit

Clk Load

Data stored on rising edge if Load is asserted (e.g. Load = 1)

Using a Datapath

° Consider the following computation steps

  1. ADD A, B and put result in A
  2. Subtract A, B and put result in B
  3. OR A, B put result in A
  • Repeat starting from step 1

Determine values for Function, LoadA, LoadB

Function

LoadA A B LoadB

ALU

Modeling Control as a State Machine

° Consider the following computation steps

  1. ADD A, B and put result in A
  2. Subtract A, B and put result in B
  3. OR A, B put result in A
  • Repeat starting from step 1

Determine values for Function, LoadA, LoadB

S0 S1 S

Model control as a state machine. Determine control outputs for each state

ROM Implementation of State Machine

States S0 = 00 S1 = 01 S2 = 10

Present State Next State Function LoadA LoadB

PS

NS

0101110 1001001 0010110

ROM

Function, LoadA, LoadB

Note: No minimization! One line in ROM for each state

Putting the Control and Datapath Together

PS

NS

0101110 1001001 0010110

ROM

Function

LoadA A B LoadB

ALU

Summary

°ALU circuit can perform many functions

  • Combinational circuit

°ALU chips can be combined together to form larger

ALU chips

  • Remember to connect carry out to carry in

°ALUs form the basis of datapaths

°ROMs can form the basis of control paths

°Combine the two together to build a computing circuit

°Next time: more data and control paths