SlideShare a Scribd company logo
COMPUTER ARCHITECTURE
UNIT – II ARITHMETIC OPERATIONS
CA PPT5 ARITHMETIC, ALU
1
ALU - Addition and subtraction – Multiplication – Division – Floating
Point operations – Subword parallelism
Arithmetic for Computers
 ALU - Arithmetic & Logic Unit
 Responsible for performing arithmetic operations such as addition,
subtraction, division and multiplication and logical operations such
as AND, OR and their inversion etc.,
 Arithmetic operations are performed on data type
Fixed point numbers
Floating point numbers
 Representing number in such data type is known as
Fixed point representation
Floating point representation
CA PPT5 ARITHMETIC, ALU
2
Fixed point representation
 Integer numbers
 2 forms
Signed integer (Negative number) -15
Unsigned integer (Positive number) 15
 Techniques used to represent integer numbers are
Signed Magnitude representation
1’s Complement
2’s Complement
CA PPT5 ARITHMETIC, ALU
3
Signed Magnitude representation
 There are many schemes for representing negative integers with
patterns of bits.
 One scheme is sign-magnitude
 It uses one bit (MSB) to indicate the sign.
 "0" indicates a positive integer, and "1" indicates a negative integer
 The rest of the bits are used for the magnitude of the number
 Example: -2410 is represented as
1001 1000
The sign "1" means negative
The magnitude is 24 (in 7-bit binary)
CA PPT5 ARITHMETIC, ALU
4
Example
 Decimal values of the following 8-bit sign-magnitude numbers
10000011 = -3
00000101 = +5
11111111 = ?
01111111 = ?
 Represent the following in 8-bit sign-magnitude
-15 = 10001111
+7 = 00000111
-1 = ?
CA PPT5 ARITHMETIC, ALU
5
One’s Complement
CA PPT5 ARITHMETIC, ALU
6
 Perform NOT operation
 Example find 1’s complement for 110101002
Two’s Complement
CA PPT5 ARITHMETIC, ALU
7
 2’s complement = 1’s complement + 1
Two’s Complement
1 1 0 0 0 1 0 0
¬ 0 0 1 1 1 0 1 1
+ 1
0 0 1 1 1 1 0 0
CA PPT5 ARITHMETIC, ALU
8
 2’s complement = 1’s complement + 1
 Example (11000100)2
Addition & Subtraction
Addition
 Rules for Binary Addition
0 + 0 = 0
0 + 1 = 1
1 + 0 = 1
1 + 1 = 0, and carry 1 to the next more significant bit
Example : Add 610 to 710 in binary
11
0110 (610)
+ 0111 (710)
------
1101  (1310)
CA PPT5 ARITHMETIC, ALU
9
Addition
 Logic circuit which perform addition of 2 bits is call half adder
 3 bits (2 significant bit & 1 Carry) is called full adder
Half Adder
Block Diagram Truth Table
i/p
o/p
CA PPT5 ARITHMETIC, ALU
10
Half
Adder
A B
S
C
A B S(um) C(arry)
0 0 0 0
0 1 1 0
1 0 1 0
1 1 0 1
Karnaugh Map
Sum = A B ̅ + A ̅ B. Carry = AB
CA PPT5 ARITHMETIC, ALU
11
A
B
Sum
Carry
Logic Diagram
Full Adder
Block Diagram Truth Table
CA PPT5 ARITHMETIC, ALU
12
Full
Adder
A B
S
Cout
Carry In
(Cin)
Cin A B S(um) Cout
0 0 0 0 0
0 0 1 1 0
0 1 0 1 0
0 1 1 0 1
1 0 0 1 0
1 0 1 0 1
1 1 0 0 1
1 1 1 1 1
Karnaugh Map
S = A ̅ B ̅ Cin + A ̅ BC ̅ in + ABCin Cout = AB + ACin + BCin
CA PPT5 ARITHMETIC, ALU
13
Logic Diagram
CA PPT5 ARITHMETIC, ALU
14
Carry
Sum
Parallel Adder
CA PPT5 ARITHMETIC, ALU
15
Example – Addition (Base on MIPS)
CA PPT5 ARITHMETIC, ALU
16
Example – Subtraction (Base on MIPS)
CA PPT5 ARITHMETIC, ALU
17
Subtracting 6ten from 7ten can be done directly:
Binary Subtraction
 Suppose we want to perform A-B
 Steps:
 Take 2’s Complement of B
 Result  A + 2’s Complement of B
 If Carry is generated  Result is Positive (Ignore Carry)
 If no Carry  Result is Negative & in the 2’s Complement form
 Example : Perform (28)10 – (15)10 using 6 bit 2’s Complement
representation
CA PPT5 ARITHMETIC, ALU
18
Multiplication
 Multiplying 1000ten by 1001ten:
 The first operand is called the multiplicand
 the second the multiplier
 The final result is called the product
CA PPT5 ARITHMETIC, ALU
19
First version of the multiplication
hardware
CA PPT5 ARITHMETIC, ALU
20
Refined version of the multiplication
hardware
CA PPT5 ARITHMETIC, ALU
21
Multiplication
Alg using H/w
CA PPT5 ARITHMETIC, ALU
22
A Multiply Algorithm
 Using 4-bit numbers to save space, multiply 2ten x 3ten, or 0010two x 0011two.
CA PPT5 ARITHMETIC, ALU
23
Division Algorithm
CA PPT5 ARITHMETIC, ALU
24
Hardware Diagram
CA PPT5 ARITHMETIC, ALU
25
Revised Hardware Diagram
CA PPT5 ARITHMETIC, ALU
26
Flowchart
CA PPT5 ARITHMETIC, ALU
27
Example: Using a 4 bit version of the Algorithm
Divide 710 by 210 [0000 0111(2) by 0010(2)]
CA PPT5 ARITHMETIC, ALU
28

More Related Content

Similar to ARITHMETIC LOGIC UNIT.ppt

Arithmetic Process in Computer Systems
Arithmetic Process in Computer SystemsArithmetic Process in Computer Systems
Arithmetic Process in Computer Systems
S N M P Simamora
 
COMPUTER ORGANIZATION NOTES Unit 6
COMPUTER ORGANIZATION NOTES Unit 6COMPUTER ORGANIZATION NOTES Unit 6
COMPUTER ORGANIZATION NOTES Unit 6
Dr.MAYA NAYAK
 
Unit 4-booth algorithm
Unit 4-booth algorithmUnit 4-booth algorithm
Unit 4-booth algorithm
vishal choudhary
 
Half adder & full adder
Half adder & full adderHalf adder & full adder
Half adder & full adder
Gaditek
 
ArithmeticCircuits.Ivy Nile vs. Rhea Ripley
ArithmeticCircuits.Ivy Nile vs. Rhea RipleyArithmeticCircuits.Ivy Nile vs. Rhea Ripley
ArithmeticCircuits.Ivy Nile vs. Rhea Ripley
RudraBhai3
 
Computer arithmetics (computer organisation & arithmetics) ppt
Computer arithmetics (computer organisation & arithmetics) pptComputer arithmetics (computer organisation & arithmetics) ppt
Computer arithmetics (computer organisation & arithmetics) ppt
SuryaKumarSahani
 
index of all of the financial accounts in a company's general ledger. In shor...
index of all of the financial accounts in a company's general ledger. In shor...index of all of the financial accounts in a company's general ledger. In shor...
index of all of the financial accounts in a company's general ledger. In shor...
mayurjagdale4
 
Comparison among Different Adders
Comparison among Different Adders Comparison among Different Adders
Comparison among Different Adders
iosrjce
 
Class4
Class4Class4
Computer Architecture refers to those attributes of a system that have a dire...
Computer Architecture refers to those attributes of a system that have a dire...Computer Architecture refers to those attributes of a system that have a dire...
Computer Architecture refers to those attributes of a system that have a dire...
mayurjagdale4
 
COA(Unit_3.pptx)
COA(Unit_3.pptx)COA(Unit_3.pptx)
COA(Unit_3.pptx)
Thapar Institute
 
Combinational and sequential logic
Combinational and sequential logicCombinational and sequential logic
Combinational and sequential logic
Deepak John
 
Adders(half aders and full adder with explanation , truth table and circuit d...
Adders(half aders and full adder with explanation , truth table and circuit d...Adders(half aders and full adder with explanation , truth table and circuit d...
Adders(half aders and full adder with explanation , truth table and circuit d...
DHARUN MUGHILAN
 
Comp Arithmetic Basic.ppt
Comp Arithmetic Basic.pptComp Arithmetic Basic.ppt
Comp Arithmetic Basic.ppt
skatiarrahaman
 
Adder and subtrctor DLD
Adder and subtrctor  DLDAdder and subtrctor  DLD
Adder and subtrctor DLD
Rokonuzzaman Rony
 
07_arithmeticcircuits digital electronics.pptx
07_arithmeticcircuits digital electronics.pptx07_arithmeticcircuits digital electronics.pptx
07_arithmeticcircuits digital electronics.pptx
Elisée Ndjabu
 
Integer represention
Integer representionInteger represention
Integer represention
Saif Ullah
 
Lecture 03 Arithmetic Group of Instructions
Lecture 03 Arithmetic Group of InstructionsLecture 03 Arithmetic Group of Instructions
Lecture 03 Arithmetic Group of Instructions
Zeeshan Ahmed
 
Error Reduction of Modified Booth Multipliers in Mac Unit
Error Reduction of Modified Booth Multipliers in Mac UnitError Reduction of Modified Booth Multipliers in Mac Unit
Error Reduction of Modified Booth Multipliers in Mac Unit
IOSR Journals
 

Similar to ARITHMETIC LOGIC UNIT.ppt (20)

Arithmetic Process in Computer Systems
Arithmetic Process in Computer SystemsArithmetic Process in Computer Systems
Arithmetic Process in Computer Systems
 
COMPUTER ORGANIZATION NOTES Unit 6
COMPUTER ORGANIZATION NOTES Unit 6COMPUTER ORGANIZATION NOTES Unit 6
COMPUTER ORGANIZATION NOTES Unit 6
 
Unit 4-booth algorithm
Unit 4-booth algorithmUnit 4-booth algorithm
Unit 4-booth algorithm
 
Half adder & full adder
Half adder & full adderHalf adder & full adder
Half adder & full adder
 
ArithmeticCircuits.Ivy Nile vs. Rhea Ripley
ArithmeticCircuits.Ivy Nile vs. Rhea RipleyArithmeticCircuits.Ivy Nile vs. Rhea Ripley
ArithmeticCircuits.Ivy Nile vs. Rhea Ripley
 
Computer arithmetics (computer organisation & arithmetics) ppt
Computer arithmetics (computer organisation & arithmetics) pptComputer arithmetics (computer organisation & arithmetics) ppt
Computer arithmetics (computer organisation & arithmetics) ppt
 
index of all of the financial accounts in a company's general ledger. In shor...
index of all of the financial accounts in a company's general ledger. In shor...index of all of the financial accounts in a company's general ledger. In shor...
index of all of the financial accounts in a company's general ledger. In shor...
 
Comparison among Different Adders
Comparison among Different Adders Comparison among Different Adders
Comparison among Different Adders
 
Class4
Class4Class4
Class4
 
Computer Architecture refers to those attributes of a system that have a dire...
Computer Architecture refers to those attributes of a system that have a dire...Computer Architecture refers to those attributes of a system that have a dire...
Computer Architecture refers to those attributes of a system that have a dire...
 
COA(Unit_3.pptx)
COA(Unit_3.pptx)COA(Unit_3.pptx)
COA(Unit_3.pptx)
 
Combinational and sequential logic
Combinational and sequential logicCombinational and sequential logic
Combinational and sequential logic
 
Adders(half aders and full adder with explanation , truth table and circuit d...
Adders(half aders and full adder with explanation , truth table and circuit d...Adders(half aders and full adder with explanation , truth table and circuit d...
Adders(half aders and full adder with explanation , truth table and circuit d...
 
Comp Arithmetic Basic.ppt
Comp Arithmetic Basic.pptComp Arithmetic Basic.ppt
Comp Arithmetic Basic.ppt
 
Adder and subtrctor DLD
Adder and subtrctor  DLDAdder and subtrctor  DLD
Adder and subtrctor DLD
 
07_arithmeticcircuits digital electronics.pptx
07_arithmeticcircuits digital electronics.pptx07_arithmeticcircuits digital electronics.pptx
07_arithmeticcircuits digital electronics.pptx
 
Integer represention
Integer representionInteger represention
Integer represention
 
Group p
Group pGroup p
Group p
 
Lecture 03 Arithmetic Group of Instructions
Lecture 03 Arithmetic Group of InstructionsLecture 03 Arithmetic Group of Instructions
Lecture 03 Arithmetic Group of Instructions
 
Error Reduction of Modified Booth Multipliers in Mac Unit
Error Reduction of Modified Booth Multipliers in Mac UnitError Reduction of Modified Booth Multipliers in Mac Unit
Error Reduction of Modified Booth Multipliers in Mac Unit
 

More from RAJESH S

Entreprise Resource Planning s unit 2.ppt
Entreprise Resource Planning s unit 2.pptEntreprise Resource Planning s unit 2.ppt
Entreprise Resource Planning s unit 2.ppt
RAJESH S
 
Decision support systems in information management
Decision support systems in information managementDecision support systems in information management
Decision support systems in information management
RAJESH S
 
IM Unit 4 Security and its a control.ppt
IM Unit 4 Security and its a control.pptIM Unit 4 Security and its a control.ppt
IM Unit 4 Security and its a control.ppt
RAJESH S
 
unit5 Enterprise Resource Planning new trends.ppt
unit5 Enterprise Resource Planning new trends.pptunit5 Enterprise Resource Planning new trends.ppt
unit5 Enterprise Resource Planning new trends.ppt
RAJESH S
 
science engineering and technology .pptx
science engineering and technology .pptxscience engineering and technology .pptx
science engineering and technology .pptx
RAJESH S
 
policies in economics trends for engineers
policies in economics trends for engineerspolicies in economics trends for engineers
policies in economics trends for engineers
RAJESH S
 
Product Decisions and its aplication in global world
Product Decisions and its aplication in global worldProduct Decisions and its aplication in global world
Product Decisions and its aplication in global world
RAJESH S
 
Database management system basics and it applications
Database management system basics and it applicationsDatabase management system basics and it applications
Database management system basics and it applications
RAJESH S
 
Computer Animation.pptx
Computer Animation.pptxComputer Animation.pptx
Computer Animation.pptx
RAJESH S
 
IOT in agriculture.pptx
IOT in agriculture.pptxIOT in agriculture.pptx
IOT in agriculture.pptx
RAJESH S
 
18copy.pptx
18copy.pptx18copy.pptx
18copy.pptx
RAJESH S
 
ERP unit 1.ppt
ERP unit 1.pptERP unit 1.ppt
ERP unit 1.ppt
RAJESH S
 
fiscalpolicy.ppt
fiscalpolicy.pptfiscalpolicy.ppt
fiscalpolicy.ppt
RAJESH S
 
CASE Tools lab.ppt
CASE Tools lab.pptCASE Tools lab.ppt
CASE Tools lab.ppt
RAJESH S
 
DAA ppt.pptx
DAA ppt.pptxDAA ppt.pptx
DAA ppt.pptx
RAJESH S
 
DAA 1 ppt.pptx
DAA 1 ppt.pptxDAA 1 ppt.pptx
DAA 1 ppt.pptx
RAJESH S
 
Virtual memory translation.pptx
Virtual memory translation.pptxVirtual memory translation.pptx
Virtual memory translation.pptx
RAJESH S
 
Common memory technologies.pptx
Common memory technologies.pptxCommon memory technologies.pptx
Common memory technologies.pptx
RAJESH S
 
Components of Computer system.ppt
Components of Computer system.pptComponents of Computer system.ppt
Components of Computer system.ppt
RAJESH S
 
CA UNIT I PPT.ppt
CA UNIT I PPT.pptCA UNIT I PPT.ppt
CA UNIT I PPT.ppt
RAJESH S
 

More from RAJESH S (20)

Entreprise Resource Planning s unit 2.ppt
Entreprise Resource Planning s unit 2.pptEntreprise Resource Planning s unit 2.ppt
Entreprise Resource Planning s unit 2.ppt
 
Decision support systems in information management
Decision support systems in information managementDecision support systems in information management
Decision support systems in information management
 
IM Unit 4 Security and its a control.ppt
IM Unit 4 Security and its a control.pptIM Unit 4 Security and its a control.ppt
IM Unit 4 Security and its a control.ppt
 
unit5 Enterprise Resource Planning new trends.ppt
unit5 Enterprise Resource Planning new trends.pptunit5 Enterprise Resource Planning new trends.ppt
unit5 Enterprise Resource Planning new trends.ppt
 
science engineering and technology .pptx
science engineering and technology .pptxscience engineering and technology .pptx
science engineering and technology .pptx
 
policies in economics trends for engineers
policies in economics trends for engineerspolicies in economics trends for engineers
policies in economics trends for engineers
 
Product Decisions and its aplication in global world
Product Decisions and its aplication in global worldProduct Decisions and its aplication in global world
Product Decisions and its aplication in global world
 
Database management system basics and it applications
Database management system basics and it applicationsDatabase management system basics and it applications
Database management system basics and it applications
 
Computer Animation.pptx
Computer Animation.pptxComputer Animation.pptx
Computer Animation.pptx
 
IOT in agriculture.pptx
IOT in agriculture.pptxIOT in agriculture.pptx
IOT in agriculture.pptx
 
18copy.pptx
18copy.pptx18copy.pptx
18copy.pptx
 
ERP unit 1.ppt
ERP unit 1.pptERP unit 1.ppt
ERP unit 1.ppt
 
fiscalpolicy.ppt
fiscalpolicy.pptfiscalpolicy.ppt
fiscalpolicy.ppt
 
CASE Tools lab.ppt
CASE Tools lab.pptCASE Tools lab.ppt
CASE Tools lab.ppt
 
DAA ppt.pptx
DAA ppt.pptxDAA ppt.pptx
DAA ppt.pptx
 
DAA 1 ppt.pptx
DAA 1 ppt.pptxDAA 1 ppt.pptx
DAA 1 ppt.pptx
 
Virtual memory translation.pptx
Virtual memory translation.pptxVirtual memory translation.pptx
Virtual memory translation.pptx
 
Common memory technologies.pptx
Common memory technologies.pptxCommon memory technologies.pptx
Common memory technologies.pptx
 
Components of Computer system.ppt
Components of Computer system.pptComponents of Computer system.ppt
Components of Computer system.ppt
 
CA UNIT I PPT.ppt
CA UNIT I PPT.pptCA UNIT I PPT.ppt
CA UNIT I PPT.ppt
 

Recently uploaded

Exploring Career Paths in Cybersecurity for Technical Communicators
Exploring Career Paths in Cybersecurity for Technical CommunicatorsExploring Career Paths in Cybersecurity for Technical Communicators
Exploring Career Paths in Cybersecurity for Technical Communicators
Ben Woelk, CISSP, CPTC
 
皇冠体育- 皇冠体育官方网站- CROWN SPORTS| 立即访问【ac123.net】
皇冠体育- 皇冠体育官方网站- CROWN SPORTS| 立即访问【ac123.net】皇冠体育- 皇冠体育官方网站- CROWN SPORTS| 立即访问【ac123.net】
皇冠体育- 皇冠体育官方网站- CROWN SPORTS| 立即访问【ac123.net】
larisashrestha558
 
Transferable Skills - Your Roadmap - Part 1 and 2 - Dirk Spencer Senior Recru...
Transferable Skills - Your Roadmap - Part 1 and 2 - Dirk Spencer Senior Recru...Transferable Skills - Your Roadmap - Part 1 and 2 - Dirk Spencer Senior Recru...
Transferable Skills - Your Roadmap - Part 1 and 2 - Dirk Spencer Senior Recru...
Dirk Spencer Corporate Recruiter LION
 
How to Master LinkedIn for Career and Business
How to Master LinkedIn for Career and BusinessHow to Master LinkedIn for Career and Business
How to Master LinkedIn for Career and Business
ideatoipo
 
Full Sail_Morales_Michael_SMM_2024-05.pptx
Full Sail_Morales_Michael_SMM_2024-05.pptxFull Sail_Morales_Michael_SMM_2024-05.pptx
Full Sail_Morales_Michael_SMM_2024-05.pptx
mmorales2173
 
欧洲杯投注app-欧洲杯投注app推荐-欧洲杯投注app| 立即访问【ac123.net】
欧洲杯投注app-欧洲杯投注app推荐-欧洲杯投注app| 立即访问【ac123.net】欧洲杯投注app-欧洲杯投注app推荐-欧洲杯投注app| 立即访问【ac123.net】
欧洲杯投注app-欧洲杯投注app推荐-欧洲杯投注app| 立即访问【ac123.net】
foismail170
 
欧洲杯投注网站-欧洲杯投注网站推荐-欧洲杯投注网站| 立即访问【ac123.net】
欧洲杯投注网站-欧洲杯投注网站推荐-欧洲杯投注网站| 立即访问【ac123.net】欧洲杯投注网站-欧洲杯投注网站推荐-欧洲杯投注网站| 立即访问【ac123.net】
欧洲杯投注网站-欧洲杯投注网站推荐-欧洲杯投注网站| 立即访问【ac123.net】
foismail170
 
一比一原版(YU毕业证)约克大学毕业证如何办理
一比一原版(YU毕业证)约克大学毕业证如何办理一比一原版(YU毕业证)约克大学毕业证如何办理
一比一原版(YU毕业证)约克大学毕业证如何办理
yuhofha
 
Interactive Dictionary AIDS-B.pptx aaaaaaaaaaaaaaaaaaaaaaaaaa
Interactive Dictionary AIDS-B.pptx aaaaaaaaaaaaaaaaaaaaaaaaaaInteractive Dictionary AIDS-B.pptx aaaaaaaaaaaaaaaaaaaaaaaaaa
Interactive Dictionary AIDS-B.pptx aaaaaaaaaaaaaaaaaaaaaaaaaa
23211a7274
 
New Explore Careers and College Majors 2024.pdf
New Explore Careers and College Majors 2024.pdfNew Explore Careers and College Majors 2024.pdf
New Explore Careers and College Majors 2024.pdf
Dr. Mary Askew
 
一比一原版(UVic毕业证)维多利亚大学毕业证如何办理
一比一原版(UVic毕业证)维多利亚大学毕业证如何办理一比一原版(UVic毕业证)维多利亚大学毕业证如何办理
一比一原版(UVic毕业证)维多利亚大学毕业证如何办理
pxyhy
 
一比一原版(TMU毕业证)多伦多都会大学毕业证如何办理
一比一原版(TMU毕业证)多伦多都会大学毕业证如何办理一比一原版(TMU毕业证)多伦多都会大学毕业证如何办理
一比一原版(TMU毕业证)多伦多都会大学毕业证如何办理
yuhofha
 
How Mentoring Elevates Your PM Career | PMI Silver Spring Chapter
How Mentoring Elevates Your PM Career | PMI Silver Spring ChapterHow Mentoring Elevates Your PM Career | PMI Silver Spring Chapter
How Mentoring Elevates Your PM Career | PMI Silver Spring Chapter
Hector Del Castillo, CPM, CPMM
 
DIGITAL MARKETING COURSE IN CHENNAI.pptx
DIGITAL MARKETING COURSE IN CHENNAI.pptxDIGITAL MARKETING COURSE IN CHENNAI.pptx
DIGITAL MARKETING COURSE IN CHENNAI.pptx
FarzanaRbcomcs
 
han han widi kembar tapi beda han han dan widi kembar tapi sama
han han widi kembar tapi beda han han dan widi kembar tapi samahan han widi kembar tapi beda han han dan widi kembar tapi sama
han han widi kembar tapi beda han han dan widi kembar tapi sama
IrlanMalik
 
How to create an effective K-POC tutorial
How to create an effective K-POC tutorialHow to create an effective K-POC tutorial
How to create an effective K-POC tutorial
vencislavkaaa
 
Personal Brand Exploration Comedy Jxnelle.
Personal Brand Exploration Comedy Jxnelle.Personal Brand Exploration Comedy Jxnelle.
Personal Brand Exploration Comedy Jxnelle.
alexthomas971
 
欧洲杯买球平台-欧洲杯买球平台推荐-欧洲杯买球平台| 立即访问【ac123.net】
欧洲杯买球平台-欧洲杯买球平台推荐-欧洲杯买球平台| 立即访问【ac123.net】欧洲杯买球平台-欧洲杯买球平台推荐-欧洲杯买球平台| 立即访问【ac123.net】
欧洲杯买球平台-欧洲杯买球平台推荐-欧洲杯买球平台| 立即访问【ac123.net】
foismail170
 
Brand Identity For A Sportscaster Project and Portfolio I
Brand Identity For A Sportscaster Project and Portfolio IBrand Identity For A Sportscaster Project and Portfolio I
Brand Identity For A Sportscaster Project and Portfolio I
thomasaolson2000
 
Luke Royak's Personal Brand Exploration!
Luke Royak's Personal Brand Exploration!Luke Royak's Personal Brand Exploration!
Luke Royak's Personal Brand Exploration!
LukeRoyak
 

Recently uploaded (20)

Exploring Career Paths in Cybersecurity for Technical Communicators
Exploring Career Paths in Cybersecurity for Technical CommunicatorsExploring Career Paths in Cybersecurity for Technical Communicators
Exploring Career Paths in Cybersecurity for Technical Communicators
 
皇冠体育- 皇冠体育官方网站- CROWN SPORTS| 立即访问【ac123.net】
皇冠体育- 皇冠体育官方网站- CROWN SPORTS| 立即访问【ac123.net】皇冠体育- 皇冠体育官方网站- CROWN SPORTS| 立即访问【ac123.net】
皇冠体育- 皇冠体育官方网站- CROWN SPORTS| 立即访问【ac123.net】
 
Transferable Skills - Your Roadmap - Part 1 and 2 - Dirk Spencer Senior Recru...
Transferable Skills - Your Roadmap - Part 1 and 2 - Dirk Spencer Senior Recru...Transferable Skills - Your Roadmap - Part 1 and 2 - Dirk Spencer Senior Recru...
Transferable Skills - Your Roadmap - Part 1 and 2 - Dirk Spencer Senior Recru...
 
How to Master LinkedIn for Career and Business
How to Master LinkedIn for Career and BusinessHow to Master LinkedIn for Career and Business
How to Master LinkedIn for Career and Business
 
Full Sail_Morales_Michael_SMM_2024-05.pptx
Full Sail_Morales_Michael_SMM_2024-05.pptxFull Sail_Morales_Michael_SMM_2024-05.pptx
Full Sail_Morales_Michael_SMM_2024-05.pptx
 
欧洲杯投注app-欧洲杯投注app推荐-欧洲杯投注app| 立即访问【ac123.net】
欧洲杯投注app-欧洲杯投注app推荐-欧洲杯投注app| 立即访问【ac123.net】欧洲杯投注app-欧洲杯投注app推荐-欧洲杯投注app| 立即访问【ac123.net】
欧洲杯投注app-欧洲杯投注app推荐-欧洲杯投注app| 立即访问【ac123.net】
 
欧洲杯投注网站-欧洲杯投注网站推荐-欧洲杯投注网站| 立即访问【ac123.net】
欧洲杯投注网站-欧洲杯投注网站推荐-欧洲杯投注网站| 立即访问【ac123.net】欧洲杯投注网站-欧洲杯投注网站推荐-欧洲杯投注网站| 立即访问【ac123.net】
欧洲杯投注网站-欧洲杯投注网站推荐-欧洲杯投注网站| 立即访问【ac123.net】
 
一比一原版(YU毕业证)约克大学毕业证如何办理
一比一原版(YU毕业证)约克大学毕业证如何办理一比一原版(YU毕业证)约克大学毕业证如何办理
一比一原版(YU毕业证)约克大学毕业证如何办理
 
Interactive Dictionary AIDS-B.pptx aaaaaaaaaaaaaaaaaaaaaaaaaa
Interactive Dictionary AIDS-B.pptx aaaaaaaaaaaaaaaaaaaaaaaaaaInteractive Dictionary AIDS-B.pptx aaaaaaaaaaaaaaaaaaaaaaaaaa
Interactive Dictionary AIDS-B.pptx aaaaaaaaaaaaaaaaaaaaaaaaaa
 
New Explore Careers and College Majors 2024.pdf
New Explore Careers and College Majors 2024.pdfNew Explore Careers and College Majors 2024.pdf
New Explore Careers and College Majors 2024.pdf
 
一比一原版(UVic毕业证)维多利亚大学毕业证如何办理
一比一原版(UVic毕业证)维多利亚大学毕业证如何办理一比一原版(UVic毕业证)维多利亚大学毕业证如何办理
一比一原版(UVic毕业证)维多利亚大学毕业证如何办理
 
一比一原版(TMU毕业证)多伦多都会大学毕业证如何办理
一比一原版(TMU毕业证)多伦多都会大学毕业证如何办理一比一原版(TMU毕业证)多伦多都会大学毕业证如何办理
一比一原版(TMU毕业证)多伦多都会大学毕业证如何办理
 
How Mentoring Elevates Your PM Career | PMI Silver Spring Chapter
How Mentoring Elevates Your PM Career | PMI Silver Spring ChapterHow Mentoring Elevates Your PM Career | PMI Silver Spring Chapter
How Mentoring Elevates Your PM Career | PMI Silver Spring Chapter
 
DIGITAL MARKETING COURSE IN CHENNAI.pptx
DIGITAL MARKETING COURSE IN CHENNAI.pptxDIGITAL MARKETING COURSE IN CHENNAI.pptx
DIGITAL MARKETING COURSE IN CHENNAI.pptx
 
han han widi kembar tapi beda han han dan widi kembar tapi sama
han han widi kembar tapi beda han han dan widi kembar tapi samahan han widi kembar tapi beda han han dan widi kembar tapi sama
han han widi kembar tapi beda han han dan widi kembar tapi sama
 
How to create an effective K-POC tutorial
How to create an effective K-POC tutorialHow to create an effective K-POC tutorial
How to create an effective K-POC tutorial
 
Personal Brand Exploration Comedy Jxnelle.
Personal Brand Exploration Comedy Jxnelle.Personal Brand Exploration Comedy Jxnelle.
Personal Brand Exploration Comedy Jxnelle.
 
欧洲杯买球平台-欧洲杯买球平台推荐-欧洲杯买球平台| 立即访问【ac123.net】
欧洲杯买球平台-欧洲杯买球平台推荐-欧洲杯买球平台| 立即访问【ac123.net】欧洲杯买球平台-欧洲杯买球平台推荐-欧洲杯买球平台| 立即访问【ac123.net】
欧洲杯买球平台-欧洲杯买球平台推荐-欧洲杯买球平台| 立即访问【ac123.net】
 
Brand Identity For A Sportscaster Project and Portfolio I
Brand Identity For A Sportscaster Project and Portfolio IBrand Identity For A Sportscaster Project and Portfolio I
Brand Identity For A Sportscaster Project and Portfolio I
 
Luke Royak's Personal Brand Exploration!
Luke Royak's Personal Brand Exploration!Luke Royak's Personal Brand Exploration!
Luke Royak's Personal Brand Exploration!
 

ARITHMETIC LOGIC UNIT.ppt

  • 1. COMPUTER ARCHITECTURE UNIT – II ARITHMETIC OPERATIONS CA PPT5 ARITHMETIC, ALU 1 ALU - Addition and subtraction – Multiplication – Division – Floating Point operations – Subword parallelism
  • 2. Arithmetic for Computers  ALU - Arithmetic & Logic Unit  Responsible for performing arithmetic operations such as addition, subtraction, division and multiplication and logical operations such as AND, OR and their inversion etc.,  Arithmetic operations are performed on data type Fixed point numbers Floating point numbers  Representing number in such data type is known as Fixed point representation Floating point representation CA PPT5 ARITHMETIC, ALU 2
  • 3. Fixed point representation  Integer numbers  2 forms Signed integer (Negative number) -15 Unsigned integer (Positive number) 15  Techniques used to represent integer numbers are Signed Magnitude representation 1’s Complement 2’s Complement CA PPT5 ARITHMETIC, ALU 3
  • 4. Signed Magnitude representation  There are many schemes for representing negative integers with patterns of bits.  One scheme is sign-magnitude  It uses one bit (MSB) to indicate the sign.  "0" indicates a positive integer, and "1" indicates a negative integer  The rest of the bits are used for the magnitude of the number  Example: -2410 is represented as 1001 1000 The sign "1" means negative The magnitude is 24 (in 7-bit binary) CA PPT5 ARITHMETIC, ALU 4
  • 5. Example  Decimal values of the following 8-bit sign-magnitude numbers 10000011 = -3 00000101 = +5 11111111 = ? 01111111 = ?  Represent the following in 8-bit sign-magnitude -15 = 10001111 +7 = 00000111 -1 = ? CA PPT5 ARITHMETIC, ALU 5
  • 6. One’s Complement CA PPT5 ARITHMETIC, ALU 6  Perform NOT operation  Example find 1’s complement for 110101002
  • 7. Two’s Complement CA PPT5 ARITHMETIC, ALU 7  2’s complement = 1’s complement + 1
  • 8. Two’s Complement 1 1 0 0 0 1 0 0 ¬ 0 0 1 1 1 0 1 1 + 1 0 0 1 1 1 1 0 0 CA PPT5 ARITHMETIC, ALU 8  2’s complement = 1’s complement + 1  Example (11000100)2
  • 9. Addition & Subtraction Addition  Rules for Binary Addition 0 + 0 = 0 0 + 1 = 1 1 + 0 = 1 1 + 1 = 0, and carry 1 to the next more significant bit Example : Add 610 to 710 in binary 11 0110 (610) + 0111 (710) ------ 1101  (1310) CA PPT5 ARITHMETIC, ALU 9
  • 10. Addition  Logic circuit which perform addition of 2 bits is call half adder  3 bits (2 significant bit & 1 Carry) is called full adder Half Adder Block Diagram Truth Table i/p o/p CA PPT5 ARITHMETIC, ALU 10 Half Adder A B S C A B S(um) C(arry) 0 0 0 0 0 1 1 0 1 0 1 0 1 1 0 1
  • 11. Karnaugh Map Sum = A B ̅ + A ̅ B. Carry = AB CA PPT5 ARITHMETIC, ALU 11 A B Sum Carry Logic Diagram
  • 12. Full Adder Block Diagram Truth Table CA PPT5 ARITHMETIC, ALU 12 Full Adder A B S Cout Carry In (Cin) Cin A B S(um) Cout 0 0 0 0 0 0 0 1 1 0 0 1 0 1 0 0 1 1 0 1 1 0 0 1 0 1 0 1 0 1 1 1 0 0 1 1 1 1 1 1
  • 13. Karnaugh Map S = A ̅ B ̅ Cin + A ̅ BC ̅ in + ABCin Cout = AB + ACin + BCin CA PPT5 ARITHMETIC, ALU 13
  • 14. Logic Diagram CA PPT5 ARITHMETIC, ALU 14 Carry Sum
  • 15. Parallel Adder CA PPT5 ARITHMETIC, ALU 15
  • 16. Example – Addition (Base on MIPS) CA PPT5 ARITHMETIC, ALU 16
  • 17. Example – Subtraction (Base on MIPS) CA PPT5 ARITHMETIC, ALU 17 Subtracting 6ten from 7ten can be done directly:
  • 18. Binary Subtraction  Suppose we want to perform A-B  Steps:  Take 2’s Complement of B  Result  A + 2’s Complement of B  If Carry is generated  Result is Positive (Ignore Carry)  If no Carry  Result is Negative & in the 2’s Complement form  Example : Perform (28)10 – (15)10 using 6 bit 2’s Complement representation CA PPT5 ARITHMETIC, ALU 18
  • 19. Multiplication  Multiplying 1000ten by 1001ten:  The first operand is called the multiplicand  the second the multiplier  The final result is called the product CA PPT5 ARITHMETIC, ALU 19
  • 20. First version of the multiplication hardware CA PPT5 ARITHMETIC, ALU 20
  • 21. Refined version of the multiplication hardware CA PPT5 ARITHMETIC, ALU 21
  • 22. Multiplication Alg using H/w CA PPT5 ARITHMETIC, ALU 22
  • 23. A Multiply Algorithm  Using 4-bit numbers to save space, multiply 2ten x 3ten, or 0010two x 0011two. CA PPT5 ARITHMETIC, ALU 23
  • 24. Division Algorithm CA PPT5 ARITHMETIC, ALU 24
  • 25. Hardware Diagram CA PPT5 ARITHMETIC, ALU 25
  • 26. Revised Hardware Diagram CA PPT5 ARITHMETIC, ALU 26
  • 28. Example: Using a 4 bit version of the Algorithm Divide 710 by 210 [0000 0111(2) by 0010(2)] CA PPT5 ARITHMETIC, ALU 28