SlideShare a Scribd company logo
12
Most read
13
Most read
19
Most read
LECTURE - 3
 Binary Addition
 Binary Subtraction
 Complements
1’s Complement
2’s Complement
 Subtraction Using Complements
BASIC OPERATIONS
 ADDITION
 SUBTRACTION
 MULTIPLICATION
 DIVISION
COMPUTER OPERATIONS
 BINARY ADDITION
 BINARY SUBTRACTION
The First Computer
• Covered a whole Room
• Separate Functions for Adding,
Subtracting, Multiplication and Division
ELIMINATION OF OPERATIONS
 MULTIPLICATION and DIVISION were eliminated
 MULTIPLICATION :
repeated addition
(2 x 4 = 8) , (2+ 2+ 2 + 2 = 8)
 DIVISION :
repeated subtractions
TODAY’S COMPUTER
 Computations
Addition – (ADDERS)
Subtraction – (SUBTRACTORS)
BINARY ADDITION
LOGIC:
0 + 0 = 0
0 + 1 = 1
1 + 0 = 1
1 + 1 = 0 (1 Carry)
EXAMPLE
1 0 0 1 1 0
+ 1 1 0 1 0 1
1 0 1 1 0 1 1
Carry
BINARY SUBTRACTION
LOGIC:
0 - 0 = 0
0 - 1 = 1 ( Borrow 1)
1 - 0 = 1
1 - 1 = 0
EXAMPLE
1 1 0 1 0 1
- 0 1 1 0 1 0
0 1 1 0 1 1
COMPLEMENTS
2 types:
 1’s Complement
 2’s Complement
1’s COMPLEMENT
PROCEDURE
 Change every 0 to 1 and every 1 to 0
EXAMPLE
Find 1’s Complement of:
( 1 1 0 0 1 0 1 0 )2
2’s COMPLEMENT
PROCEDURE
1. Find 1’s Complement:
Change every 0 to 1 and every 1 to 0
2. Add 1 to L.S.B
EXAMPLE
Find 2’s Complement of :
( 1 1 0 1 0 1 0 )2
SOLUTION : ( 1 1 0 1 0 1 0 )2
STEP 1
0 0 1 0 1 0 1
STEP 2
0 0 1 0 1 0 1
+ 1
0 0 1 0 1 1 0 LSB
SUBTRACTION USING COMPLEMENTS
SUBTRACTION
 MINUEND (1st value)
 SUBTRAHEND (2nd value)
SUBTRACTION USING 1’S
COMPLEMENT
STEP 1
Take 1’s Complement of Subtrahend
STEP 2
Add the result to Minuend
STEP 3
Look for end Carry.
END CARRY
 If Carry Exists:
Add the carry to LSB of result
 If NO Carry:
Take 1’s complement of result
again and
place a –ve sign
EXAMPLE
Subtract: ( 1 1 0 1 0 1 1 - 1 0 1 1 0 1 )2
SOLUTION
Minuend: 1 1 0 1 0 1 1
Subtrahend: 0 1 0 1 1 0 1
STEP 1 1’s Complement of Subtrahend
1 0 1 0 0 1 0
STEP 2 Add to Minuend
STEP 3 Add end carry to LSB of result.
SUBTRACTION USING 2’S
COMPLEMENT
 STEP 1
Take 2’s Complement of Subtrahend
 STEP 2
Add the result to Minuend
 STEP 3
Look for end Carry.
END CARRY
 If Carry Exists:
Drop it
 If NO Carry:
 Take 2’s complement of result again and
 place a –ve sign
EXAMPLE
Subtract: ( 1 1 0 1 0 1 1 - 1 0 1 1 0 1 )2
ADVANTAGE OF
COMPLEMENTS
 It Converts Subtraction Process to Addition
 Thus, the need for a Subtractor is Eliminated

More Related Content

PDF
Pipelining
PPTX
Multiplication algorithm, hardware and flowchart
PPTX
Fractional knapsack class 13
PPTX
Floating point representation
PPTX
Quick tutorial on IEEE 754 FLOATING POINT representation
PPTX
Signed Addition And Subtraction
PPTX
IEEE floating point representation
PDF
Computational Complexity: Complexity Classes
Pipelining
Multiplication algorithm, hardware and flowchart
Fractional knapsack class 13
Floating point representation
Quick tutorial on IEEE 754 FLOATING POINT representation
Signed Addition And Subtraction
IEEE floating point representation
Computational Complexity: Complexity Classes

What's hot (20)

PPTX
Hashing Technique In Data Structures
PPTX
CLR AND LALR PARSER
PPT
Chapter 2 instructions language of the computer
PPT
Divide and Conquer
PPTX
15 puzzle problem using branch and bound
PPTX
Tower Of Hanoi
PPTX
Fuzzy arithmetic
PPTX
Comparison of pentium processor with 80386 and 80486
PDF
PPTX
Presentation on cyclic redundancy check (crc)
PPT
Computer Architecture 3rd Edition by Moris Mano CH 01-CH 02.ppt
PPTX
Unit iv(simple code generator)
PPTX
Delivery and Forwarding of IP Packets
PDF
Linear discriminant analysis
PPTX
Knapsack problem using greedy approach
PPTX
Instruction Set Architecture
PDF
Artificial Neural Networks Lect3: Neural Network Learning rules
PPTX
Instruction Execution Cycle
PPTX
Binary arithmetic
PPTX
Hashing Technique In Data Structures
CLR AND LALR PARSER
Chapter 2 instructions language of the computer
Divide and Conquer
15 puzzle problem using branch and bound
Tower Of Hanoi
Fuzzy arithmetic
Comparison of pentium processor with 80386 and 80486
Presentation on cyclic redundancy check (crc)
Computer Architecture 3rd Edition by Moris Mano CH 01-CH 02.ppt
Unit iv(simple code generator)
Delivery and Forwarding of IP Packets
Linear discriminant analysis
Knapsack problem using greedy approach
Instruction Set Architecture
Artificial Neural Networks Lect3: Neural Network Learning rules
Instruction Execution Cycle
Binary arithmetic
Ad

Similar to 1's and 2's Complements (20)

PPT
Boolean operators
PPTX
Binary Arithmetic
PPT
05 multiply divide
PPT
Binary Arithmetic
PPTX
binary arithmetic conversion.pptx
PPTX
CA UNIT II.pptx
PPT
Addition and subtraction with signed magnitude data (mano
PDF
Arithmetic Unit Addition Subtraction Multiplication and Division
PPTX
Arithmetic for Computers
PPT
computer arithmatic
DOCX
Computer organization and architecture lab manual
PPT
Comp Arithmetic Basic.ppt
PDF
N akkk4lmealkkk3eqklaflerkpwoerkwflskkes
PPT
Program design techniques
PDF
DL&CO'S-1.pdf deep learning & computer orgonization
PPT
Digital Logic & Design (DLD) presentation
PPTX
Computer Arithmetic and Binary Math.pptx
PPTX
Unsigned multiplication
PPT
105_2_digitalSystem_Chap_3_part_3.ppt
PDF
Encoding Schemes for Multipliers
Boolean operators
Binary Arithmetic
05 multiply divide
Binary Arithmetic
binary arithmetic conversion.pptx
CA UNIT II.pptx
Addition and subtraction with signed magnitude data (mano
Arithmetic Unit Addition Subtraction Multiplication and Division
Arithmetic for Computers
computer arithmatic
Computer organization and architecture lab manual
Comp Arithmetic Basic.ppt
N akkk4lmealkkk3eqklaflerkpwoerkwflskkes
Program design techniques
DL&CO'S-1.pdf deep learning & computer orgonization
Digital Logic & Design (DLD) presentation
Computer Arithmetic and Binary Math.pptx
Unsigned multiplication
105_2_digitalSystem_Chap_3_part_3.ppt
Encoding Schemes for Multipliers
Ad

More from ZareenRauf1 (13)

PPTX
Communication system lec 8
PPTX
Communication system lec7
PPTX
Communication system lec6
PPTX
Communication system lec5
PPTX
communication system lec4
PPTX
communication system lec3
PPTX
communication system lec2
PPTX
Communication system
PPT
Boolean algebra and logic gates
PPT
Binary codes
PPT
Boolean functions
PPT
Lecture 2
PPT
Lecture 1
Communication system lec 8
Communication system lec7
Communication system lec6
Communication system lec5
communication system lec4
communication system lec3
communication system lec2
Communication system
Boolean algebra and logic gates
Binary codes
Boolean functions
Lecture 2
Lecture 1

Recently uploaded (20)

PPTX
UNIT - 3 Total quality Management .pptx
PPT
Total quality management ppt for engineering students
PDF
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
PDF
Soil Improvement Techniques Note - Rabbi
PPT
Introduction, IoT Design Methodology, Case Study on IoT System for Weather Mo...
PDF
III.4.1.2_The_Space_Environment.p pdffdf
PPTX
Current and future trends in Computer Vision.pptx
PDF
Integrating Fractal Dimension and Time Series Analysis for Optimized Hyperspe...
PDF
EXPLORING LEARNING ENGAGEMENT FACTORS INFLUENCING BEHAVIORAL, COGNITIVE, AND ...
PPTX
Information Storage and Retrieval Techniques Unit III
PPTX
Artificial Intelligence
PDF
UNIT no 1 INTRODUCTION TO DBMS NOTES.pdf
PDF
PPT on Performance Review to get promotions
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PPTX
CURRICULAM DESIGN engineering FOR CSE 2025.pptx
PDF
737-MAX_SRG.pdf student reference guides
PPTX
Nature of X-rays, X- Ray Equipment, Fluoroscopy
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PPT
INTRODUCTION -Data Warehousing and Mining-M.Tech- VTU.ppt
PDF
BIO-INSPIRED ARCHITECTURE FOR PARSIMONIOUS CONVERSATIONAL INTELLIGENCE : THE ...
UNIT - 3 Total quality Management .pptx
Total quality management ppt for engineering students
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
Soil Improvement Techniques Note - Rabbi
Introduction, IoT Design Methodology, Case Study on IoT System for Weather Mo...
III.4.1.2_The_Space_Environment.p pdffdf
Current and future trends in Computer Vision.pptx
Integrating Fractal Dimension and Time Series Analysis for Optimized Hyperspe...
EXPLORING LEARNING ENGAGEMENT FACTORS INFLUENCING BEHAVIORAL, COGNITIVE, AND ...
Information Storage and Retrieval Techniques Unit III
Artificial Intelligence
UNIT no 1 INTRODUCTION TO DBMS NOTES.pdf
PPT on Performance Review to get promotions
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
CURRICULAM DESIGN engineering FOR CSE 2025.pptx
737-MAX_SRG.pdf student reference guides
Nature of X-rays, X- Ray Equipment, Fluoroscopy
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
INTRODUCTION -Data Warehousing and Mining-M.Tech- VTU.ppt
BIO-INSPIRED ARCHITECTURE FOR PARSIMONIOUS CONVERSATIONAL INTELLIGENCE : THE ...

1's and 2's Complements