SlideShare a Scribd company logo
SD & D Negative Numbers
Real Numbers & Integers
All numbers belong to the set or group called real numbers.
Inside the set of real numbers is a set of all positive and negative whole numbers.
This set is called integers.
Real numbers
-4.6
2.46
13.7
Integers
0
-7
5
221
-31
100.052
-52.414
0.0014
Signed Bit Representation
The simplest way of representing a negative number in binary is to
use the first bit of the number to represent whether the number is
positive or negative:
011 = 3
111 = -3
This is known as signed bit representation.
Signed Bit Representation
The simplest way of representing a negative number in binary is to
use the first bit of the number to represent whether the number is
positive or negative:
011 = 3
111 = -3
This is known as signed bit representation.
The problem with signed bit representation is that there are 2
values for zero:
000 = 0
100 = -0
Two’s Complement Representation
A better way of representing negative numbers in binary is by using Two’s
Complement.
Two’s Complement is designed so that:
Binary Decimal
11111101 -3
11111110 -2
11111111 -1
00000000 0
00000001 1
00000010 2
00000011 3
1. the set of integers show symmetry about zero
Two’s Complement Representation
Two’s complement is designed so that:
00000010
+ 1
00000011
2. adding 1 to any number produces the next number (ignoring carry bits)
Two’s Complement Representation
To find the Two’s Complement of a number (its opposite sign):
1. Change all the 1’s to 0 and 0’s to 1.
2. Add 1.
Two’s Complement Representation
For example, how would -5 be represented using Two’s
Complement?
5 = 000000101
1. Change all the 1’s to 0 and 0’s to 1.
11111010
Two’s Complement Representation
For example, how would -5 be represented using Two’s
Complement?
5 = 000000101
1. Change all the 1’s to 0 and 0’s to 1.
11111010
2. Add 1.
11111010
+1
11111011
So -5 as Two’s Complement = 11111011
Two’s Complement Representation
Example 2 - find the Two’s Complement of 88
88 = 01011000
1. Change all the 1’s to 0 and 0’s to 1.
10100111
Two’s Complement Representation
Example 2 - find the Two’s Complement of 88
88 = 01011000
1. Change all the 1’s to 0 and 0’s to 1.
10100111
2. Add 1.
10100111
+1
10101000
So -88 as Two’s Complement = 10101000
Range
The number of integers which could be stored in one byte (8 bits) is
28
= 256
Range
The number of integers which could be stored in one byte (8 bits) is
28
= 256
The range of integers which could be stored in one byte (8 bits) using
Two’s Complement is
-128 to +127
Why does there seem to be one less positive number?
There are 255 numbers plus the value 0. So there are 256 numbers in all.
Range
What range of numbers could be stored in two bytes using twos complement?
216
= 65536
Range
What range of numbers could be stored in two bytes using twos complement?
216
= 65536
The range of integers which could be stored in two bytes (16 bits) is
-32768 to +32767
Range
What range of numbers could be stored in two bytes using twos complement?
216
= 65536
The range of integers which could be stored in two bytes (16 bits) is
-32768 to +32767
This method of representing large numbers is unsuitable because of the
increased memory needed to store the large number of bits needed.
A solution to this is to use Floating Point Representation.
Credits
Higher Computing – Data Representation – Representation of Negative
Numbers
Produced by P. Greene and adapted by R. G. Simpson for the City of
Edinburgh Council 2004
Adapted by M. Cunningham 2010

More Related Content

PPT
SD & D Real Numbers
PPT
Representation of Negative Numbers
PPTX
Representation of Signed Numbers - R.D.Sivakumar
DOCX
Number system.pdf
PPTX
Number System
PPT
Number system part 1
PPT
Representation of Real Numbers
PDF
Floating point presentation
SD & D Real Numbers
Representation of Negative Numbers
Representation of Signed Numbers - R.D.Sivakumar
Number system.pdf
Number System
Number system part 1
Representation of Real Numbers
Floating point presentation

What's hot (19)

PPTX
Floating point representation
PPTX
Binary Arithmetic
PDF
Number System and Boolean Algebra
PPT
Binary coded decimal r004
PPT
Integer Representation
PPTX
The Real Numbers
PDF
IEEE Floating Point
PPTX
Convertion of single precision
PPTX
Quick tutorial on IEEE 754 FLOATING POINT representation
PPT
Data types
PPTX
NUMBER SYSTEM
PPTX
Number System
PPT
Representation Of Data
PPT
CBNST PPT, Floating point arithmetic,Normalization
PPTX
Representation of Integers
PPT
Real numbers
DOCX
Number system with conversions www.eakanchha.com
PPTX
Number system
PPT
Data representation
Floating point representation
Binary Arithmetic
Number System and Boolean Algebra
Binary coded decimal r004
Integer Representation
The Real Numbers
IEEE Floating Point
Convertion of single precision
Quick tutorial on IEEE 754 FLOATING POINT representation
Data types
NUMBER SYSTEM
Number System
Representation Of Data
CBNST PPT, Floating point arithmetic,Normalization
Representation of Integers
Real numbers
Number system with conversions www.eakanchha.com
Number system
Data representation
Ad

Viewers also liked (12)

PPT
SD &D Binary Units
PPT
SD & D Maintenance
PPT
SD & D High and low level languages
PPT
SD & D Representing Positive Numbers
PPT
SD & D Types of programming language
PPTX
Integers in real world
PPTX
Representing integers
PPT
INTEGERS INTRO
PPT
Introduction to web design
PPT
Virtual machines, emulators and mobile devices
PPTX
Integers in the Real World
PDF
7. The Software Development Process - Maintenance
SD &D Binary Units
SD & D Maintenance
SD & D High and low level languages
SD & D Representing Positive Numbers
SD & D Types of programming language
Integers in real world
Representing integers
INTEGERS INTRO
Introduction to web design
Virtual machines, emulators and mobile devices
Integers in the Real World
7. The Software Development Process - Maintenance
Ad

Similar to SD & D Negative Numbers (20)

PPT
PPT
Mba admission in india
PPTX
DE -gxgxhxydydydfyfduffuf UEEB02 - L 7.pptx
PPT
Mba admission in india
PPT
Lecture 06 computer arithmatic
PPTX
Computer Architecture Binary Arithmetic Lecture.pptx
PPT
Lecture 3
PPT
สอนสนอนlec3สอนสนอนlec3สอนสนอนlec3สอนสนอนlec3สอนสนอนlec3
PPT
Lecture 1-431171839-lec2-BinaryArithmetic.ppt
DOCX
2's complement
PPTX
Signed and Unsigned Numbers and Complement - Copy.pptx
PPT
Twos_Complement_Binary in Information Technology
PPT
lec2_BinaryArithmetic.ppt
PDF
DigitalLogic_NumberRepresentation.pdf advanced
PPT
Data storage (number,string,sound, image and video
PPT
Digital fundamendals r001a
PDF
digital-electronics (1)_watermark.pdfhindi
PDF
Chapter 4
PPT
Number Systems.ppt
PPTX
module 1_class_numbers.pptx
Mba admission in india
DE -gxgxhxydydydfyfduffuf UEEB02 - L 7.pptx
Mba admission in india
Lecture 06 computer arithmatic
Computer Architecture Binary Arithmetic Lecture.pptx
Lecture 3
สอนสนอนlec3สอนสนอนlec3สอนสนอนlec3สอนสนอนlec3สอนสนอนlec3
Lecture 1-431171839-lec2-BinaryArithmetic.ppt
2's complement
Signed and Unsigned Numbers and Complement - Copy.pptx
Twos_Complement_Binary in Information Technology
lec2_BinaryArithmetic.ppt
DigitalLogic_NumberRepresentation.pdf advanced
Data storage (number,string,sound, image and video
Digital fundamendals r001a
digital-electronics (1)_watermark.pdfhindi
Chapter 4
Number Systems.ppt
module 1_class_numbers.pptx

More from Forrester High School (20)

PPTX
Program Design
PPTX
Database Evaluation
PPTX
PPTX
Database Query Design
PPTX
Data Dictionary
PPTX
Compound Keys
PPTX
Entity Occurrence Diagrams
PPTX
Entity Relationship Diagrams
PPTX
Database Analysis
PPTX
Software Evaluation
PPTX
Software Testing
PPTX
Standard Algorithms
PPTX
File Handling
PPTX
Python Predefined Functions
PPTX
Python Substrings
PPTX
Variable Scope
PPTX
Sub-programs
PPTX
Records in Python
PPTX
Parallel arrays in python
Program Design
Database Evaluation
Database Query Design
Data Dictionary
Compound Keys
Entity Occurrence Diagrams
Entity Relationship Diagrams
Database Analysis
Software Evaluation
Software Testing
Standard Algorithms
File Handling
Python Predefined Functions
Python Substrings
Variable Scope
Sub-programs
Records in Python
Parallel arrays in python

Recently uploaded (20)

PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
PPTX
Cell Types and Its function , kingdom of life
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PDF
Weekly quiz Compilation Jan -July 25.pdf
PDF
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf
PPTX
Pharma ospi slides which help in ospi learning
PPTX
Orientation - ARALprogram of Deped to the Parents.pptx
PPTX
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
PDF
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
Chinmaya Tiranga quiz Grand Finale.pdf
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
human mycosis Human fungal infections are called human mycosis..pptx
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
Cell Types and Its function , kingdom of life
STATICS OF THE RIGID BODIES Hibbelers.pdf
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
Weekly quiz Compilation Jan -July 25.pdf
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf
Pharma ospi slides which help in ospi learning
Orientation - ARALprogram of Deped to the Parents.pptx
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
Module 4: Burden of Disease Tutorial Slides S2 2025
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Supply Chain Operations Speaking Notes -ICLT Program
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
FourierSeries-QuestionsWithAnswers(Part-A).pdf
Chinmaya Tiranga quiz Grand Finale.pdf
2.FourierTransform-ShortQuestionswithAnswers.pdf

SD & D Negative Numbers

  • 2. Real Numbers & Integers All numbers belong to the set or group called real numbers. Inside the set of real numbers is a set of all positive and negative whole numbers. This set is called integers. Real numbers -4.6 2.46 13.7 Integers 0 -7 5 221 -31 100.052 -52.414 0.0014
  • 3. Signed Bit Representation The simplest way of representing a negative number in binary is to use the first bit of the number to represent whether the number is positive or negative: 011 = 3 111 = -3 This is known as signed bit representation.
  • 4. Signed Bit Representation The simplest way of representing a negative number in binary is to use the first bit of the number to represent whether the number is positive or negative: 011 = 3 111 = -3 This is known as signed bit representation. The problem with signed bit representation is that there are 2 values for zero: 000 = 0 100 = -0
  • 5. Two’s Complement Representation A better way of representing negative numbers in binary is by using Two’s Complement. Two’s Complement is designed so that: Binary Decimal 11111101 -3 11111110 -2 11111111 -1 00000000 0 00000001 1 00000010 2 00000011 3 1. the set of integers show symmetry about zero
  • 6. Two’s Complement Representation Two’s complement is designed so that: 00000010 + 1 00000011 2. adding 1 to any number produces the next number (ignoring carry bits)
  • 7. Two’s Complement Representation To find the Two’s Complement of a number (its opposite sign): 1. Change all the 1’s to 0 and 0’s to 1. 2. Add 1.
  • 8. Two’s Complement Representation For example, how would -5 be represented using Two’s Complement? 5 = 000000101 1. Change all the 1’s to 0 and 0’s to 1. 11111010
  • 9. Two’s Complement Representation For example, how would -5 be represented using Two’s Complement? 5 = 000000101 1. Change all the 1’s to 0 and 0’s to 1. 11111010 2. Add 1. 11111010 +1 11111011 So -5 as Two’s Complement = 11111011
  • 10. Two’s Complement Representation Example 2 - find the Two’s Complement of 88 88 = 01011000 1. Change all the 1’s to 0 and 0’s to 1. 10100111
  • 11. Two’s Complement Representation Example 2 - find the Two’s Complement of 88 88 = 01011000 1. Change all the 1’s to 0 and 0’s to 1. 10100111 2. Add 1. 10100111 +1 10101000 So -88 as Two’s Complement = 10101000
  • 12. Range The number of integers which could be stored in one byte (8 bits) is 28 = 256
  • 13. Range The number of integers which could be stored in one byte (8 bits) is 28 = 256 The range of integers which could be stored in one byte (8 bits) using Two’s Complement is -128 to +127 Why does there seem to be one less positive number? There are 255 numbers plus the value 0. So there are 256 numbers in all.
  • 14. Range What range of numbers could be stored in two bytes using twos complement? 216 = 65536
  • 15. Range What range of numbers could be stored in two bytes using twos complement? 216 = 65536 The range of integers which could be stored in two bytes (16 bits) is -32768 to +32767
  • 16. Range What range of numbers could be stored in two bytes using twos complement? 216 = 65536 The range of integers which could be stored in two bytes (16 bits) is -32768 to +32767 This method of representing large numbers is unsuitable because of the increased memory needed to store the large number of bits needed. A solution to this is to use Floating Point Representation.
  • 17. Credits Higher Computing – Data Representation – Representation of Negative Numbers Produced by P. Greene and adapted by R. G. Simpson for the City of Edinburgh Council 2004 Adapted by M. Cunningham 2010