SlideShare a Scribd company logo
By: Ahmad Yazdankhah
CS 147
Fall 2008
Prof: Dr. Sin-Min Lee
 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
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, …)
 Registers
(IR, PC, ACC)
 Control Unit
(CU)
 Arithmetic
Logic Unit
(ALU)
Instruction Register (IR) Program Counter (PC)
Control Unit
(CU)
ALU
Accumulator (ACC)
0
1
2
3
4
5
.
CPU RAM
Status Register (FLAG)
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 . . .
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
By paralleling the one-bit ALUs and some other modification on the
logical circuits, we can create bigger ALUs.
 Virginia Tech online courses:
http://courses.cs.vt.edu/~csonline/index.html
 Virginia Tech online Circuit Simulator
http://courses.cs.vt.edu/~csonline/MachineArchitecture/L
 Virginia Tech Microprocessor Simulation:
http://courses.cs.vt.edu/~csonline/MachineArchitect
ure/Lessons/CPU/sumprogram.html
 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 shift unit
Arithmetic logic shift unitArithmetic logic shift unit
Arithmetic logic shift unit
rishi ram khanal
 
8086 micro processor
8086 micro processor8086 micro processor
8086 micro processor
Poojith Chowdhary
 
instruction cycle ppt
instruction cycle pptinstruction cycle ppt
instruction cycle ppt
sheetal singh
 
Signed Addition And Subtraction
Signed Addition And SubtractionSigned Addition And Subtraction
Signed Addition And Subtraction
Keyur Vadodariya
 
Input output interface
Input output interfaceInput output interface
Input output interface
Christ University
 
Encoder & Decoder
Encoder & DecoderEncoder & Decoder
Encoder & Decoder
Syed Saeed
 
Decoders-Digital Electronics
Decoders-Digital ElectronicsDecoders-Digital Electronics
Decoders-Digital Electronics
Paurav Shah
 
Computer Organization and Architecture.
Computer Organization and Architecture.Computer Organization and Architecture.
Computer Organization and Architecture.
CS_GDRCST
 
Register organization, stack
Register organization, stackRegister organization, stack
Register organization, stack
Asif Iqbal
 
Logic Gates
Logic GatesLogic Gates
Logic Gates
Adeel Rasheed
 
Binary codes
Binary codesBinary codes
Binary codes
Revathi Subramaniam
 
Shift Registers
Shift RegistersShift Registers
Shift Registers
Abhilash Nair
 
Computer system bus
Computer system busComputer system bus
Computer system bus
Goran W. Hama Ali
 
sequential circuits
sequential circuitssequential circuits
sequential circuits
Unsa Shakir
 
Half adder & full adder
Half adder & full adderHalf adder & full adder
Half adder & full adder
Gaditek
 
ADDRESSING MODES
ADDRESSING MODESADDRESSING MODES
ADDRESSING MODES
Sadaf Rasheed
 
Digital Logic Design
Digital Logic Design Digital Logic Design
Digital Logic Design
Vaagdevi College of Engineering
 
Assembly Language
Assembly LanguageAssembly Language
Assembly Language
Ibrahimcommunication Al Ani
 
Combinational circuits
Combinational circuits Combinational circuits
Combinational circuits
DrSonali Vyas
 
Von Neumann Architecture
Von Neumann ArchitectureVon Neumann Architecture
Von Neumann Architecture
Chamodi Adikaram
 

What's hot (20)

Arithmetic logic shift unit
Arithmetic logic shift unitArithmetic logic shift unit
Arithmetic logic shift unit
 
8086 micro processor
8086 micro processor8086 micro processor
8086 micro processor
 
instruction cycle ppt
instruction cycle pptinstruction cycle ppt
instruction cycle ppt
 
Signed Addition And Subtraction
Signed Addition And SubtractionSigned Addition And Subtraction
Signed Addition And Subtraction
 
Input output interface
Input output interfaceInput output interface
Input output interface
 
Encoder & Decoder
Encoder & DecoderEncoder & Decoder
Encoder & Decoder
 
Decoders-Digital Electronics
Decoders-Digital ElectronicsDecoders-Digital Electronics
Decoders-Digital Electronics
 
Computer Organization and Architecture.
Computer Organization and Architecture.Computer Organization and Architecture.
Computer Organization and Architecture.
 
Register organization, stack
Register organization, stackRegister organization, stack
Register organization, stack
 
Logic Gates
Logic GatesLogic Gates
Logic Gates
 
Binary codes
Binary codesBinary codes
Binary codes
 
Shift Registers
Shift RegistersShift Registers
Shift Registers
 
Computer system bus
Computer system busComputer system bus
Computer system bus
 
sequential circuits
sequential circuitssequential circuits
sequential circuits
 
Half adder & full adder
Half adder & full adderHalf adder & full adder
Half adder & full adder
 
ADDRESSING MODES
ADDRESSING MODESADDRESSING MODES
ADDRESSING MODES
 
Digital Logic Design
Digital Logic Design Digital Logic Design
Digital Logic Design
 
Assembly Language
Assembly LanguageAssembly Language
Assembly Language
 
Combinational circuits
Combinational circuits Combinational circuits
Combinational circuits
 
Von Neumann Architecture
Von Neumann ArchitectureVon Neumann Architecture
Von Neumann Architecture
 

Similar to ALU

B.tech admission in india
B.tech admission in indiaB.tech admission in india
B.tech admission in india
Edhole.com
 
Processors - an overview
Processors - an overviewProcessors - an overview
Processors - an overview
Lorenz Lo Sauer
 
Top schools in india
Top schools in indiaTop schools in india
Top schools in india
Edhole.com
 
Top schools in india
Top schools in indiaTop schools in india
Top schools in india
Edhole.com
 
Top schools in delhi ncr
Top schools in delhi ncrTop schools in delhi ncr
Top schools in delhi ncr
Edhole.com
 
Top schools in delhi ncr
Top schools in delhi ncrTop schools in delhi ncr
Top schools in delhi ncr
Edhole.com
 
8 bit alu design
8 bit alu design8 bit alu design
8 bit alu design
Shobhan Pujari
 
Re complete
Re completeRe complete
Re complete
Raza Umer
 
ALUs Mini Project.pptx
ALUs Mini Project.pptxALUs Mini Project.pptx
ALUs Mini Project.pptx
DrMathewStrandgh
 
ALUs and HDLs .pptx
ALUs and HDLs .pptxALUs and HDLs .pptx
ALUs and HDLs .pptx
DrMathewStrandgh
 
H64CSA_1B_023799_Osama
H64CSA_1B_023799_OsamaH64CSA_1B_023799_Osama
H64CSA_1B_023799_Osama
Osama Azim
 
CPU
CPUCPU
8 bit alu design
8 bit alu design8 bit alu design
8 bit alu design
shobhan pujari
 
Basic operations of computer my assignment
Basic operations of computer my assignmentBasic operations of computer my assignment
Basic operations of computer my assignment
Nazish Jamali
 
Memory Unit PPT
Memory Unit PPTMemory Unit PPT
Memory Unit PPT
saadkhan42320
 
Sequential and combinational alu
Sequential and combinational alu Sequential and combinational alu
Sequential and combinational alu
Piyush Rochwani
 
CPU (Central Processing Units)
CPU (Central Processing Units)CPU (Central Processing Units)
CPU (Central Processing Units)
Prabin Maharjan
 
IT workshop (CPU).pptx
IT workshop (CPU).pptxIT workshop (CPU).pptx
IT workshop (CPU).pptx
VarunKumar657899
 
DCA (English) Chapter 1.pptx
DCA (English) Chapter 1.pptxDCA (English) Chapter 1.pptx
DCA (English) Chapter 1.pptx
SHRIBALAJIINFOTECH
 
computer system organization basics
computer system organization basicscomputer system organization basics
computer system organization basics
Not Yet working. I am Still studying
 

Similar to ALU (20)

B.tech admission in india
B.tech admission in indiaB.tech admission in india
B.tech admission in india
 
Processors - an overview
Processors - an overviewProcessors - an overview
Processors - an overview
 
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
 
8 bit alu design
8 bit alu design8 bit alu design
8 bit alu design
 
Re complete
Re completeRe complete
Re complete
 
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
 
H64CSA_1B_023799_Osama
H64CSA_1B_023799_OsamaH64CSA_1B_023799_Osama
H64CSA_1B_023799_Osama
 
CPU
CPUCPU
CPU
 
8 bit alu design
8 bit alu design8 bit alu design
8 bit alu design
 
Basic operations of computer my assignment
Basic operations of computer my assignmentBasic operations of computer my assignment
Basic operations of computer my assignment
 
Memory Unit PPT
Memory Unit PPTMemory Unit PPT
Memory Unit PPT
 
Sequential and combinational alu
Sequential and combinational alu Sequential and combinational alu
Sequential and combinational alu
 
CPU (Central Processing Units)
CPU (Central Processing Units)CPU (Central Processing Units)
CPU (Central Processing Units)
 
IT workshop (CPU).pptx
IT workshop (CPU).pptxIT workshop (CPU).pptx
IT workshop (CPU).pptx
 
DCA (English) Chapter 1.pptx
DCA (English) Chapter 1.pptxDCA (English) Chapter 1.pptx
DCA (English) Chapter 1.pptx
 
computer system organization basics
computer system organization basicscomputer system organization basics
computer system organization basics
 

More from Ramasubbu .P

radar
radarradar
Press
PressPress
Milling 2
Milling 2Milling 2
Milling 2
Ramasubbu .P
 
MIlling 1
MIlling 1MIlling 1
MIlling 1
Ramasubbu .P
 
Drillings
DrillingsDrillings
Drillings
Ramasubbu .P
 
Holding
HoldingHolding
Holding
Ramasubbu .P
 
Saftey
SafteySaftey
Saftey
Ramasubbu .P
 
Harvesting
HarvestingHarvesting
Harvesting
Ramasubbu .P
 
Plough
PloughPlough
Plough
Ramasubbu .P
 
Tractor PTO
Tractor PTOTractor PTO
Tractor PTO
Ramasubbu .P
 
Tractor Components
Tractor ComponentsTractor Components
Tractor Components
Ramasubbu .P
 
MSAT
MSATMSAT
GPS
GPSGPS
RTOS
RTOSRTOS
Virus
VirusVirus
Hacker
HackerHacker
Hacker
Ramasubbu .P
 
Denail of Service
Denail of ServiceDenail of Service
Denail of Service
Ramasubbu .P
 
RAID CONCEPT
RAID CONCEPTRAID CONCEPT
RAID CONCEPT
Ramasubbu .P
 
Network Security
Network SecurityNetwork Security
Network Security
Ramasubbu .P
 
Timer
TimerTimer

More from Ramasubbu .P (20)

radar
radarradar
radar
 
Press
PressPress
Press
 
Milling 2
Milling 2Milling 2
Milling 2
 
MIlling 1
MIlling 1MIlling 1
MIlling 1
 
Drillings
DrillingsDrillings
Drillings
 
Holding
HoldingHolding
Holding
 
Saftey
SafteySaftey
Saftey
 
Harvesting
HarvestingHarvesting
Harvesting
 
Plough
PloughPlough
Plough
 
Tractor PTO
Tractor PTOTractor PTO
Tractor PTO
 
Tractor Components
Tractor ComponentsTractor Components
Tractor Components
 
MSAT
MSATMSAT
MSAT
 
GPS
GPSGPS
GPS
 
RTOS
RTOSRTOS
RTOS
 
Virus
VirusVirus
Virus
 
Hacker
HackerHacker
Hacker
 
Denail of Service
Denail of ServiceDenail of Service
Denail of Service
 
RAID CONCEPT
RAID CONCEPTRAID CONCEPT
RAID CONCEPT
 
Network Security
Network SecurityNetwork Security
Network Security
 
Timer
TimerTimer
Timer
 

Recently uploaded

The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Dr. Vinod Kumar Kanvaria
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
Nguyen Thanh Tu Collection
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
tarandeep35
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
Israel Genealogy Research Association
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
eBook.com.bd (প্রয়োজনীয় বাংলা বই)
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
Celine George
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
mulvey2
 
Life upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for studentLife upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for student
NgcHiNguyn25
 
World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
ak6969907
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
AyyanKhan40
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
David Douglas School District
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
WaniBasim
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
Scholarhat
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
amberjdewit93
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
PECB
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
Celine George
 

Recently uploaded (20)

The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
 
Life upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for studentLife upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for student
 
World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
 

ALU

  • 1. By: Ahmad Yazdankhah CS 147 Fall 2008 Prof: Dr. Sin-Min Lee
  • 2.  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. 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, …)
  • 4.
  • 5.  Registers (IR, PC, ACC)  Control Unit (CU)  Arithmetic Logic Unit (ALU)
  • 6. Instruction Register (IR) Program Counter (PC) Control Unit (CU) ALU Accumulator (ACC) 0 1 2 3 4 5 . CPU RAM Status Register (FLAG)
  • 7. 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. 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
  • 11. By paralleling the one-bit ALUs and some other modification on the logical circuits, we can create bigger ALUs.
  • 12.  Virginia Tech online courses: http://courses.cs.vt.edu/~csonline/index.html  Virginia Tech online Circuit Simulator http://courses.cs.vt.edu/~csonline/MachineArchitecture/L  Virginia Tech Microprocessor Simulation: http://courses.cs.vt.edu/~csonline/MachineArchitect ure/Lessons/CPU/sumprogram.html
  • 13.  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