SlideShare a Scribd company logo
Data Representation
By: Manish Kumar, PGT, Sainik
Schol Gopalganj (Bihar), India
Data Representation
The term data representation means the
code or technique in which the data can be
represented.
Number Systems
Number systems are very important to understand
because the design and organization of a
computer depends on the number systems. The
four kind of number system used by the digital
computer –
1.Decimal number system
2.Binary number system
3.Octal number system
4.Hexadecimal number system
Decimal Number System
The decimal number system consists of
10 digits namely 0 to 9.
Since the decimal number system
consists of 10 digits, the base or radix of
this system is 10.
e.g (405)10 , (145.25)10
Octal Number System
The octal number system consists of 8 digits
namely 0 to 7.
Since the Octal number system consists of 8
digits, the base or radix of this system is 8.
e.g (76)8 , (55.25)8
Binary Number System
The binary number system consists of 2
digits namely 0 and 1.
Since the binary number system consists of
2 digits, the base or radix of this system is 2.
e.g (101)2 , (1001.11)2
Hexadecimal Number System
The Hexadecimal number system,
popularly known as Hex system has 16
symbols, therefore its base/radix in 16.
The 16 symbols used in Hexadecimal
system are 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F
e.g (45)16, (11A)16
Conversion between Number
Systems
Decimal into Binary
Step 1. Divide the decimal number by the
base of binary using the repeated-division
method.
Step 2. Note the remainder separately.
Step 3. Arrange the remainder in an order
where the first remainder noted is LSD and
the last remainder is MSD.
Conversion between Number
Systems
Decimal into Binary (Contd…)
Conversion between Number
Systems
Decimal into Octal
Step 1. Divide the decimal number by the
base of octal using the repeated-division
method.
Step 2. Note the remainder separately.
Step 3. Arrange the remainder in an order
where the first remainder noted is LSD and
the last remainder is MSB.
Conversion between Number
Systems
Decimal into Octal (Contd…)
Conversion between Number
Systems
Decimal into Hexadecimal
Step 1. Divide the decimal number by the
base of Hexadecimal using the repeated-
division method.
Step 2. Note the remainder separately.
Step 3. Arrange the remainder in an order
where the first remainder noted is LSD and
the last remainder is MSB.
Conversion between Number
Systems
Decimal into Hexadecimal (Contd…)
Conversion between Number
Systems
Step 1. Multiply the fractional part by the
base of the numbers system (2, 8 or 16).
Step 2. Remove the whole number from
the product (the result of the
multiplication) and collect it separately.
Step 3. Repeat the step 1 and 2 with the
new fractional part till the fractional part
becomes zero.
Decimal real number into Binary, Octal and Hexadecimal
Conversion between Number
Systems
Any binary number can be converted into
decimal number using the weights assigned
to each bit.
e.g. (11011)2
Its decimal equivalent is
1x24
+1x23
+0x22
+1x21
+1x20
= (27)10
Binary to Decimal
Conversion between Number
Systems
1.Indirect Method:
Binary  Decimal  Octal
e.g. (11011)2
Its decimal equivalent is
1x24
+1x23
+0x22
+1x21
+1x20
= (27)10
And its Octal equivalent is (33)8
(division method)
Binary to Octal
Conversion between Number
Systems
2. Direct Method
Binary  Octal
Step 1: Make the group of 3-bits from right to left for
integer from left to right for fraction.
Step 2: Find decimal equivalent of each group.
Note: if the left most group (in integer) and the right most
group (in fraction) present with less than 3-bits make that
group by adding one or two zeros.
Binary to Octal (Contd…)
Conversion between Number
Systems
Direct Method: e.g.
Binary  Octal
e.g. (101111)2 = (? )8
(101111)2 = (57)8
Binary to Octal (Contd…)
Conversion between Number
Systems
1.Indirect Method:
Binary  Decimal  Hexa
e.g. (11011)2
Its decimal equivalent is
1x24
+1x23
+0x22
+1x21
+1x20
= (27)10
And its Hexa equivalent is (1B)16 (Division method)
Binary to Hexa
Conversion between Number
Systems
2. Direct Method:
Binary  Hexa
Step 1: Make the group of 4-bits from right to left for
integer from left to right for fraction.
Step 2: Find decimal equivalent of each group.
Note: if the left most group (in integer) and the right most
group (in fraction) present with less than 4-bits make that
group by adding one, two or three zeros.
Binary to Hexa
Conversion between Number
Systems
Direct Method: e.g.
Binary  Hexa
e.g. (101111)2 = (? )16
(0010 1111)2 = (215)16 = (2F)16
Binary to Hexa
Conversion between Number
Systems
Any octal number can be converted into
decimal number using the weights assigned
to each bit.
e.g. (75)8
Its decimal equivalent is
7x81
+5x80
= (61)10
Octal to Decimal
Conversion between Number
Systems
Any octal number can be converted into
binary number by converting each bit of
octal into its equivalent 3-bit binary
number.
e.g. (75)8
Its binary equivalent is (111101)2
Octal to Binary
Conversion between Number
Systems
Octal  Binary  Hexa
Step1. Convert each digit of the octal into its 3 bit
binary equivalent.
Step2. Combine all the 3-bit binary equivalents to
form the entire binary sequence.
Step3. Make group of 4 bits staring from LSD. The
extra zeros for the completion of a group are
placed at the leftmost end of the number.
Step 4. Convert each of the 4-bit groups into their
hexadecimal equivalents.
Octal to Hexa
Conversion between Number
Systems
Octal  Binary  Hexa
Octal to Hexa (Contd…)
Conversion between Number
Systems
Hexa to decimal
Conversion between Number
Systems
Hexa to binary
Binary representation of
integers
Binary equivalent of the integers are stored
in memory including one additional bit for
representing the sign of integers (positive
or negative).
If the binary equivalent of the integer
includes one additional bit for
representing its sign, that binary
number is called signed binary
number.
Binary representation of
integers
There are three ways for representing the
positive and negative integers into its
binary equivalent.
1.Sign magnitude representation
2.One’s Complement
3.Two’s Complement
Binary representation of
integers
1.Sign magnitude representation
In the sign magnitude representation,
positive number have a additional bit (sign
bit) 0, while the negative number has a
sign bit 1, while the magnitude is a simple
binary equivalent of the number.
E.g. +5 and -5 can be representing in 6 bit
register as:
+5 = 0 00101 and -5 = 1 00101
Binary representation of
integers
Note: In every representation
technique , the representation
of positive number is identical
to that used in the sign
magnitude system i.e simple
binary form including sign bit
0.
Binary representation of
integers
2. One’s Complement representation
In one's complement, positive numbers are
represented as usual in signed magnitude.
However, negative numbers are represented
differently. To negate a number, replace all
zeros with ones, and ones with zeros - flip the
bits.
+12 = 0 0001100, and -12 = 1 1110011.
Binary representation of
integers
3. Two’s Complement representation
In two's complement, positive numbers are
represented as usual in signed magnitude.
However, negative numbers are represented
by adding 1 in magnitude part of one’s
complement.
+12= 0 0001100
-12 = 1 1110011 (1’s complement)
-12 = 1 1110100 (2’s complement)
Binary Addition
Rule for Binary Addition:
0 + 0 = 0
0 + 1 = 1
1 + 0 = 1
1 + 1 = 0 (Carry 1)
Binary Addition
Example:
Add 110101 and 101111
1 1 0 1 0 1
1 0 1 1 1 1
1 1 0 0 1 0 0
Binary Addition
Example:
Add 10110 and 1101
1 0 1 1 0
0 1 1 0 1
1 0 0 0 1 1
Any Question…

More Related Content

Similar to Data Representation Data Representation1 (20)

PPTX
NUMBER SYSTEM.pptx
AsifRahaman16
 
PDF
FYBSC IT Digital Electronics Unit I Chapter I Number System and Binary Arithm...
Arti Parab Academics
 
PPTX
04 chapter03 02_numbers_systems_student_version_fa16
John Todora
 
PPTX
6. Number Systems conversion from binary, decimal, octal etc
ssuserda90bb
 
PPTX
Number Systems.pptx. grade 7-number system
lyssonsarzona24
 
PPTX
Number Systems in software engineering.pptx
olisahchristopher
 
PPTX
Chapter two FHI.pptx
ODAATUBE1
 
RTF
DCF QNA edited
Emmanuel Eniola Falade
 
PPTX
Data repersentation.
Ritesh Saini
 
PPTX
Computer arithmetic operations.pptx
ssusera6fdd5
 
PPTX
module 3,Boolean algebra and logic circuits .pptx
keemjupiter
 
PPTX
Presentaion on introduction to Number system
DeepakThakur465173
 
PPTX
Chapter 03-Number System-Computer Application.pptx
gadisaAdamu
 
PPTX
Number systems and conversions
Susantha Herath
 
PPTX
Number system and their conversion
Ram Pratap Singh
 
PPTX
Data Representation
Education Front
 
PDF
Data representation in computers
Prof. Dr. K. Adisesha
 
PPTX
Digital Principles & System Design Unit1_Number systems
KanmaniRajamanickam
 
PPTX
Chapter 1: Binary System
Er. Nawaraj Bhandari
 
PPTX
LEfddfffhhfrrdvvggfdwfcxsfvdsfgC 02 A.pptx
Ahsan433
 
NUMBER SYSTEM.pptx
AsifRahaman16
 
FYBSC IT Digital Electronics Unit I Chapter I Number System and Binary Arithm...
Arti Parab Academics
 
04 chapter03 02_numbers_systems_student_version_fa16
John Todora
 
6. Number Systems conversion from binary, decimal, octal etc
ssuserda90bb
 
Number Systems.pptx. grade 7-number system
lyssonsarzona24
 
Number Systems in software engineering.pptx
olisahchristopher
 
Chapter two FHI.pptx
ODAATUBE1
 
DCF QNA edited
Emmanuel Eniola Falade
 
Data repersentation.
Ritesh Saini
 
Computer arithmetic operations.pptx
ssusera6fdd5
 
module 3,Boolean algebra and logic circuits .pptx
keemjupiter
 
Presentaion on introduction to Number system
DeepakThakur465173
 
Chapter 03-Number System-Computer Application.pptx
gadisaAdamu
 
Number systems and conversions
Susantha Herath
 
Number system and their conversion
Ram Pratap Singh
 
Data Representation
Education Front
 
Data representation in computers
Prof. Dr. K. Adisesha
 
Digital Principles & System Design Unit1_Number systems
KanmaniRajamanickam
 
Chapter 1: Binary System
Er. Nawaraj Bhandari
 
LEfddfffhhfrrdvvggfdwfcxsfvdsfgC 02 A.pptx
Ahsan433
 

Recently uploaded (20)

PPTX
Server Side Web Development Unit 1 of Nodejs.pptx
sneha852132
 
DOCX
CS-802 (A) BDH Lab manual IPS Academy Indore
thegodhimself05
 
PDF
Design Thinking basics for Engineers.pdf
CMR University
 
PPTX
Shinkawa Proposal to meet Vibration API670.pptx
AchmadBashori2
 
PPTX
What is Shot Peening | Shot Peening is a Surface Treatment Process
Vibra Finish
 
PDF
AI TECHNIQUES FOR IDENTIFYING ALTERATIONS IN THE HUMAN GUT MICROBIOME IN MULT...
vidyalalltv1
 
DOC
MRRS Strength and Durability of Concrete
CivilMythili
 
PDF
Viol_Alessandro_Presentazione_prelaurea.pdf
dsecqyvhbowrzxshhf
 
PDF
MAD Unit - 2 Activity and Fragment Management in Android (Diploma IT)
JappanMavani
 
PPTX
Worm gear strength and wear calculation as per standard VB Bhandari Databook.
shahveer210504
 
PPTX
Mechanical Design of shell and tube heat exchangers as per ASME Sec VIII Divi...
shahveer210504
 
PPTX
Solar Thermal Energy System Seminar.pptx
Gpc Purapuza
 
PPTX
artificial intelligence applications in Geomatics
NawrasShatnawi1
 
PDF
International Journal of Information Technology Convergence and services (IJI...
ijitcsjournal4
 
PPTX
原版一样(Acadia毕业证书)加拿大阿卡迪亚大学毕业证办理方法
Taqyea
 
PDF
Biomechanics of Gait: Engineering Solutions for Rehabilitation (www.kiu.ac.ug)
publication11
 
PPTX
The Role of Information Technology in Environmental Protectio....pptx
nallamillisriram
 
PPTX
Depth First Search Algorithm in 🧠 DFS in Artificial Intelligence (AI)
rafeeqshaik212002
 
PDF
Zilliz Cloud Demo for performance and scale
Zilliz
 
PPTX
美国电子版毕业证南卡罗莱纳大学上州分校水印成绩单USC学费发票定做学位证书编号怎么查
Taqyea
 
Server Side Web Development Unit 1 of Nodejs.pptx
sneha852132
 
CS-802 (A) BDH Lab manual IPS Academy Indore
thegodhimself05
 
Design Thinking basics for Engineers.pdf
CMR University
 
Shinkawa Proposal to meet Vibration API670.pptx
AchmadBashori2
 
What is Shot Peening | Shot Peening is a Surface Treatment Process
Vibra Finish
 
AI TECHNIQUES FOR IDENTIFYING ALTERATIONS IN THE HUMAN GUT MICROBIOME IN MULT...
vidyalalltv1
 
MRRS Strength and Durability of Concrete
CivilMythili
 
Viol_Alessandro_Presentazione_prelaurea.pdf
dsecqyvhbowrzxshhf
 
MAD Unit - 2 Activity and Fragment Management in Android (Diploma IT)
JappanMavani
 
Worm gear strength and wear calculation as per standard VB Bhandari Databook.
shahveer210504
 
Mechanical Design of shell and tube heat exchangers as per ASME Sec VIII Divi...
shahveer210504
 
Solar Thermal Energy System Seminar.pptx
Gpc Purapuza
 
artificial intelligence applications in Geomatics
NawrasShatnawi1
 
International Journal of Information Technology Convergence and services (IJI...
ijitcsjournal4
 
原版一样(Acadia毕业证书)加拿大阿卡迪亚大学毕业证办理方法
Taqyea
 
Biomechanics of Gait: Engineering Solutions for Rehabilitation (www.kiu.ac.ug)
publication11
 
The Role of Information Technology in Environmental Protectio....pptx
nallamillisriram
 
Depth First Search Algorithm in 🧠 DFS in Artificial Intelligence (AI)
rafeeqshaik212002
 
Zilliz Cloud Demo for performance and scale
Zilliz
 
美国电子版毕业证南卡罗莱纳大学上州分校水印成绩单USC学费发票定做学位证书编号怎么查
Taqyea
 
Ad

Data Representation Data Representation1

  • 1. Data Representation By: Manish Kumar, PGT, Sainik Schol Gopalganj (Bihar), India
  • 2. Data Representation The term data representation means the code or technique in which the data can be represented.
  • 3. Number Systems Number systems are very important to understand because the design and organization of a computer depends on the number systems. The four kind of number system used by the digital computer – 1.Decimal number system 2.Binary number system 3.Octal number system 4.Hexadecimal number system
  • 4. Decimal Number System The decimal number system consists of 10 digits namely 0 to 9. Since the decimal number system consists of 10 digits, the base or radix of this system is 10. e.g (405)10 , (145.25)10
  • 5. Octal Number System The octal number system consists of 8 digits namely 0 to 7. Since the Octal number system consists of 8 digits, the base or radix of this system is 8. e.g (76)8 , (55.25)8
  • 6. Binary Number System The binary number system consists of 2 digits namely 0 and 1. Since the binary number system consists of 2 digits, the base or radix of this system is 2. e.g (101)2 , (1001.11)2
  • 7. Hexadecimal Number System The Hexadecimal number system, popularly known as Hex system has 16 symbols, therefore its base/radix in 16. The 16 symbols used in Hexadecimal system are 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F e.g (45)16, (11A)16
  • 8. Conversion between Number Systems Decimal into Binary Step 1. Divide the decimal number by the base of binary using the repeated-division method. Step 2. Note the remainder separately. Step 3. Arrange the remainder in an order where the first remainder noted is LSD and the last remainder is MSD.
  • 10. Conversion between Number Systems Decimal into Octal Step 1. Divide the decimal number by the base of octal using the repeated-division method. Step 2. Note the remainder separately. Step 3. Arrange the remainder in an order where the first remainder noted is LSD and the last remainder is MSB.
  • 12. Conversion between Number Systems Decimal into Hexadecimal Step 1. Divide the decimal number by the base of Hexadecimal using the repeated- division method. Step 2. Note the remainder separately. Step 3. Arrange the remainder in an order where the first remainder noted is LSD and the last remainder is MSB.
  • 13. Conversion between Number Systems Decimal into Hexadecimal (Contd…)
  • 14. Conversion between Number Systems Step 1. Multiply the fractional part by the base of the numbers system (2, 8 or 16). Step 2. Remove the whole number from the product (the result of the multiplication) and collect it separately. Step 3. Repeat the step 1 and 2 with the new fractional part till the fractional part becomes zero. Decimal real number into Binary, Octal and Hexadecimal
  • 15. Conversion between Number Systems Any binary number can be converted into decimal number using the weights assigned to each bit. e.g. (11011)2 Its decimal equivalent is 1x24 +1x23 +0x22 +1x21 +1x20 = (27)10 Binary to Decimal
  • 16. Conversion between Number Systems 1.Indirect Method: Binary  Decimal  Octal e.g. (11011)2 Its decimal equivalent is 1x24 +1x23 +0x22 +1x21 +1x20 = (27)10 And its Octal equivalent is (33)8 (division method) Binary to Octal
  • 17. Conversion between Number Systems 2. Direct Method Binary  Octal Step 1: Make the group of 3-bits from right to left for integer from left to right for fraction. Step 2: Find decimal equivalent of each group. Note: if the left most group (in integer) and the right most group (in fraction) present with less than 3-bits make that group by adding one or two zeros. Binary to Octal (Contd…)
  • 18. Conversion between Number Systems Direct Method: e.g. Binary  Octal e.g. (101111)2 = (? )8 (101111)2 = (57)8 Binary to Octal (Contd…)
  • 19. Conversion between Number Systems 1.Indirect Method: Binary  Decimal  Hexa e.g. (11011)2 Its decimal equivalent is 1x24 +1x23 +0x22 +1x21 +1x20 = (27)10 And its Hexa equivalent is (1B)16 (Division method) Binary to Hexa
  • 20. Conversion between Number Systems 2. Direct Method: Binary  Hexa Step 1: Make the group of 4-bits from right to left for integer from left to right for fraction. Step 2: Find decimal equivalent of each group. Note: if the left most group (in integer) and the right most group (in fraction) present with less than 4-bits make that group by adding one, two or three zeros. Binary to Hexa
  • 21. Conversion between Number Systems Direct Method: e.g. Binary  Hexa e.g. (101111)2 = (? )16 (0010 1111)2 = (215)16 = (2F)16 Binary to Hexa
  • 22. Conversion between Number Systems Any octal number can be converted into decimal number using the weights assigned to each bit. e.g. (75)8 Its decimal equivalent is 7x81 +5x80 = (61)10 Octal to Decimal
  • 23. Conversion between Number Systems Any octal number can be converted into binary number by converting each bit of octal into its equivalent 3-bit binary number. e.g. (75)8 Its binary equivalent is (111101)2 Octal to Binary
  • 24. Conversion between Number Systems Octal  Binary  Hexa Step1. Convert each digit of the octal into its 3 bit binary equivalent. Step2. Combine all the 3-bit binary equivalents to form the entire binary sequence. Step3. Make group of 4 bits staring from LSD. The extra zeros for the completion of a group are placed at the leftmost end of the number. Step 4. Convert each of the 4-bit groups into their hexadecimal equivalents. Octal to Hexa
  • 25. Conversion between Number Systems Octal  Binary  Hexa Octal to Hexa (Contd…)
  • 28. Binary representation of integers Binary equivalent of the integers are stored in memory including one additional bit for representing the sign of integers (positive or negative). If the binary equivalent of the integer includes one additional bit for representing its sign, that binary number is called signed binary number.
  • 29. Binary representation of integers There are three ways for representing the positive and negative integers into its binary equivalent. 1.Sign magnitude representation 2.One’s Complement 3.Two’s Complement
  • 30. Binary representation of integers 1.Sign magnitude representation In the sign magnitude representation, positive number have a additional bit (sign bit) 0, while the negative number has a sign bit 1, while the magnitude is a simple binary equivalent of the number. E.g. +5 and -5 can be representing in 6 bit register as: +5 = 0 00101 and -5 = 1 00101
  • 31. Binary representation of integers Note: In every representation technique , the representation of positive number is identical to that used in the sign magnitude system i.e simple binary form including sign bit 0.
  • 32. Binary representation of integers 2. One’s Complement representation In one's complement, positive numbers are represented as usual in signed magnitude. However, negative numbers are represented differently. To negate a number, replace all zeros with ones, and ones with zeros - flip the bits. +12 = 0 0001100, and -12 = 1 1110011.
  • 33. Binary representation of integers 3. Two’s Complement representation In two's complement, positive numbers are represented as usual in signed magnitude. However, negative numbers are represented by adding 1 in magnitude part of one’s complement. +12= 0 0001100 -12 = 1 1110011 (1’s complement) -12 = 1 1110100 (2’s complement)
  • 34. Binary Addition Rule for Binary Addition: 0 + 0 = 0 0 + 1 = 1 1 + 0 = 1 1 + 1 = 0 (Carry 1)
  • 35. Binary Addition Example: Add 110101 and 101111 1 1 0 1 0 1 1 0 1 1 1 1 1 1 0 0 1 0 0
  • 36. Binary Addition Example: Add 10110 and 1101 1 0 1 1 0 0 1 1 0 1 1 0 0 0 1 1