SlideShare a Scribd company logo
1 of 14
Computer
Architecture & organization
ALU
S.CIYAMALA KUSHBU
ASSISTANT PROFESSOR/ECE
ALU
NUMBER SYSTEMS
 Human beings use decimal (base 10)
and duodecimal (base 12) number systems for
counting and measurements.
 Computers use binary (base 2) number system, as
they are made from binary digital components
(known as transistors) operating in two states - on
and off.
 In computing, we also use hexadecimal (base 16)
or octal (base 8) number systems, as a compact form
for representing binary numbers.
 Example :10101010 AA(H) and 252(O)
BINARY NUMBER REPRESENTATION
WHAT IS FIXED AND FLOATING POINT?
 A fixed point number just means that there are
a fixed number of digits after the decimal point.
EX:123.45, 1234.56, 12345.67
 A floating point number allows for a varying
number of digits after the decimal point.
EX:1.234567, 0.00001234567
FIXED POINT NUMBERS
 Computers use a fixed number of bits to represent an
integer. The commonly-used bit-lengths for integers
are 8-bit, 16-bit, 32-bit or 64-bit.
 There are two representation schemes for integers:
 Unsigned Integers: can represent zero and positive
integers.
 Signed Integers: can represent zero, positive and
negative integers.
Three representation schemes had been proposed for
signed integers:
Sign-Magnitude representation
1's Complement representation
2's Complement representation
CONVERTION OF DECIMAL NUMBER 30
INTO 8 BIT BINARY NUMBER
8 7 6 5 4 3 2 1 8-bits
2^7 2^6 2^5 2^4 2^3 2^2 2^1 2^0 2^n
representation
128 64 32 16 8 4 2 1 value
0 0 0 1 1 1 1 0 Eg: for value 30
in 8 bit
UNSIGNED NUMBERS
 N bits -Magnitude (absolute value) of the integer
 EXAMPLE: UNSIGNED ADDITION AND SUBTRACTION
8 - 4 in 4 bit
representation
8 1000
4 0100 (-)
------------------
4 0100
----------------------
8 + 4 in 4 bit
representation
8 1000
4 0100 (+)
------------------
12 1100
----------------------
SIGNED NUMBERS
SIGN MAGINTUDE 1’S COMPLEMENT 2’S COMPLEMENT
Nth bit or
MSB
N-1bits
Sign bit
FOR POSITIVE INTEGER
Magnitude (absolute value) of the
integer
FOR NEGATIVE INTEGER
Magnitude (absolute value) of the
integer
Sign bit
FOR POSITIVE INTEGER
Magnitude (absolute value) of the
integer.
FOR NEGATIVE INTEGER
Magnitude of
the complement (inverse) of the (n-
1)-bit binary pattern
Sign bit
FOR POSITIVE INTEGER
Magnitude (absolute value) of
the integer.
FOR NEGATIVE INTEGER
Magnitude of the complement of
the (n-1)-bit binary pattern plus
one
Example:
Taken 8 bit
representati
on
+10000 0001
-11000 0001
+00000 0000
-01000 0000
+10000 0001
-11111 1110
+00000 0000
-01111 1111
+10000 0001
-11111 1111
+00000 0000
-00000 0000
Drawback 1. There are two representations
for the number zero.
2. Positive and negative integers
need to be processed
separately.
1. There are two representations
for the number zero.
2. Positive and negative integers
need to be processed
separately.
1.There is only one
representation for the number
zero
2.Positive and negative integers
can be treated together in
addition and subtraction.
Subtraction can be carried out
using the "addition logic".
SIGN MAGINTUDE 1’S COMPLEMENT 2’S COMPLEMENT
Usual
Subtraction in 5
bit
representation
+8 01000
+4 00100 (-)
---------------
+4 00100
----------------
+8 01000
+4 00100 (-)
---------------
+4 00100
---------------
+8 01000
+4 00100 (-)
---------------
+4 00100
---------------
Using addition
to perform
subtraction
+8 01000
-4 10100 (+)
---------------
-12 11100
-----------------
+8 01000
-4 11011 (+)
---------------
+3 00011
---------------
with carry 1 which
should be omitted
+8 01000
-4 11100 (+)
---------------
+4 00100
---------------
with carry 1
which should be
omitted
OVERFLOW RULE FOR ADDITION
 If two numbers which are both positive or negative
are added, then overflow occurs if and only if the
result has the opposite sign
OVERFLOW RULE FOR SUBTRACTION
 If two numbers with opposite sign are subtracted,
then overflow occurs if and only if the result has the
opposite sign
Unsigned and Signed  fixed point Addition and subtraction

More Related Content

What's hot

Floating point presentation
Floating point presentationFloating point presentation
Floating point presentationSnehalataAgasti
 
Fixed point and floating-point numbers
Fixed point and  floating-point numbersFixed point and  floating-point numbers
Fixed point and floating-point numbersMOHAN MOHAN
 
Computer organisation -morris mano
Computer organisation  -morris manoComputer organisation  -morris mano
Computer organisation -morris manovishnu murthy
 
Design half ,full Adder and Subtractor
Design half ,full Adder and SubtractorDesign half ,full Adder and Subtractor
Design half ,full Adder and SubtractorJaimin@prt.ltd.
 
Number system in Digital Electronics
Number system in Digital ElectronicsNumber system in Digital Electronics
Number system in Digital ElectronicsJanki Shah
 
Counters In Digital Logic Design
Counters In Digital Logic DesignCounters In Digital Logic Design
Counters In Digital Logic DesignSyed Abdul Mutaal
 
Modified booths algorithm part 1
Modified booths algorithm part 1Modified booths algorithm part 1
Modified booths algorithm part 1babuece
 
Digital Logic & Design (DLD) presentation
Digital Logic & Design (DLD) presentationDigital Logic & Design (DLD) presentation
Digital Logic & Design (DLD) presentationfoyez ahammad
 
Binary division restoration and non restoration algorithm
Binary division restoration and non restoration algorithmBinary division restoration and non restoration algorithm
Binary division restoration and non restoration algorithmPrasenjit Dey
 
1. Arithmetic Operations - Addition and subtraction of signed numbers.pptx
1. Arithmetic Operations - Addition and subtraction of signed numbers.pptx1. Arithmetic Operations - Addition and subtraction of signed numbers.pptx
1. Arithmetic Operations - Addition and subtraction of signed numbers.pptxJEEVANANTHAMG6
 
Encoders and decoders
Encoders and decodersEncoders and decoders
Encoders and decodersDeepikaDG1
 
IEEE floating point representation
 IEEE floating point representation IEEE floating point representation
IEEE floating point representationMaskurAlShalSabil
 
Quick tutorial on IEEE 754 FLOATING POINT representation
Quick tutorial on IEEE 754 FLOATING POINT representationQuick tutorial on IEEE 754 FLOATING POINT representation
Quick tutorial on IEEE 754 FLOATING POINT representationRitu Ranjan Shrivastwa
 

What's hot (20)

Floating point presentation
Floating point presentationFloating point presentation
Floating point presentation
 
Fixed point and floating-point numbers
Fixed point and  floating-point numbersFixed point and  floating-point numbers
Fixed point and floating-point numbers
 
Computer organisation -morris mano
Computer organisation  -morris manoComputer organisation  -morris mano
Computer organisation -morris mano
 
Counters
CountersCounters
Counters
 
Design half ,full Adder and Subtractor
Design half ,full Adder and SubtractorDesign half ,full Adder and Subtractor
Design half ,full Adder and Subtractor
 
Number system in Digital Electronics
Number system in Digital ElectronicsNumber system in Digital Electronics
Number system in Digital Electronics
 
Counters In Digital Logic Design
Counters In Digital Logic DesignCounters In Digital Logic Design
Counters In Digital Logic Design
 
Modified booths algorithm part 1
Modified booths algorithm part 1Modified booths algorithm part 1
Modified booths algorithm part 1
 
Digital Logic & Design (DLD) presentation
Digital Logic & Design (DLD) presentationDigital Logic & Design (DLD) presentation
Digital Logic & Design (DLD) presentation
 
Binary arithmetic
Binary arithmeticBinary arithmetic
Binary arithmetic
 
Binary division restoration and non restoration algorithm
Binary division restoration and non restoration algorithmBinary division restoration and non restoration algorithm
Binary division restoration and non restoration algorithm
 
Number system
Number systemNumber system
Number system
 
1. Arithmetic Operations - Addition and subtraction of signed numbers.pptx
1. Arithmetic Operations - Addition and subtraction of signed numbers.pptx1. Arithmetic Operations - Addition and subtraction of signed numbers.pptx
1. Arithmetic Operations - Addition and subtraction of signed numbers.pptx
 
Encoders and decoders
Encoders and decodersEncoders and decoders
Encoders and decoders
 
IEEE floating point representation
 IEEE floating point representation IEEE floating point representation
IEEE floating point representation
 
1s and 2s complement
1s and 2s complement1s and 2s complement
1s and 2s complement
 
Quick tutorial on IEEE 754 FLOATING POINT representation
Quick tutorial on IEEE 754 FLOATING POINT representationQuick tutorial on IEEE 754 FLOATING POINT representation
Quick tutorial on IEEE 754 FLOATING POINT representation
 
Unsigned multiplication
Unsigned multiplicationUnsigned multiplication
Unsigned multiplication
 
Combinational circuit
Combinational circuitCombinational circuit
Combinational circuit
 
Combinational circuits
Combinational circuitsCombinational circuits
Combinational circuits
 

Similar to Unsigned and Signed fixed point Addition and subtraction

Similar to Unsigned and Signed fixed point Addition and subtraction (20)

Chapter_1_Digital_Systems_and_Binary_Numbers2.ppt
Chapter_1_Digital_Systems_and_Binary_Numbers2.pptChapter_1_Digital_Systems_and_Binary_Numbers2.ppt
Chapter_1_Digital_Systems_and_Binary_Numbers2.ppt
 
Datarepresentation2
Datarepresentation2Datarepresentation2
Datarepresentation2
 
Data representation moris mano ch 03
Data representation   moris mano ch  03Data representation   moris mano ch  03
Data representation moris mano ch 03
 
Okkkkk
OkkkkkOkkkkk
Okkkkk
 
Number_Systems (2).ppt
Number_Systems (2).pptNumber_Systems (2).ppt
Number_Systems (2).ppt
 
Computer archi&mp
Computer archi&mpComputer archi&mp
Computer archi&mp
 
DATA REPRESENTATION
DATA  REPRESENTATIONDATA  REPRESENTATION
DATA REPRESENTATION
 
Ch3
Ch3Ch3
Ch3
 
Unit 2 Arithmetic
Unit 2 ArithmeticUnit 2 Arithmetic
Unit 2 Arithmetic
 
Data representation
Data representationData representation
Data representation
 
W 9 numbering system
W 9 numbering systemW 9 numbering system
W 9 numbering system
 
W 9 numbering system
W 9 numbering systemW 9 numbering system
W 9 numbering system
 
Unit 1 PDF.pptx
Unit 1 PDF.pptxUnit 1 PDF.pptx
Unit 1 PDF.pptx
 
Chapter 6
Chapter 6Chapter 6
Chapter 6
 
Chapter 1: Binary System
 Chapter 1: Binary System Chapter 1: Binary System
Chapter 1: Binary System
 
Chapter 1 Digital Systems and Binary Numbers.ppt
Chapter 1 Digital Systems and Binary Numbers.pptChapter 1 Digital Systems and Binary Numbers.ppt
Chapter 1 Digital Systems and Binary Numbers.ppt
 
chapter one && two.pdf
chapter one && two.pdfchapter one && two.pdf
chapter one && two.pdf
 
CS304PC:Computer Organization and Architecture Unit- III PDF notes .pdf
CS304PC:Computer Organization and Architecture Unit- III PDF notes .pdfCS304PC:Computer Organization and Architecture Unit- III PDF notes .pdf
CS304PC:Computer Organization and Architecture Unit- III PDF notes .pdf
 
Presentation of ICT.ppt.pptx
Presentation of ICT.ppt.pptxPresentation of ICT.ppt.pptx
Presentation of ICT.ppt.pptx
 
Chapter 1 digital systems and binary numbers
Chapter 1 digital systems and binary numbersChapter 1 digital systems and binary numbers
Chapter 1 digital systems and binary numbers
 

More from ciyamala kushbu

BCS302-Module 3 -DDCO-Computer structure-VTU 2022 scheme-BCS302.pdf
BCS302-Module 3 -DDCO-Computer structure-VTU 2022 scheme-BCS302.pdfBCS302-Module 3 -DDCO-Computer structure-VTU 2022 scheme-BCS302.pdf
BCS302-Module 3 -DDCO-Computer structure-VTU 2022 scheme-BCS302.pdfciyamala kushbu
 
BCS302- MODULE 4 Input output organizationfull doc-01.pdf
BCS302- MODULE 4 Input output  organizationfull doc-01.pdfBCS302- MODULE 4 Input output  organizationfull doc-01.pdf
BCS302- MODULE 4 Input output organizationfull doc-01.pdfciyamala kushbu
 
BCS302-DDCO-basic processing unit-Module 5- VTU 2022 scheme-DDCO-pdf
BCS302-DDCO-basic processing unit-Module 5- VTU 2022 scheme-DDCO-pdfBCS302-DDCO-basic processing unit-Module 5- VTU 2022 scheme-DDCO-pdf
BCS302-DDCO-basic processing unit-Module 5- VTU 2022 scheme-DDCO-pdfciyamala kushbu
 
BCS302-Digital Design and computer organization Lab manual- VTU 2022 scheme.pdf
BCS302-Digital Design and computer organization Lab manual- VTU 2022 scheme.pdfBCS302-Digital Design and computer organization Lab manual- VTU 2022 scheme.pdf
BCS302-Digital Design and computer organization Lab manual- VTU 2022 scheme.pdfciyamala kushbu
 
BCS302- Digital Design and computer organization -VTU-2022 scheme-Expectation...
BCS302- Digital Design and computer organization -VTU-2022 scheme-Expectation...BCS302- Digital Design and computer organization -VTU-2022 scheme-Expectation...
BCS302- Digital Design and computer organization -VTU-2022 scheme-Expectation...ciyamala kushbu
 
UNSIGNED AND SIGNED BINARY DIVISION
UNSIGNED AND SIGNED BINARY DIVISIONUNSIGNED AND SIGNED BINARY DIVISION
UNSIGNED AND SIGNED BINARY DIVISIONciyamala kushbu
 

More from ciyamala kushbu (7)

BCS302-Module 3 -DDCO-Computer structure-VTU 2022 scheme-BCS302.pdf
BCS302-Module 3 -DDCO-Computer structure-VTU 2022 scheme-BCS302.pdfBCS302-Module 3 -DDCO-Computer structure-VTU 2022 scheme-BCS302.pdf
BCS302-Module 3 -DDCO-Computer structure-VTU 2022 scheme-BCS302.pdf
 
BCS302- MODULE 4 Input output organizationfull doc-01.pdf
BCS302- MODULE 4 Input output  organizationfull doc-01.pdfBCS302- MODULE 4 Input output  organizationfull doc-01.pdf
BCS302- MODULE 4 Input output organizationfull doc-01.pdf
 
BCS302-DDCO-basic processing unit-Module 5- VTU 2022 scheme-DDCO-pdf
BCS302-DDCO-basic processing unit-Module 5- VTU 2022 scheme-DDCO-pdfBCS302-DDCO-basic processing unit-Module 5- VTU 2022 scheme-DDCO-pdf
BCS302-DDCO-basic processing unit-Module 5- VTU 2022 scheme-DDCO-pdf
 
BCS302-Digital Design and computer organization Lab manual- VTU 2022 scheme.pdf
BCS302-Digital Design and computer organization Lab manual- VTU 2022 scheme.pdfBCS302-Digital Design and computer organization Lab manual- VTU 2022 scheme.pdf
BCS302-Digital Design and computer organization Lab manual- VTU 2022 scheme.pdf
 
BCS302- Digital Design and computer organization -VTU-2022 scheme-Expectation...
BCS302- Digital Design and computer organization -VTU-2022 scheme-Expectation...BCS302- Digital Design and computer organization -VTU-2022 scheme-Expectation...
BCS302- Digital Design and computer organization -VTU-2022 scheme-Expectation...
 
Floating point Numbers
Floating point NumbersFloating point Numbers
Floating point Numbers
 
UNSIGNED AND SIGNED BINARY DIVISION
UNSIGNED AND SIGNED BINARY DIVISIONUNSIGNED AND SIGNED BINARY DIVISION
UNSIGNED AND SIGNED BINARY DIVISION
 

Recently uploaded

Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentInMediaRes1
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,Virag Sontakke
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...M56BOOKSTORE PRODUCT/SERVICE
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitolTechU
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxAvyJaneVismanos
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfMahmoud M. Sallam
 

Recently uploaded (20)

Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media Component
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptx
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptx
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 

Unsigned and Signed fixed point Addition and subtraction

  • 2. ALU
  • 3. NUMBER SYSTEMS  Human beings use decimal (base 10) and duodecimal (base 12) number systems for counting and measurements.  Computers use binary (base 2) number system, as they are made from binary digital components (known as transistors) operating in two states - on and off.  In computing, we also use hexadecimal (base 16) or octal (base 8) number systems, as a compact form for representing binary numbers.  Example :10101010 AA(H) and 252(O)
  • 5. WHAT IS FIXED AND FLOATING POINT?  A fixed point number just means that there are a fixed number of digits after the decimal point. EX:123.45, 1234.56, 12345.67  A floating point number allows for a varying number of digits after the decimal point. EX:1.234567, 0.00001234567
  • 6. FIXED POINT NUMBERS  Computers use a fixed number of bits to represent an integer. The commonly-used bit-lengths for integers are 8-bit, 16-bit, 32-bit or 64-bit.  There are two representation schemes for integers:  Unsigned Integers: can represent zero and positive integers.  Signed Integers: can represent zero, positive and negative integers. Three representation schemes had been proposed for signed integers: Sign-Magnitude representation 1's Complement representation 2's Complement representation
  • 7. CONVERTION OF DECIMAL NUMBER 30 INTO 8 BIT BINARY NUMBER 8 7 6 5 4 3 2 1 8-bits 2^7 2^6 2^5 2^4 2^3 2^2 2^1 2^0 2^n representation 128 64 32 16 8 4 2 1 value 0 0 0 1 1 1 1 0 Eg: for value 30 in 8 bit
  • 8.
  • 9. UNSIGNED NUMBERS  N bits -Magnitude (absolute value) of the integer  EXAMPLE: UNSIGNED ADDITION AND SUBTRACTION 8 - 4 in 4 bit representation 8 1000 4 0100 (-) ------------------ 4 0100 ---------------------- 8 + 4 in 4 bit representation 8 1000 4 0100 (+) ------------------ 12 1100 ----------------------
  • 11. SIGN MAGINTUDE 1’S COMPLEMENT 2’S COMPLEMENT Nth bit or MSB N-1bits Sign bit FOR POSITIVE INTEGER Magnitude (absolute value) of the integer FOR NEGATIVE INTEGER Magnitude (absolute value) of the integer Sign bit FOR POSITIVE INTEGER Magnitude (absolute value) of the integer. FOR NEGATIVE INTEGER Magnitude of the complement (inverse) of the (n- 1)-bit binary pattern Sign bit FOR POSITIVE INTEGER Magnitude (absolute value) of the integer. FOR NEGATIVE INTEGER Magnitude of the complement of the (n-1)-bit binary pattern plus one Example: Taken 8 bit representati on +10000 0001 -11000 0001 +00000 0000 -01000 0000 +10000 0001 -11111 1110 +00000 0000 -01111 1111 +10000 0001 -11111 1111 +00000 0000 -00000 0000 Drawback 1. There are two representations for the number zero. 2. Positive and negative integers need to be processed separately. 1. There are two representations for the number zero. 2. Positive and negative integers need to be processed separately. 1.There is only one representation for the number zero 2.Positive and negative integers can be treated together in addition and subtraction. Subtraction can be carried out using the "addition logic".
  • 12. SIGN MAGINTUDE 1’S COMPLEMENT 2’S COMPLEMENT Usual Subtraction in 5 bit representation +8 01000 +4 00100 (-) --------------- +4 00100 ---------------- +8 01000 +4 00100 (-) --------------- +4 00100 --------------- +8 01000 +4 00100 (-) --------------- +4 00100 --------------- Using addition to perform subtraction +8 01000 -4 10100 (+) --------------- -12 11100 ----------------- +8 01000 -4 11011 (+) --------------- +3 00011 --------------- with carry 1 which should be omitted +8 01000 -4 11100 (+) --------------- +4 00100 --------------- with carry 1 which should be omitted
  • 13. OVERFLOW RULE FOR ADDITION  If two numbers which are both positive or negative are added, then overflow occurs if and only if the result has the opposite sign OVERFLOW RULE FOR SUBTRACTION  If two numbers with opposite sign are subtracted, then overflow occurs if and only if the result has the opposite sign