alu arithmetic logic unit
TRANSCRIPT
![Page 1: ALU arithmetic logic unit](https://reader033.vdocument.in/reader033/viewer/2022061405/55d2f5e3bb61ebc0788b466f/html5/thumbnails/1.jpg)
Arithmetic Logic UnitALU
By: Ahmad YazdankhahCS 147
Fall 2008Prof: Dr. Sin-Min Lee
![Page 2: ALU arithmetic logic unit](https://reader033.vdocument.in/reader033/viewer/2022061405/55d2f5e3bb61ebc0788b466f/html5/thumbnails/2.jpg)
Table of Contents
• Assumptions• Review: Bus Concept• Review: CPU Building Block• The Simplest Computer Building Blocks • What’s ALU?• Typical Schematic Symbol of an ALU• Let’s Build a 1-Bit ALU• Useful Links• References
![Page 3: ALU arithmetic logic unit](https://reader033.vdocument.in/reader033/viewer/2022061405/55d2f5e3bb61ebc0788b466f/html5/thumbnails/3.jpg)
Assumptions
You are familiar with:1.Number representations (1s complement, 2s
comp.)2.Arithmetic operations (Add, Sub, . . .)3.Floating Point concept4.Registers in CPU (Accumulator, Program
Counter, Instruction Register, …)
![Page 4: ALU arithmetic logic unit](https://reader033.vdocument.in/reader033/viewer/2022061405/55d2f5e3bb61ebc0788b466f/html5/thumbnails/4.jpg)
Review: Bus Concept
![Page 5: ALU arithmetic logic unit](https://reader033.vdocument.in/reader033/viewer/2022061405/55d2f5e3bb61ebc0788b466f/html5/thumbnails/5.jpg)
Review: CPU Building Blocks
Registers (IR, PC, ACC)
Control Unit(CU)
Arithmetic Logic Unit (ALU)
![Page 6: ALU arithmetic logic unit](https://reader033.vdocument.in/reader033/viewer/2022061405/55d2f5e3bb61ebc0788b466f/html5/thumbnails/6.jpg)
The Simplest Computer Building Blocks
Instruction Register (IR) Program Counter (PC)
Control Unit (CU)
ALU
Accumulator (ACC)
0
1
2
3
4
5
.
CPU RAM
Status Register (FLAG)
![Page 7: ALU arithmetic logic unit](https://reader033.vdocument.in/reader033/viewer/2022061405/55d2f5e3bb61ebc0788b466f/html5/thumbnails/7.jpg)
What’s ALU?
1. ALU stands for: Arithmetic Logic Unit2. ALU is a digital circuit that performs
Arithmetic (Add, Sub, . . .) and Logical (AND, OR, NOT) operations.
3. John Von Neumann proposed the ALU in 1945 when he was working on EDVAC.
![Page 8: ALU arithmetic logic unit](https://reader033.vdocument.in/reader033/viewer/2022061405/55d2f5e3bb61ebc0788b466f/html5/thumbnails/8.jpg)
Typical Schematic Symbol of an ALU
A and B: the inputs to the ALU(aka operands)R: Output or Result F: Code or Instruction from the Control Unit (aka as op-code)D: Output status; it indicates cases such as:•carry-in•carry-out, •overflow, •division-by-zero•And . . .
![Page 9: ALU arithmetic logic unit](https://reader033.vdocument.in/reader033/viewer/2022061405/55d2f5e3bb61ebc0788b466f/html5/thumbnails/9.jpg)
Let’s Build a 1-Bit ALUThis is an one-bit ALU which can do Logical AND and Logical OR operation.
Result = a AND b when operation = 0
Result = a OR b when operation = 1
The operation line is the input of a MUX.
![Page 10: ALU arithmetic logic unit](https://reader033.vdocument.in/reader033/viewer/2022061405/55d2f5e3bb61ebc0788b466f/html5/thumbnails/10.jpg)
Adding a full adder to our ALU
Building a 1-Bit ALU (cont’d)
![Page 11: ALU arithmetic logic unit](https://reader033.vdocument.in/reader033/viewer/2022061405/55d2f5e3bb61ebc0788b466f/html5/thumbnails/11.jpg)
A 32-Bit ALUBy paralleling the one-bit ALUs and some other modification on the
logical circuits, we can create bigger ALUs.
![Page 12: ALU arithmetic logic unit](https://reader033.vdocument.in/reader033/viewer/2022061405/55d2f5e3bb61ebc0788b466f/html5/thumbnails/12.jpg)
Useful Links
• Virginia Tech online courses:http://courses.cs.vt.edu/~csonline/index.html
• Virginia Tech online Circuit Simulatorhttp://courses.cs.vt.edu/~csonline/MachineArchitecture/Lessons/Circuits/simcir_frame.html
• Virginia Tech Microprocessor Simulation:http://courses.cs.vt.edu/~csonline/MachineArchitecture/Lessons/CPU/sumprogram.html
![Page 13: ALU arithmetic logic unit](https://reader033.vdocument.in/reader033/viewer/2022061405/55d2f5e3bb61ebc0788b466f/html5/thumbnails/13.jpg)
References:
• Text book: Computer System Architecture (By: Rob Williams, 2nd Edition, Prentice Hall, 2006)
• Site Wikipedia: http://en.wikipedia.org/wiki/Arithmetic_logic_unit
• Previous Student Lectures:(By: Anna Kurek, Spring 2008)
• Professor’s Lecture Notes.• Virginia Tech online courses:
http://courses.cs.vt.edu/~csonline/index.html