SlideShare a Scribd company logo
1 of 19
DATA REPRESENTATION IN
COMPUTERS
Units
 8 bits = 1 byte
 1024 bytes = 1 kilobyte
 1024 kilobytes = 1 megabyte
 1024 megabytes = 1 gigabyte
 1024 gigabytes = 1 terabyte
Four bits, half a byte, is called a nibble
Denary to Binary conversion
Denary to Binary conversion
11100
1
Start from the bottom and get the reminders
00000011 is binary for 3 but so is 11. You
do not need the leading zeros for it to be a
valid number but we tend to write groups of
8 bits because computers usually store
data in bytes.
Addition and Subtraction in
binary
10010+101
10101100 + 00010001
00101101+ 10000101
00101101+ 10000111
What is the biggest decimal number you
can store using:
• 4 bits?
• 2 bytes?
Addition and Subtraction in
binary
11111100 + 00001111
If you cannot represent the number in that
amount of space because it is too big, then we
get overflow.
8 bits is 255
Addition and Subtraction in
binary
11111100 + 00001111
If you cannot represent the number in that
amount of space because it is too big, then we
get overflow.
8 bits is 255
Hexadecimal (hex)
8 bits is 255
Hexadecimal (hex)
8 bits is 255
1011100
Separate them by 4 units:
0101 1100
5 12
5C in hex
Hexadecimal (hex)
8 bits is 255
182
182/16=11 remainder 6
11=B in hexa
182 in denary=B6 in hex
Characters
 PCs mainly uses ASCII, American
Standard Code for Information
Interchange
 ASCII uses 7bits
 From 0000000 to 1111111
 Can represent up to 128 characters
 Unicode: or 32 bits per character
so can code or 4,294,967,296
 EBCDIC(pronounced eb-sid-ic):
Extended Binary Coded Decimal
Interchange Code,
 8-bit encoding.
 256 different characters in its character set.
Images
 Computer to interpret an image and
rebuild the picture it must know
some other things about the data
file.
 Picture’s resolution is 8x11 pixels and
the colour depth is 2 bits per pixel.
 Data about the data file itself is called
metadata.
 The number of bits per pixel is
referred to as the colour depth.
Images
 To store an image on a computer
the image is broken down into very
small elements called .
Sound
 Sound waves are analogue,
which means continuously
changing.
 In order to store sound waves
in the computer these signals
have to be converted in to
numerical values(binaries).
 This is achieve with
Analogue-to-Digital Converter
(ADC).
For sound waves, the analogue
signal is converted as follows:
• Measure the amplitude (height of
wave) at regular intervals
(sampling)
• Store the values as a series of
binary numbers in a file
Quality of Sound
 Sample Resolution
 The number of bits used to store each
sample.
 The more bits that are used, the better the
accuracy of the sound file.
 Sample Interval
 The time period between taking
samples/measurements.
 The more frequently the sound is sampled,
the better the quality of playback.
Synthesis:
Sound synthesis is when the sound is recreated
from this file by the computer, and played
through speakers.
Instructions
 Each type of processor has its own
type of machine code – a specific
set of instructions that it can
execute. This is called an
instruction set.
The group of bits that represents the operation is
called the opcode
If the programming language allowed us to specify how many steps to move
RIGHT 90 (Turn 90° to the right)
MOVE 2
Instructions
If the programming language allowed us to specify how many steps to
move
RIGHT 90 (Turn 90° to the right)
MOVE 2
In the program, number steps to move can be stored in a variable.
Move numSteps
An opcode, which is the binary number representing the operation to be carried
out.
e.g. RIGHT, MOVE
The operand (data) that the operation will use.
The data can be an actual value (e.g. 5) or an address in memory where the data
can be found (a variable).
Data Representation in Computers
Data Representation in Computers

More Related Content

Similar to Data Representation in Computers

Data representation in a computer
Data representation in a computerData representation in a computer
Data representation in a computerGirmachew Tilahun
 
Number systems
Number systemsNumber systems
Number systemsKalaTecno
 
2nd Quarter CSS Week 1.pptx
2nd Quarter CSS Week 1.pptx2nd Quarter CSS Week 1.pptx
2nd Quarter CSS Week 1.pptxJOSEKARLOSMPABLO
 
Chapter 3-Data Representation in Computers.ppt
Chapter 3-Data Representation in Computers.pptChapter 3-Data Representation in Computers.ppt
Chapter 3-Data Representation in Computers.pptKalGetachew2
 
Software development slides
Software development slidesSoftware development slides
Software development slidesiarthur
 
1.1.1 binary systems By Zak
1.1.1 binary systems By Zak1.1.1 binary systems By Zak
1.1.1 binary systems By ZakTabsheer Hasan
 
Computer Systems Data Representation
Computer Systems   Data RepresentationComputer Systems   Data Representation
Computer Systems Data Representationiarthur
 
Network Slides
Network SlidesNetwork Slides
Network Slidesiarthur
 
Analog to digital conversion
Analog to digital conversionAnalog to digital conversion
Analog to digital conversionDJShirlee
 
Computer data representation (integers, floating-point numbers, text, images,...
Computer data representation (integers, floating-point numbers, text, images,...Computer data representation (integers, floating-point numbers, text, images,...
Computer data representation (integers, floating-point numbers, text, images,...ArtemKovera
 
The analog to digital conversion process
The analog to digital conversion processThe analog to digital conversion process
The analog to digital conversion processDJNila
 
Lesson4.2 u4 l1 binary squences
Lesson4.2 u4 l1 binary squencesLesson4.2 u4 l1 binary squences
Lesson4.2 u4 l1 binary squencesLexume1
 
Int Cs Rev
Int Cs RevInt Cs Rev
Int Cs RevnorthVU
 

Similar to Data Representation in Computers (20)

Data representation in a computer
Data representation in a computerData representation in a computer
Data representation in a computer
 
Number systems
Number systemsNumber systems
Number systems
 
2nd Quarter CSS Week 1.pptx
2nd Quarter CSS Week 1.pptx2nd Quarter CSS Week 1.pptx
2nd Quarter CSS Week 1.pptx
 
Chapter 2
Chapter 2Chapter 2
Chapter 2
 
Chapter 3-Data Representation in Computers.ppt
Chapter 3-Data Representation in Computers.pptChapter 3-Data Representation in Computers.ppt
Chapter 3-Data Representation in Computers.ppt
 
Software development slides
Software development slidesSoftware development slides
Software development slides
 
1.1.1 binary systems By Zak
1.1.1 binary systems By Zak1.1.1 binary systems By Zak
1.1.1 binary systems By Zak
 
Computer Systems Data Representation
Computer Systems   Data RepresentationComputer Systems   Data Representation
Computer Systems Data Representation
 
Network Slides
Network SlidesNetwork Slides
Network Slides
 
Analog to digital conversion
Analog to digital conversionAnalog to digital conversion
Analog to digital conversion
 
W 9 numbering system
W 9 numbering systemW 9 numbering system
W 9 numbering system
 
W 9 numbering system
W 9 numbering systemW 9 numbering system
W 9 numbering system
 
Class2
Class2Class2
Class2
 
Computer data representation (integers, floating-point numbers, text, images,...
Computer data representation (integers, floating-point numbers, text, images,...Computer data representation (integers, floating-point numbers, text, images,...
Computer data representation (integers, floating-point numbers, text, images,...
 
The analog to digital conversion process
The analog to digital conversion processThe analog to digital conversion process
The analog to digital conversion process
 
Digital electronics
Digital electronicsDigital electronics
Digital electronics
 
fundamentals.ppt
fundamentals.pptfundamentals.ppt
fundamentals.ppt
 
fundamentals.ppt
fundamentals.pptfundamentals.ppt
fundamentals.ppt
 
Lesson4.2 u4 l1 binary squences
Lesson4.2 u4 l1 binary squencesLesson4.2 u4 l1 binary squences
Lesson4.2 u4 l1 binary squences
 
Int Cs Rev
Int Cs RevInt Cs Rev
Int Cs Rev
 

More from Sajitha Pathirana (12)

Basics of Java.ppsx
Basics of Java.ppsxBasics of Java.ppsx
Basics of Java.ppsx
 
Programming Languages
Programming LanguagesProgramming Languages
Programming Languages
 
Functions
FunctionsFunctions
Functions
 
Databases
DatabasesDatabases
Databases
 
Handling Data in Algorithm
Handling Data in AlgorithmHandling Data in Algorithm
Handling Data in Algorithm
 
Hardware
HardwareHardware
Hardware
 
Pseudocode
PseudocodePseudocode
Pseudocode
 
Communications and Networking
Communications and NetworkingCommunications and Networking
Communications and Networking
 
Software
SoftwareSoftware
Software
 
Logical Operators
Logical OperatorsLogical Operators
Logical Operators
 
Fundamentals of computer systems
Fundamentals of computer systemsFundamentals of computer systems
Fundamentals of computer systems
 
Flow Charts
Flow ChartsFlow Charts
Flow Charts
 

Recently uploaded

办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)jennyeacort
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....kzayra69
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 

Recently uploaded (20)

办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 

Data Representation in Computers

  • 2. Units  8 bits = 1 byte  1024 bytes = 1 kilobyte  1024 kilobytes = 1 megabyte  1024 megabytes = 1 gigabyte  1024 gigabytes = 1 terabyte Four bits, half a byte, is called a nibble
  • 3. Denary to Binary conversion
  • 4. Denary to Binary conversion 11100 1 Start from the bottom and get the reminders 00000011 is binary for 3 but so is 11. You do not need the leading zeros for it to be a valid number but we tend to write groups of 8 bits because computers usually store data in bytes.
  • 5. Addition and Subtraction in binary 10010+101 10101100 + 00010001 00101101+ 10000101 00101101+ 10000111 What is the biggest decimal number you can store using: • 4 bits? • 2 bytes?
  • 6. Addition and Subtraction in binary 11111100 + 00001111 If you cannot represent the number in that amount of space because it is too big, then we get overflow. 8 bits is 255
  • 7. Addition and Subtraction in binary 11111100 + 00001111 If you cannot represent the number in that amount of space because it is too big, then we get overflow. 8 bits is 255
  • 9. Hexadecimal (hex) 8 bits is 255 1011100 Separate them by 4 units: 0101 1100 5 12 5C in hex
  • 10. Hexadecimal (hex) 8 bits is 255 182 182/16=11 remainder 6 11=B in hexa 182 in denary=B6 in hex
  • 11. Characters  PCs mainly uses ASCII, American Standard Code for Information Interchange  ASCII uses 7bits  From 0000000 to 1111111  Can represent up to 128 characters  Unicode: or 32 bits per character so can code or 4,294,967,296  EBCDIC(pronounced eb-sid-ic): Extended Binary Coded Decimal Interchange Code,  8-bit encoding.  256 different characters in its character set.
  • 12. Images  Computer to interpret an image and rebuild the picture it must know some other things about the data file.  Picture’s resolution is 8x11 pixels and the colour depth is 2 bits per pixel.  Data about the data file itself is called metadata.  The number of bits per pixel is referred to as the colour depth.
  • 13. Images  To store an image on a computer the image is broken down into very small elements called .
  • 14. Sound  Sound waves are analogue, which means continuously changing.  In order to store sound waves in the computer these signals have to be converted in to numerical values(binaries).  This is achieve with Analogue-to-Digital Converter (ADC). For sound waves, the analogue signal is converted as follows: • Measure the amplitude (height of wave) at regular intervals (sampling) • Store the values as a series of binary numbers in a file
  • 15. Quality of Sound  Sample Resolution  The number of bits used to store each sample.  The more bits that are used, the better the accuracy of the sound file.  Sample Interval  The time period between taking samples/measurements.  The more frequently the sound is sampled, the better the quality of playback. Synthesis: Sound synthesis is when the sound is recreated from this file by the computer, and played through speakers.
  • 16. Instructions  Each type of processor has its own type of machine code – a specific set of instructions that it can execute. This is called an instruction set. The group of bits that represents the operation is called the opcode If the programming language allowed us to specify how many steps to move RIGHT 90 (Turn 90° to the right) MOVE 2
  • 17. Instructions If the programming language allowed us to specify how many steps to move RIGHT 90 (Turn 90° to the right) MOVE 2 In the program, number steps to move can be stored in a variable. Move numSteps An opcode, which is the binary number representing the operation to be carried out. e.g. RIGHT, MOVE The operand (data) that the operation will use. The data can be an actual value (e.g. 5) or an address in memory where the data can be found (a variable).

Editor's Notes

  1. Beginning course details and/or books/materials needed for a class/project.
  2. A schedule design for optional periods of time/objectives.
  3. A schedule design for optional periods of time/objectives.
  4. Introductory notes.
  5. Introductory notes.
  6. Introductory notes.
  7. Introductory notes.
  8. Introductory notes.
  9. Introductory notes.