SlideShare a Scribd company logo
1 of 13
Arithmetic Logic Unit
ALU
By: Ahmad Yazdankhah
CS 147
Fall 2008
Prof: Dr. Sin-Min Lee
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
Assumptions
You are familiar with:
1.Number representations (1s complement, 2s
comp.)
2.Arithmetic operations (Add, Sub, . . .)
3.Floating Point concept
4.Registers in CPU (Accumulator, Program
Counter, Instruction Register, …)
Review: Bus Concept
Review: CPU Building Blocks
 Registers
(IR, PC, ACC)
 Control Unit
(CU)
 Arithmetic
Logic Unit
(ALU)
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)
What’s ALU?
1. ALU stands for: Arithmetic Logic Unit
2. 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.
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 . . .
Let’s Build a 1-Bit ALU
This 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.
Adding a full adder to our ALU
Building a 1-Bit ALU (cont’d)
A 32-Bit ALU
By paralleling the one-bit ALUs and some other modification on the
logical circuits, we can create bigger ALUs.
Useful Links
• Virginia Tech online courses:
http://courses.cs.vt.edu/~csonline/index.html
• Virginia Tech online Circuit Simulator
http://courses.cs.vt.edu/~csonline/MachineArchitecture/Lessons/C
• Virginia Tech Microprocessor Simulation:
http://courses.cs.vt.edu/~csonline/MachineArchitecture/Less
ons/CPU/sumprogram.html
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

More Related Content

What's hot

Arithmetic logic units
Arithmetic logic unitsArithmetic logic units
Arithmetic logic units
owaisahmad125
 
Computer organization and architecture
Computer organization and architectureComputer organization and architecture
Computer organization and architecture
Subesh Kumar Yadav
 
Alu design-project
Alu design-projectAlu design-project
Alu design-project
alphankg1
 
Computer Architecture and organization
Computer Architecture and organizationComputer Architecture and organization
Computer Architecture and organization
Badrinath Kadam
 
Instruction cycle
Instruction cycleInstruction cycle
Instruction cycle
Kumar
 

What's hot (20)

Arithmetic logic shift unit
Arithmetic logic shift unitArithmetic logic shift unit
Arithmetic logic shift unit
 
Arithmetic logic units
Arithmetic logic unitsArithmetic logic units
Arithmetic logic units
 
Chapter 2: Boolean Algebra and Logic Gates
Chapter 2: Boolean Algebra and Logic GatesChapter 2: Boolean Algebra and Logic Gates
Chapter 2: Boolean Algebra and Logic Gates
 
Computer organization and architecture
Computer organization and architectureComputer organization and architecture
Computer organization and architecture
 
Logic gate
Logic gateLogic gate
Logic gate
 
Alu design-project
Alu design-projectAlu design-project
Alu design-project
 
8086-microprocessor
8086-microprocessor8086-microprocessor
8086-microprocessor
 
Computer Architecture and organization
Computer Architecture and organizationComputer Architecture and organization
Computer Architecture and organization
 
I/O port programming in 8051
I/O port programming in 8051I/O port programming in 8051
I/O port programming in 8051
 
Microprogrammed Control Unit
Microprogrammed Control UnitMicroprogrammed Control Unit
Microprogrammed Control Unit
 
Instruction cycle
Instruction cycleInstruction cycle
Instruction cycle
 
Chapter 1 microprocessor introduction
Chapter 1 microprocessor introductionChapter 1 microprocessor introduction
Chapter 1 microprocessor introduction
 
8085-microprocessor
8085-microprocessor8085-microprocessor
8085-microprocessor
 
Logic gates
Logic gatesLogic gates
Logic gates
 
Logical and shift micro operations
Logical and shift micro operationsLogical and shift micro operations
Logical and shift micro operations
 
Register Reference Instructions | Computer Science
Register Reference Instructions | Computer ScienceRegister Reference Instructions | Computer Science
Register Reference Instructions | Computer Science
 
Combinational circuit
Combinational circuitCombinational circuit
Combinational circuit
 
Computer architecture
Computer architecture Computer architecture
Computer architecture
 
8 Bit ALU
8 Bit ALU8 Bit ALU
8 Bit ALU
 
Instruction cycle presentation
Instruction   cycle presentationInstruction   cycle presentation
Instruction cycle presentation
 

Similar to ALU arithmetic logic unit

Sequential and combinational alu
Sequential and combinational alu Sequential and combinational alu
Sequential and combinational alu
Piyush Rochwani
 
H64CSA_1B_023799_Osama
H64CSA_1B_023799_OsamaH64CSA_1B_023799_Osama
H64CSA_1B_023799_Osama
Osama Azim
 

Similar to ALU arithmetic logic unit (20)

B.tech admission in india
B.tech admission in indiaB.tech admission in india
B.tech admission in india
 
Top schools in india
Top schools in indiaTop schools in india
Top schools in india
 
Top schools in india
Top schools in indiaTop schools in india
Top schools in india
 
Top schools in delhi ncr
Top schools in delhi ncrTop schools in delhi ncr
Top schools in delhi ncr
 
Top schools in delhi ncr
Top schools in delhi ncrTop schools in delhi ncr
Top schools in delhi ncr
 
Sequential and combinational alu
Sequential and combinational alu Sequential and combinational alu
Sequential and combinational alu
 
ALUs Mini Project.pptx
ALUs Mini Project.pptxALUs Mini Project.pptx
ALUs Mini Project.pptx
 
ALUs and HDLs .pptx
ALUs and HDLs .pptxALUs and HDLs .pptx
ALUs and HDLs .pptx
 
PLC-converted.pdf
PLC-converted.pdfPLC-converted.pdf
PLC-converted.pdf
 
Csa chapter 2
Csa  chapter 2Csa  chapter 2
Csa chapter 2
 
Unit 4 - PLC.pptx
Unit 4 - PLC.pptxUnit 4 - PLC.pptx
Unit 4 - PLC.pptx
 
Basic MIPS implementation
Basic MIPS implementationBasic MIPS implementation
Basic MIPS implementation
 
Basic MIPS implementation
Basic MIPS implementationBasic MIPS implementation
Basic MIPS implementation
 
Ch5_MorrisMano.pptx
Ch5_MorrisMano.pptxCh5_MorrisMano.pptx
Ch5_MorrisMano.pptx
 
H64CSA_1B_023799_Osama
H64CSA_1B_023799_OsamaH64CSA_1B_023799_Osama
H64CSA_1B_023799_Osama
 
n5acb0f1c011fb.pdf
n5acb0f1c011fb.pdfn5acb0f1c011fb.pdf
n5acb0f1c011fb.pdf
 
Material Architecture and organization of computer
Material Architecture and organization of computerMaterial Architecture and organization of computer
Material Architecture and organization of computer
 
Computer Organization : CPU, Memory and I/O organization
Computer Organization : CPU, Memory and I/O organizationComputer Organization : CPU, Memory and I/O organization
Computer Organization : CPU, Memory and I/O organization
 
5th unit Microprocessor 8085
5th unit Microprocessor 80855th unit Microprocessor 8085
5th unit Microprocessor 8085
 
Computer Architecture – An Introduction
Computer Architecture – An IntroductionComputer Architecture – An Introduction
Computer Architecture – An Introduction
 

Recently uploaded

Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Dr.Costas Sachpazis
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Christo Ananth
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Christo Ananth
 

Recently uploaded (20)

Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...
 
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01
 
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
 

ALU arithmetic logic unit

  • 1. Arithmetic Logic Unit ALU By: Ahmad Yazdankhah CS 147 Fall 2008 Prof: Dr. Sin-Min Lee
  • 2. 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
  • 3. Assumptions You are familiar with: 1.Number representations (1s complement, 2s comp.) 2.Arithmetic operations (Add, Sub, . . .) 3.Floating Point concept 4.Registers in CPU (Accumulator, Program Counter, Instruction Register, …)
  • 5. Review: CPU Building Blocks  Registers (IR, PC, ACC)  Control Unit (CU)  Arithmetic Logic Unit (ALU)
  • 6. 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)
  • 7. What’s ALU? 1. ALU stands for: Arithmetic Logic Unit 2. 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.
  • 8. 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 . . .
  • 9. Let’s Build a 1-Bit ALU This 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.
  • 10. Adding a full adder to our ALU Building a 1-Bit ALU (cont’d)
  • 11. A 32-Bit ALU By paralleling the one-bit ALUs and some other modification on the logical circuits, we can create bigger ALUs.
  • 12. Useful Links • Virginia Tech online courses: http://courses.cs.vt.edu/~csonline/index.html • Virginia Tech online Circuit Simulator http://courses.cs.vt.edu/~csonline/MachineArchitecture/Lessons/C • Virginia Tech Microprocessor Simulation: http://courses.cs.vt.edu/~csonline/MachineArchitecture/Less ons/CPU/sumprogram.html
  • 13. 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