SlideShare a Scribd company logo
1 of 8
1
Complements
BY UNSA SHAKIR
2
Complements
 Complements are used for simplifying the
subtraction operation and for logical manipulation.
 There are two types of complements for each
base-r system: the radix and the diminished radix
complements.
 Binary numbers: 2’s complement
1’s complement
Decimal numbers:10’s complement
9’s complement
3
Diminished radix complement
 Given a number N in base-r having n digits, the
(r-1)’s complement of N is defined as
(rn-1)-N.
Decimal numbers: 012398 have 6 digits and present below
(106 - 1) – 012398 = 999999 – 012398 = 987601
Binary numbers: 1011000=(88)10
(27 - 1) – 1011000 = 1111111 – 1011000 = 0100111(39)
shortcut(1<-->0) 0100111
Where
R = base of number system
N = given numbers
n = number of digits given
4
5
Radix complement
 The r’s complement of an n-digit number in
base-r is defined as rn − N, for N=0 and 0 for N=0.
 Compare with (r − 1)’s complement, the r’s
complement is (r − 1)’s + 1 since
rn − N=[(rn − 1) − N] + 1.
Decimal number: 012398
106 − 012398 = 987602 = 999999 − 012398 + 1
Binary number: 1011000(88)
27 − 1011000=0101000(38)=1111111 − 1011000+1
6
Summary:
7
Find 1’s complement and 2’s complement of the binary
number 10110012?
1’s complement of 1011001
= {(27)10-1)} – 10110012
= 12710– 10110012
= 11111112– 10110012
= 01001102
2’s complement of 1011001
= (27)10-N
= 12810– 10110012
= 100000002– 10110012
= 01001112
Example:
8
Find the 3’s complement and 4’s complement of 1304?
= {(43)10-1)} – 1304
= 6310– 1304
= 6310– 2810
= 3510
= 2034
4’s complement of 1304
= (43)10– 1304
= 6410– 1304
= 6410– 2810
= 3610
= 2044
Example:

More Related Content

What's hot

Integer Representation
Integer RepresentationInteger Representation
Integer Representation
gavhays
 

What's hot (20)

Floating point presentation
Floating point presentationFloating point presentation
Floating point presentation
 
Complement in DLD
Complement in DLDComplement in DLD
Complement in DLD
 
Fixed point and floating-point numbers
Fixed point and  floating-point numbersFixed point and  floating-point numbers
Fixed point and floating-point numbers
 
Complements
ComplementsComplements
Complements
 
Binary addition.pptx
Binary addition.pptxBinary addition.pptx
Binary addition.pptx
 
Binary arithmetic
Binary arithmeticBinary arithmetic
Binary arithmetic
 
Data Structures- Part5 recursion
Data Structures- Part5 recursionData Structures- Part5 recursion
Data Structures- Part5 recursion
 
Binary codes
Binary codesBinary codes
Binary codes
 
EC Binary Substraction using 1's Complement,2's Complement
EC Binary Substraction using 1's Complement,2's ComplementEC Binary Substraction using 1's Complement,2's Complement
EC Binary Substraction using 1's Complement,2's Complement
 
Binaty Arithmetic and Binary coding schemes
Binaty Arithmetic and Binary coding schemesBinaty Arithmetic and Binary coding schemes
Binaty Arithmetic and Binary coding schemes
 
Binary codes
Binary codesBinary codes
Binary codes
 
Recursion tree method
Recursion tree methodRecursion tree method
Recursion tree method
 
Sparse matrix and its representation data structure
Sparse matrix and its representation data structureSparse matrix and its representation data structure
Sparse matrix and its representation data structure
 
linked list in data structure
linked list in data structure linked list in data structure
linked list in data structure
 
Asymptotic Notation
Asymptotic NotationAsymptotic Notation
Asymptotic Notation
 
IEEE floating point representation
 IEEE floating point representation IEEE floating point representation
IEEE floating point representation
 
Number system part 1
Number  system part 1Number  system part 1
Number system part 1
 
Number system
Number systemNumber system
Number system
 
Binary Arithmetic Operations
Binary Arithmetic OperationsBinary Arithmetic Operations
Binary Arithmetic Operations
 
Integer Representation
Integer RepresentationInteger Representation
Integer Representation
 

Similar to compliments

Similar to compliments (20)

Lecture_5-2.ppt
Lecture_5-2.pptLecture_5-2.ppt
Lecture_5-2.ppt
 
Good
GoodGood
Good
 
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
 
Lecture 4
Lecture 4Lecture 4
Lecture 4
 
IRJET- An Extensive Review on Residue Number System for Improving Computer Ar...
IRJET- An Extensive Review on Residue Number System for Improving Computer Ar...IRJET- An Extensive Review on Residue Number System for Improving Computer Ar...
IRJET- An Extensive Review on Residue Number System for Improving Computer Ar...
 
Dld lecture module 02
Dld lecture module 02Dld lecture module 02
Dld lecture module 02
 
Digital Systems.pptx
Digital Systems.pptxDigital Systems.pptx
Digital Systems.pptx
 
Number System
Number SystemNumber System
Number System
 
Complement
ComplementComplement
Complement
 
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
 
DLD_Lecture_notes2.ppt
DLD_Lecture_notes2.pptDLD_Lecture_notes2.ppt
DLD_Lecture_notes2.ppt
 
digital-180612132737.pdf
digital-180612132737.pdfdigital-180612132737.pdf
digital-180612132737.pdf
 
DATA REPRESENTATION
DATA  REPRESENTATIONDATA  REPRESENTATION
DATA REPRESENTATION
 
DIGITAL DESIGN
DIGITAL DESIGNDIGITAL DESIGN
DIGITAL DESIGN
 
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
 
computer organization
computer organizationcomputer organization
computer organization
 
Ch3
Ch3Ch3
Ch3
 
B sc cs i bo-de u-i number system
B sc cs i bo-de u-i number systemB sc cs i bo-de u-i number system
B sc cs i bo-de u-i number system
 
Digital logic and design 02
Digital logic and design 02Digital logic and design 02
Digital logic and design 02
 

More from Unsa Shakir

More from Unsa Shakir (20)

Types of diode
Types of diodeTypes of diode
Types of diode
 
Transistor
TransistorTransistor
Transistor
 
Single diode circuits
Single diode circuitsSingle diode circuits
Single diode circuits
 
Silicon control rectifier
Silicon control rectifierSilicon control rectifier
Silicon control rectifier
 
Rectifiers
RectifiersRectifiers
Rectifiers
 
Operational amplifier
Operational amplifierOperational amplifier
Operational amplifier
 
Diode voltage multiplier
Diode voltage multiplierDiode voltage multiplier
Diode voltage multiplier
 
Types of transistors
Types of transistorsTypes of transistors
Types of transistors
 
Clipper and clamper circuits
Clipper and clamper circuitsClipper and clamper circuits
Clipper and clamper circuits
 
kinds of distribution
 kinds of distribution kinds of distribution
kinds of distribution
 
Probability of card
Probability of  cardProbability of  card
Probability of card
 
hypothesis test
 hypothesis test hypothesis test
hypothesis test
 
correlation and regression
correlation and regressioncorrelation and regression
correlation and regression
 
probability
probabilityprobability
probability
 
tree diagrams
 tree diagrams tree diagrams
tree diagrams
 
counting techniques
counting techniquescounting techniques
counting techniques
 
analytical representation of data
 analytical representation of data analytical representation of data
analytical representation of data
 
frequency distribution
 frequency distribution frequency distribution
frequency distribution
 
graphic representations in statistics
 graphic representations in statistics graphic representations in statistics
graphic representations in statistics
 
introduction to statistical theory
introduction to statistical theoryintroduction to statistical theory
introduction to statistical theory
 

Recently uploaded

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ssuser89054b
 
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakes
MayuraD1
 
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
HenryBriggs2
 

Recently uploaded (20)

PE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiesPE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and properties
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptxA CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
 
School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdf
 
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARHAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equation
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
 
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptxOrlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
 
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced LoadsFEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
 
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
 
Moment Distribution Method For Btech Civil
Moment Distribution Method For Btech CivilMoment Distribution Method For Btech Civil
Moment Distribution Method For Btech Civil
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 
DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakes
 
457503602-5-Gas-Well-Testing-and-Analysis-pptx.pptx
457503602-5-Gas-Well-Testing-and-Analysis-pptx.pptx457503602-5-Gas-Well-Testing-and-Analysis-pptx.pptx
457503602-5-Gas-Well-Testing-and-Analysis-pptx.pptx
 
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
 
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best ServiceTamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
 

compliments

  • 2. 2 Complements  Complements are used for simplifying the subtraction operation and for logical manipulation.  There are two types of complements for each base-r system: the radix and the diminished radix complements.  Binary numbers: 2’s complement 1’s complement Decimal numbers:10’s complement 9’s complement
  • 3. 3 Diminished radix complement  Given a number N in base-r having n digits, the (r-1)’s complement of N is defined as (rn-1)-N. Decimal numbers: 012398 have 6 digits and present below (106 - 1) – 012398 = 999999 – 012398 = 987601 Binary numbers: 1011000=(88)10 (27 - 1) – 1011000 = 1111111 – 1011000 = 0100111(39) shortcut(1<-->0) 0100111
  • 4. Where R = base of number system N = given numbers n = number of digits given 4
  • 5. 5 Radix complement  The r’s complement of an n-digit number in base-r is defined as rn − N, for N=0 and 0 for N=0.  Compare with (r − 1)’s complement, the r’s complement is (r − 1)’s + 1 since rn − N=[(rn − 1) − N] + 1. Decimal number: 012398 106 − 012398 = 987602 = 999999 − 012398 + 1 Binary number: 1011000(88) 27 − 1011000=0101000(38)=1111111 − 1011000+1
  • 7. 7 Find 1’s complement and 2’s complement of the binary number 10110012? 1’s complement of 1011001 = {(27)10-1)} – 10110012 = 12710– 10110012 = 11111112– 10110012 = 01001102 2’s complement of 1011001 = (27)10-N = 12810– 10110012 = 100000002– 10110012 = 01001112 Example:
  • 8. 8 Find the 3’s complement and 4’s complement of 1304? = {(43)10-1)} – 1304 = 6310– 1304 = 6310– 2810 = 3510 = 2034 4’s complement of 1304 = (43)10– 1304 = 6410– 1304 = 6410– 2810 = 3610 = 2044 Example: