SlideShare a Scribd company logo
1 of 5
DATA REPRESENTATION:
In data representation, we will look for how negative numbers can be
represented.
UNSIGNED REPRESENTATION:
Only positive number will be represented, if it’s of 3 bit the range of number of
unsigned magnitude is (0 to 7).
For n bit, the range of a number can be represented in unsigned magnitude is
(0 to 2n
-1).
SIGNED REPRESNTATION:
Both of positive and negative number will be represented.
For positive number the magnitude is of same magnitude and MSB bit is of 0.
For negative number the magnitude is of same magnitude and MSB bit is of 1.
For 4 bit , the range of number can be represented as :
MSB MSB
0 000 0 1 000 -0
0 001 1 001
0 010 1 010
0 011 1 011
0 100 1 100
0 101 1 101
0 110 1 110
0 111 7 1 111 -7
For n bits range of a number can be represented in signed magnitude
representation as (-2n-1
-1 to 2n-1
-1).
Drawbacks:
Two types of “0” representation are there in this format.
1’s COMPLEMENTREPRESENTATION:
Both positive and negative number will be represented.
For positive number, the magnitude is of the same magnitude and MSB bit is of
0.
For negative number, the magnitude should be 1’s complemented and MSB bit
is of 1.
For 4 bit , the range of number can be represented as :
MSB MSB
0 000 0 1 111 -7
0 001 1 110
0 010 1 101
0 011 1 100
0 100 1 011
0 101 1 010
0 110 1 001
0 111 7 1 000 -0
For n bits range of a number can be represented in 1’s Complement
representation is (-2n-1
-1 to 2n-1
-1).
Drawbacks:
Two types of “0” representation also in this format.
When performing addition operation if we got final carry in order to get the
final carry is also added to the result.
There is no range extension.
In order to overcome all the drawbacks, we go for 2’s complement.
2’S COMPLEMENT:
Both positive and negative number will be represented.
For positive number magnitude is of same magnitude and MSB is 0.
For negative number magnitude will be represented in 2’s Complement and
MSB bit is of 1.
Shortcuts:
Eg: 1 0110
MSB
Method 1 : 1 0110
1001
1
1 1010 ( -10)
Method 2: 1 0110
N=22 (decimal value)
n=5 ( no. of digit )
= N-2n
=22-25
= -10
Method 3: 1 0110
-16 8421
= -16+8+4+2+1= -10
For 4 bit , the range of number can be represented as :
MSB MSB
0 000 0 1 000 -8
0 001 1 111
0 010 1 110
0 011 1 101
0 100 1 100
0 101 1 011
0 110 1 010
0 111 7 1 001 -7
For n bit the range of numbers we can represent as (-2n-1
) to (2n-1
– 1).
Advantage:
a) Only one representation for ‘0’.
b) Range is increased.
c) Final carry will be discarded in 2’s Complement.
d) 2’s Complement have a 8 4 2 1 extension.
e) 2’s Complement has a extension bit.
Eg: 1101 which gives -3.
( -8+4+1) = -3
It can be extended to 8 bit.
i.e. 1111 1101
Extension bit which leads to same value i.e. (-128+64+32+16+8+4+1) = -3

More Related Content

What's hot

Integers numberline (1)
Integers numberline (1)Integers numberline (1)
Integers numberline (1)
Girlie Tacuban
 
Integers numberline
Integers numberlineIntegers numberline
Integers numberline
Amro Soliman
 
Hockey stick n odd even
Hockey stick n odd evenHockey stick n odd even
Hockey stick n odd even
nur fara
 

What's hot (20)

Integers numberline (1)
Integers numberline (1)Integers numberline (1)
Integers numberline (1)
 
Integers numberline
Integers numberlineIntegers numberline
Integers numberline
 
Number system
Number systemNumber system
Number system
 
Dimensioning
DimensioningDimensioning
Dimensioning
 
Introduction To Integers
Introduction To IntegersIntroduction To Integers
Introduction To Integers
 
División de Polinomios.
División de Polinomios.División de Polinomios.
División de Polinomios.
 
Math chapter 3 non-positive integer exponents with materials
Math chapter 3 non-positive integer exponents with materialsMath chapter 3 non-positive integer exponents with materials
Math chapter 3 non-positive integer exponents with materials
 
Binary arithmetic
Binary arithmeticBinary arithmetic
Binary arithmetic
 
Hockey stick n odd even
Hockey stick n odd evenHockey stick n odd even
Hockey stick n odd even
 
Significant figures
Significant figuresSignificant figures
Significant figures
 
Lenguaje Algebraico y Monomio
Lenguaje Algebraico y MonomioLenguaje Algebraico y Monomio
Lenguaje Algebraico y Monomio
 
Lecture 5 binary_codes
Lecture 5 binary_codesLecture 5 binary_codes
Lecture 5 binary_codes
 
Number theory
Number theoryNumber theory
Number theory
 
BCD.
BCD.BCD.
BCD.
 
BCD to Decimal - Digital Electronics
BCD to Decimal - Digital ElectronicsBCD to Decimal - Digital Electronics
BCD to Decimal - Digital Electronics
 
Real numbers
Real numbersReal numbers
Real numbers
 
7 problesm on numbers
7 problesm on numbers7 problesm on numbers
7 problesm on numbers
 
Unit 05 number line
Unit 05 number lineUnit 05 number line
Unit 05 number line
 
Number
NumberNumber
Number
 
Unit 3 Data Representation
Unit 3 Data RepresentationUnit 3 Data Representation
Unit 3 Data Representation
 

Similar to Data representation

3.Fixed-Floating Point.ppt
3.Fixed-Floating Point.ppt3.Fixed-Floating Point.ppt
3.Fixed-Floating Point.ppt
RavikumarR77
 
Unit1_Part2-Machine_Instructions_Programs_7_9_2018_3pm.ppt
Unit1_Part2-Machine_Instructions_Programs_7_9_2018_3pm.pptUnit1_Part2-Machine_Instructions_Programs_7_9_2018_3pm.ppt
Unit1_Part2-Machine_Instructions_Programs_7_9_2018_3pm.ppt
ChiragSuresh
 

Similar to Data representation (20)

Representation of Integers
Representation of IntegersRepresentation of Integers
Representation of Integers
 
binary arithmetic rules
binary arithmetic rulesbinary arithmetic rules
binary arithmetic rules
 
Introduction to number system
Introduction to number systemIntroduction to number system
Introduction to number system
 
Introduction of number system
Introduction of number systemIntroduction of number system
Introduction of number system
 
3.Fixed-Floating Point.ppt
3.Fixed-Floating Point.ppt3.Fixed-Floating Point.ppt
3.Fixed-Floating Point.ppt
 
module 1_class_numbers.pptx
module 1_class_numbers.pptxmodule 1_class_numbers.pptx
module 1_class_numbers.pptx
 
Notes unit 2
Notes   unit 2Notes   unit 2
Notes unit 2
 
chapter 2 part 2.pdf
chapter 2 part 2.pdfchapter 2 part 2.pdf
chapter 2 part 2.pdf
 
DLD_PPT_0.pptx
DLD_PPT_0.pptxDLD_PPT_0.pptx
DLD_PPT_0.pptx
 
Decimal to Binary Conversion
Decimal to Binary ConversionDecimal to Binary Conversion
Decimal to Binary Conversion
 
Data Representation
Data RepresentationData Representation
Data Representation
 
Unit 1 data representation and computer arithmetic
Unit 1  data representation and computer arithmeticUnit 1  data representation and computer arithmetic
Unit 1 data representation and computer arithmetic
 
FYBSC IT Digital Electronics Unit I Chapter II Number System and Binary Arith...
FYBSC IT Digital Electronics Unit I Chapter II Number System and Binary Arith...FYBSC IT Digital Electronics Unit I Chapter II Number System and Binary Arith...
FYBSC IT Digital Electronics Unit I Chapter II Number System and Binary Arith...
 
Number system and codes
Number system and codesNumber system and codes
Number system and codes
 
Unit1_Part2-Machine_Instructions_Programs_7_9_2018_3pm.ppt
Unit1_Part2-Machine_Instructions_Programs_7_9_2018_3pm.pptUnit1_Part2-Machine_Instructions_Programs_7_9_2018_3pm.ppt
Unit1_Part2-Machine_Instructions_Programs_7_9_2018_3pm.ppt
 
Data Representation
Data RepresentationData Representation
Data Representation
 
IARE_DLD_PPT_0.pdf
IARE_DLD_PPT_0.pdfIARE_DLD_PPT_0.pdf
IARE_DLD_PPT_0.pdf
 
Chapter 2_Number system (EEEg4302).pdf
Chapter 2_Number system (EEEg4302).pdfChapter 2_Number system (EEEg4302).pdf
Chapter 2_Number system (EEEg4302).pdf
 
W3 Chapter 2B Notes CCB1223 Digital Logic.pdf
W3 Chapter 2B Notes CCB1223 Digital Logic.pdfW3 Chapter 2B Notes CCB1223 Digital Logic.pdf
W3 Chapter 2B Notes CCB1223 Digital Logic.pdf
 
CDS Fundamentals of digital communication system UNIT 1 AND 2.pdf
CDS Fundamentals of digital communication system UNIT 1 AND 2.pdfCDS Fundamentals of digital communication system UNIT 1 AND 2.pdf
CDS Fundamentals of digital communication system UNIT 1 AND 2.pdf
 

Recently uploaded

Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
amitlee9823
 
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 

Recently uploaded (20)

chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineering
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
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
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
 

Data representation

  • 1. DATA REPRESENTATION: In data representation, we will look for how negative numbers can be represented. UNSIGNED REPRESENTATION: Only positive number will be represented, if it’s of 3 bit the range of number of unsigned magnitude is (0 to 7). For n bit, the range of a number can be represented in unsigned magnitude is (0 to 2n -1). SIGNED REPRESNTATION: Both of positive and negative number will be represented. For positive number the magnitude is of same magnitude and MSB bit is of 0. For negative number the magnitude is of same magnitude and MSB bit is of 1. For 4 bit , the range of number can be represented as :
  • 2. MSB MSB 0 000 0 1 000 -0 0 001 1 001 0 010 1 010 0 011 1 011 0 100 1 100 0 101 1 101 0 110 1 110 0 111 7 1 111 -7 For n bits range of a number can be represented in signed magnitude representation as (-2n-1 -1 to 2n-1 -1). Drawbacks: Two types of “0” representation are there in this format. 1’s COMPLEMENTREPRESENTATION: Both positive and negative number will be represented. For positive number, the magnitude is of the same magnitude and MSB bit is of 0. For negative number, the magnitude should be 1’s complemented and MSB bit is of 1. For 4 bit , the range of number can be represented as :
  • 3. MSB MSB 0 000 0 1 111 -7 0 001 1 110 0 010 1 101 0 011 1 100 0 100 1 011 0 101 1 010 0 110 1 001 0 111 7 1 000 -0 For n bits range of a number can be represented in 1’s Complement representation is (-2n-1 -1 to 2n-1 -1). Drawbacks: Two types of “0” representation also in this format. When performing addition operation if we got final carry in order to get the final carry is also added to the result. There is no range extension. In order to overcome all the drawbacks, we go for 2’s complement. 2’S COMPLEMENT: Both positive and negative number will be represented. For positive number magnitude is of same magnitude and MSB is 0.
  • 4. For negative number magnitude will be represented in 2’s Complement and MSB bit is of 1. Shortcuts: Eg: 1 0110 MSB Method 1 : 1 0110 1001 1 1 1010 ( -10) Method 2: 1 0110 N=22 (decimal value) n=5 ( no. of digit ) = N-2n =22-25 = -10 Method 3: 1 0110 -16 8421 = -16+8+4+2+1= -10 For 4 bit , the range of number can be represented as :
  • 5. MSB MSB 0 000 0 1 000 -8 0 001 1 111 0 010 1 110 0 011 1 101 0 100 1 100 0 101 1 011 0 110 1 010 0 111 7 1 001 -7 For n bit the range of numbers we can represent as (-2n-1 ) to (2n-1 – 1). Advantage: a) Only one representation for ‘0’. b) Range is increased. c) Final carry will be discarded in 2’s Complement. d) 2’s Complement have a 8 4 2 1 extension. e) 2’s Complement has a extension bit. Eg: 1101 which gives -3. ( -8+4+1) = -3 It can be extended to 8 bit. i.e. 1111 1101 Extension bit which leads to same value i.e. (-128+64+32+16+8+4+1) = -3