SlideShare une entreprise Scribd logo
1  sur  54
Data Formats used by Computers
Dr. Kamal Gulati
Introduction
• Examples
Real World
Data
Computer
DataInput device
Dear Mom: Keyboard 10110010…
Digital
camera
10110010…
Format must be appropriate
• The internal representation must be
appropriate for the type of processing to
take place (e.g., text, images, sound)
Rules/Conventions
• Proprietary formats
– Unique to a product or company
– E.g., Microsoft Word, Corel Word Perfect, IBM Lotus
Notes
• Standards
– Evolve two ways:
• Proprietary formats become de facto standards (e.g., Adobe
PostScript, Apple Quick Time)
• Committee is struck to solve a problem (Motion Pictures
Experts Group, MPEG)
Standards Organizations
• ISO – International Standards Organization
• CSA – Canadian Standards Association
• ANSI – American National Standards
Institute
• IEEE – Institute for Electrical and
Electronics Engineers
• Etc.
Examples of Standards
Type of Data Standards
Alphanumeric ASCII, EBCDIC, Unicode
Image JPEG, GIF, PCX, TIFF
Motion picture MPEG-2, Quick Time
Sound Sound Blaster, WAV, AU
Outline graphics/fonts PostScript, TrueType, PDF
Why Standards?
• Standard are “arbitrary”
• They exist because they are
– Convenient
– Efficient
– Flexible
– Appropriate
– Etc.
Alphanumeric Data
• Problem: Distinguishing between the number 123
(one hundred and twenty-three) and the characters
“123” (one, two, three)
• Four standards for representing letters (alpha) and
numbers
– BCD – Binary-coded decimal
– ASCII – American standard code for information
interchange
– EBCDIC – Extended binary-coded decimal interchange
code
– Unicode
Next 2 slides
Standard Alphanumeric Formats
• BCD
• ASCII
• EBCDIC
• Unicode
Binary-Coded Decimal (BCD)
• Four bits per digit Digit Bit pattern
0 0000
1 0001
2 0010
3 0011
4 0100
5 0101
6 0110
7 0111
8 1000
9 1001
Note: the following
bit patterns are not
used:
1010
1011
1100
1101
1110
1111
Example
• 709310 = ? (in BCD)
7 0 9 3
0111 0000 1001 0011
Next 22 slides
Standard Alphanumeric Formats
• BCD
• ASCII
• EBCDIC
• Unicode
The Problem
• Representing text strings, such as
“Hello, world”, in a computer
Codes and Characters
• Each character is coded as a byte
• Most common coding system is ASCII
(Pronounced ass-key)
• ASCII = American National Standard Code
for Information Interchange
• Defined in ANSI document X3.4-1977
ASCII Features
• 7-bit code
• 8th bit is unused (or used for a parity bit)
• 27 = 128 codes
• Two general types of codes:
– 95 are “Graphic” codes (displayable on a
console)
– 33 are “Control” codes (control features of the
console or communications channel)
ASCII Chart
000 001 010 011 100 101 110 111
0000 NULL DLE 0 @ P ` p
0001 SOH DC1 ! 1 A Q a q
0010 STX DC2 " 2 B R b r
0011 ETX DC3 # 3 C S c s
0100 EDT DC4 $ 4 D T d t
0101 ENQ NAK % 5 E U e u
0110 ACK SYN & 6 F V f v
0111 BEL ETB ' 7 G W g w
1000 BS CAN ( 8 H X h x
1001 HT EM ) 9 I Y i y
1010 LF SUB * : J Z j z
1011 VT ESC + ; K [ k {
1100 FF FS , < L  l |
1101 CR GS - = M ] m }
1110 SO RS . > N ^ n ~
1111 SI US / ? O _ o DEL
000 001 010 011 100 101 110 111
0000 NULL DLE 0 @ P ` p
0001 SOH DC1 ! 1 A Q a q
0010 STX DC2 " 2 B R b r
0011 ETX DC3 # 3 C S c s
0100 EDT DC4 $ 4 D T d t
0101 ENQ NAK % 5 E U e u
0110 ACK SYN & 6 F V f v
0111 BEL ETB ' 7 G W g w
1000 BS CAN ( 8 H X h x
1001 HT EM ) 9 I Y i y
1010 LF SUB * : J Z j z
1011 VT ESC + ; K [ k {
1100 FF FS , < L  l |
1101 CR GS - = M ] m }
1110 SO RS . > N ^ n ~
1111 SI US / ? O _ o DEL
000 001 010 011 100 101 110 111
0000 NULL DLE 0 @ P ` p
0001 SOH DC1 ! 1 A Q a q
0010 STX DC2 " 2 B R b r
0011 ETX DC3 # 3 C S c s
0100 EDT DC4 $ 4 D T d t
0101 ENQ NAK % 5 E U e u
0110 ACK SYN & 6 F V f v
0111 BEL ETB ' 7 G W g w
1000 BS CAN ( 8 H X h x
1001 HT EM ) 9 I Y i y
1010 LF SUB * : J Z j z
1011 VT ESC + ; K [ k {
1100 FF FS , < L  l |
1101 CR GS - = M ] m }
1110 SO RS . > N ^ n ~
1111 SI US / ? O _ o DEL
Most significant bit
Least significant bit
000 001 010 011 100 101 110 111
0000 NULL DLE 0 @ P ` p
0001 SOH DC1 ! 1 A Q a q
0010 STX DC2 " 2 B R b r
0011 ETX DC3 # 3 C S c s
0100 EDT DC4 $ 4 D T d t
0101 ENQ NAK % 5 E U e u
0110 ACK SYN & 6 F V f v
0111 BEL ETB ' 7 G W g w
1000 BS CAN ( 8 H X h x
1001 HT EM ) 9 I Y i y
1010 LF SUB * : J Z j z
1011 VT ESC + ; K [ k {
1100 FF FS , < L  l |
1101 CR GS - = M ] m }
1110 SO RS . > N ^ n ~
1111 SI US / ? O _ o DEL
e.g., ‘a’ = 1100001
95 Graphic codes
000 001 010 011 100 101 110 111
0000 NULL DLE 0 @ P ` p
0001 SOH DC1 ! 1 A Q a q
0010 STX DC2 " 2 B R b r
0011 ETX DC3 # 3 C S c s
0100 EDT DC4 $ 4 D T d t
0101 ENQ NAK % 5 E U e u
0110 ACK SYN & 6 F V f v
0111 BEL ETB ' 7 G W g w
1000 BS CAN ( 8 H X h x
1001 HT EM ) 9 I Y i y
1010 LF SUB * : J Z j z
1011 VT ESC + ; K [ k {
1100 FF FS , < L  l |
1101 CR GS - = M ] m }
1110 SO RS . > N ^ n ~
1111 SI US / ? O _ o DEL
33 Control codes
000 001 010 011 100 101 110 111
0000 NULL DLE 0 @ P ` p
0001 SOH DC1 ! 1 A Q a q
0010 STX DC2 " 2 B R b r
0011 ETX DC3 # 3 C S c s
0100 EDT DC4 $ 4 D T d t
0101 ENQ NAK % 5 E U e u
0110 ACK SYN & 6 F V f v
0111 BEL ETB ' 7 G W g w
1000 BS CAN ( 8 H X h x
1001 HT EM ) 9 I Y i y
1010 LF SUB * : J Z j z
1011 VT ESC + ; K [ k {
1100 FF FS , < L  l |
1101 CR GS - = M ] m }
1110 SO RS . > N ^ n ~
1111 SI US / ? O _ o DEL
Alphabetic codes
000 001 010 011 100 101 110 111
0000 NULL DLE 0 @ P ` p
0001 SOH DC1 ! 1 A Q a q
0010 STX DC2 " 2 B R b r
0011 ETX DC3 # 3 C S c s
0100 EDT DC4 $ 4 D T d t
0101 ENQ NAK % 5 E U e u
0110 ACK SYN & 6 F V f v
0111 BEL ETB ' 7 G W g w
1000 BS CAN ( 8 H X h x
1001 HT EM ) 9 I Y i y
1010 LF SUB * : J Z j z
1011 VT ESC + ; K [ k {
1100 FF FS , < L  l |
1101 CR GS - = M ] m }
1110 SO RS . > N ^ n ~
1111 SI US / ? O _ o DEL
Numeric codes
000 001 010 011 100 101 110 111
0000 NULL DLE 0 @ P ` p
0001 SOH DC1 ! 1 A Q a q
0010 STX DC2 " 2 B R b r
0011 ETX DC3 # 3 C S c s
0100 EDT DC4 $ 4 D T d t
0101 ENQ NAK % 5 E U e u
0110 ACK SYN & 6 F V f v
0111 BEL ETB ' 7 G W g w
1000 BS CAN ( 8 H X h x
1001 HT EM ) 9 I Y i y
1010 LF SUB * : J Z j z
1011 VT ESC + ; K [ k {
1100 FF FS , < L  l |
1101 CR GS - = M ] m }
1110 SO RS . > N ^ n ~
1111 SI US / ? O _ o DEL
000 001 010 011 100 101 110 111
0000 NULL DLE 0 @ P ` p
0001 SOH DC1 ! 1 A Q a q
0010 STX DC2 " 2 B R b r
0011 ETX DC3 # 3 C S c s
0100 EDT DC4 $ 4 D T d t
0101 ENQ NAK % 5 E U e u
0110 ACK SYN & 6 F V f v
0111 BEL ETB ' 7 G W g w
1000 BS CAN ( 8 H X h x
1001 HT EM ) 9 I Y i y
1010 LF SUB * : J Z j z
1011 VT ESC + ; K [ k {
1100 FF FS , < L  l |
1101 CR GS - = M ] m }
1110 SO RS . > N ^ n ~
1111 SI US / ? O _ o DEL
Punctuation, etc.
“Hello, world” Example
=
=
=
=
=
=
=
=
=
=
=
=
Binary
01001000
01100101
01101100
01101100
01101111
00101100
00100000
01110111
01100111
01110010
01101100
01100100
Hexadecimal
48
65
6C
6C
6F
2C
20
77
67
72
6C
64
Decimal
72
101
108
108
111
44
32
119
103
114
108
100
H
e
l
l
o
,
w
o
r
l
d
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
Common Control Codes
• CR 0D carriage return
• LF 0A line feed
• HT 09 horizontal tab
• DEL 7F delete
• NULL 00 null
Hexadecimal code
000 001 010 011 100 101 110 111
0000 NULL DLE 0 @ P ` p
0001 SOH DC1 ! 1 A Q a q
0010 STX DC2 " 2 B R b r
0011 ETX DC3 # 3 C S c s
0100 EDT DC4 $ 4 D T d t
0101 ENQ NAK % 5 E U e u
0110 ACK SYN & 6 F V f v
0111 BEL ETB ' 7 G W g w
1000 BS CAN ( 8 H X h x
1001 HT EM ) 9 I Y i y
1010 LF SUB * : J Z j z
1011 VT ESC + ; K [ k {
1100 FF FS , < L  l |
1101 CR GS - = M ] m }
1110 SO RS . > N ^ n ~
1111 SI US / ? O _ o DEL
Terminology
• Learn the names of the special symbols
– [ ] brackets
– { } braces
– ( ) parentheses
– @ commercial ‘at’ sign
– & ampersand
– ~ tilde
000 001 010 011 100 101 110 111
0000 NULL DLE 0 @ P ` p
0001 SOH DC1 ! 1 A Q a q
0010 STX DC2 " 2 B R b r
0011 ETX DC3 # 3 C S c s
0100 EDT DC4 $ 4 D T d t
0101 ENQ NAK % 5 E U e u
0110 ACK SYN & 6 F V f v
0111 BEL ETB ' 7 G W g w
1000 BS CAN ( 8 H X h x
1001 HT EM ) 9 I Y i y
1010 LF SUB * : J Z j z
1011 VT ESC + ; K [ k {
1100 FF FS , < L  l |
1101 CR GS - = M ] m }
1110 SO RS . > N ^ n ~
1111 SI US / ? O _ o DEL
Escape Sequences
• Extend the capability of the ASCII code set
• For controlling terminals and formatting output
• Defined by ANSI in documents X3.41-1974 and
X3.64-1977
• The escape code is ESC = 1B16
• An escape sequence begins with two codes:
ESC [
1B16 5B16
Examples
• Erase display: ESC [ 2 J
• Erase line: ESC [ K
Next 1 slides
Standard Alphanumeric Formats
• BCD
• ASCII
• EBCDIC
• Unicode
EBCDIC
• Extended BCD Interchange Code
(pronounced ebb’-se-dick)
• 8-bit code
• Developed by IBM
• Rarely used today
• IBM mainframes only
Next 2 slides
Standard Alphanumeric Formats
• BCD
• ASCII
• EBCDIC
• Unicode
Unicode
• 16-bit standard
• Developed by a consortia
• Intended to supercede older 7- and 8-bit
codes
Unicode Version 2.1
• 1998
• Improves on version 2.0
• Includes the Euro sign (20AC16 = )
• From the standard:
…contains 38,887 distinct coded characters derived
from the supported scripts. These characters cover the
principal written languages of the Americas, Europe,
the Middle East, Africa, India, Asia, and Pacifica.
http://www.unicode.org
Keyboard Input
• Key (“scan”) codes are converted to ASCII
• ASCII code sent to host computer
• Received by the host as a “stream” of data
• Stored in buffer
• Processed
• Etc.
pp. 69
Shift Key
• inhibits bit 5 in the ASCII code
Key(s)
ASCII code
6 5 4 3 2 1 0 Character
1 1 0 0 0 0 1
1 0 0 0 0 0 1
a
A
a
aShift
Control Key
• inhibits bits 5 & 6 in the ASCII code
Key(s)
ASCII code
6 5 4 3 2 1 0 Character
1 1 0 0 0 1 1
0 0 0 0 0 1 1
c
ETX
c
cCtrl
Control
code
Other Input
• OCR – optical character recognition
• Bar code readers
• Voice/audio input
• Punched cards
• Images / objects
• Pointing devices
pp. 69-86
OCR
Hello, world
Page of text
Optical scan 10110110…
Computer file
Other Input
• OCR – optical character recognition
• Bar code readers
• Voice/audio input
• Punched cards
• Images / objects
• Pointing devices
pp. 69-86
Bar Codes
• An automatic identification (Auto ID)
technology that streamlines identification
and data collection
• See
http://www.digital.net/barcoder/barcode.html
Other Input
• OCR – optical character recognition
• Bar code readers
• Voice/audio input
• Punched cards
• Images / objects
• Pointing devices
pp. 69-86
Voice/audio Input
• Input device: microphone
• Audio input is “digitized” and stored
• Processed in two ways
– As is (no recognition)
– Recognized and converted to alphanumeric data
(ASCII)
Digitize 10110010…
Other Input
• OCR – optical character recognition
• Bar code readers
• Voice/audio input
• Punched cards
• Images / objects
• Pointing devices
pp. 69-86
Punched Cards
• Invented by Herman Hollerith (founder of
IBM)
• Each card holds 80 characters
Other Input
• OCR – optical character recognition
• Bar code readers
• Voice/audio input
• Punched cards
• Images / objects
• Pointing devices
pp. 69-86
Images
• Typically images are pictures that are
optically scanned and saved as a “bit map”
or in some other format
• Many formats
– gif, jpeg, …
Typical “Save As” Dialog
Objects
• Images made of geometrically definable
shapes
• Offer efficiency, flexibility, small size, etc.
Other Input
• OCR – optical character recognition
• Bar code readers
• Voice/audio input
• Punched cards
• Images / objects
• Pointing devices
pp. 69-86
Pointing Devices
• Originally used for specifying coordinates
(x, y) for graphical input
• Today used as general purpose device for
“graphical user interfaces” (GUIs)
Thank you

Contenu connexe

Similaire à Data Formats used by Computers

1st course summary.pptx
1st course summary.pptx1st course summary.pptx
1st course summary.pptx
HebaEng
 
334 recitation3-sdes
334 recitation3-sdes334 recitation3-sdes
334 recitation3-sdes
Benny SmKr
 
Computer archi&mp
Computer archi&mpComputer archi&mp
Computer archi&mp
MSc CST
 

Similaire à Data Formats used by Computers (20)

DES Block Cipher Hao Qi
DES Block Cipher Hao QiDES Block Cipher Hao Qi
DES Block Cipher Hao Qi
 
Buffer Overflows Presentation
Buffer Overflows PresentationBuffer Overflows Presentation
Buffer Overflows Presentation
 
3rd Semester (Dec; Jan-2016) Civil Engineering Question Paper
3rd Semester (Dec; Jan-2016) Civil Engineering Question Paper3rd Semester (Dec; Jan-2016) Civil Engineering Question Paper
3rd Semester (Dec; Jan-2016) Civil Engineering Question Paper
 
2 n5401
2 n54012 n5401
2 n5401
 
Service Manual - Sony STR-K660P
Service Manual - Sony STR-K660PService Manual - Sony STR-K660P
Service Manual - Sony STR-K660P
 
6th Semeste Electronics and Communication Engineering (Dec-2015; Jan-2016) Qu...
6th Semeste Electronics and Communication Engineering (Dec-2015; Jan-2016) Qu...6th Semeste Electronics and Communication Engineering (Dec-2015; Jan-2016) Qu...
6th Semeste Electronics and Communication Engineering (Dec-2015; Jan-2016) Qu...
 
1st course summary.pptx
1st course summary.pptx1st course summary.pptx
1st course summary.pptx
 
Data types in C programming
Data types in C programmingData types in C programming
Data types in C programming
 
334 recitation3-sdes
334 recitation3-sdes334 recitation3-sdes
334 recitation3-sdes
 
CAT-320DL-Electrical-Schematic.pdf
CAT-320DL-Electrical-Schematic.pdfCAT-320DL-Electrical-Schematic.pdf
CAT-320DL-Electrical-Schematic.pdf
 
10 multiplexers-de mux
10 multiplexers-de mux10 multiplexers-de mux
10 multiplexers-de mux
 
DEF CON 23 - Yaniv Balmas and Lior Oppenheim - key logger-video mouse
DEF CON 23 - Yaniv Balmas and Lior Oppenheim - key logger-video mouseDEF CON 23 - Yaniv Balmas and Lior Oppenheim - key logger-video mouse
DEF CON 23 - Yaniv Balmas and Lior Oppenheim - key logger-video mouse
 
Prelude to halide_public
Prelude to halide_publicPrelude to halide_public
Prelude to halide_public
 
Understand data representation on CPU 1
Understand data representation on CPU 1Understand data representation on CPU 1
Understand data representation on CPU 1
 
crack satellite
crack satellite crack satellite
crack satellite
 
Ascii codes 3145_app_f
Ascii codes 3145_app_fAscii codes 3145_app_f
Ascii codes 3145_app_f
 
PSpice Tutorial
PSpice TutorialPSpice Tutorial
PSpice Tutorial
 
AES Encryption
AES EncryptionAES Encryption
AES Encryption
 
Computer archi&mp
Computer archi&mpComputer archi&mp
Computer archi&mp
 
Original P Channel Mosfet IRF9Z34 IRF9Z34N IRF9Z34NPBF 9Z34 60V 18A TO 220 New
Original P Channel Mosfet IRF9Z34 IRF9Z34N IRF9Z34NPBF 9Z34 60V 18A TO 220 NewOriginal P Channel Mosfet IRF9Z34 IRF9Z34N IRF9Z34NPBF 9Z34 60V 18A TO 220 New
Original P Channel Mosfet IRF9Z34 IRF9Z34N IRF9Z34NPBF 9Z34 60V 18A TO 220 New
 

Plus de Amity University | FMS - DU | IMT | Stratford University | KKMI International Institute | AIMA | DTU

All About DBMS - Interview Question and Answers
All About DBMS - Interview Question and AnswersAll About DBMS - Interview Question and Answers

Plus de Amity University | FMS - DU | IMT | Stratford University | KKMI International Institute | AIMA | DTU (20)

All About DBMS - Interview Question and Answers
All About DBMS - Interview Question and AnswersAll About DBMS - Interview Question and Answers
All About DBMS - Interview Question and Answers
 
Concept of Governance - Management of Operational Risk for IT Officers/Execut...
Concept of Governance - Management of Operational Risk for IT Officers/Execut...Concept of Governance - Management of Operational Risk for IT Officers/Execut...
Concept of Governance - Management of Operational Risk for IT Officers/Execut...
 
Emerging Technologies in IT
Emerging Technologies in ITEmerging Technologies in IT
Emerging Technologies in IT
 
Introduction to DBMS - Notes in Layman...
Introduction to DBMS - Notes in Layman...Introduction to DBMS - Notes in Layman...
Introduction to DBMS - Notes in Layman...
 
Fundamentals of DBMS
Fundamentals of DBMSFundamentals of DBMS
Fundamentals of DBMS
 
CASE (Computer Aided Software Design)
CASE (Computer Aided Software Design)CASE (Computer Aided Software Design)
CASE (Computer Aided Software Design)
 
SOFTWARE RELIABILITY AND QUALITY ASSURANCE
SOFTWARE RELIABILITY AND QUALITY ASSURANCESOFTWARE RELIABILITY AND QUALITY ASSURANCE
SOFTWARE RELIABILITY AND QUALITY ASSURANCE
 
Software Testing (Contd..) SDLC Model
Software Testing (Contd..) SDLC ModelSoftware Testing (Contd..) SDLC Model
Software Testing (Contd..) SDLC Model
 
Software Testing - SDLC Model
Software Testing - SDLC ModelSoftware Testing - SDLC Model
Software Testing - SDLC Model
 
Coding - SDLC Model
Coding - SDLC ModelCoding - SDLC Model
Coding - SDLC Model
 
Software Design - SDLC Model
Software Design - SDLC ModelSoftware Design - SDLC Model
Software Design - SDLC Model
 
Models of SDLC (Contd..) & Feasibility Study
Models of SDLC (Contd..)  & Feasibility StudyModels of SDLC (Contd..)  & Feasibility Study
Models of SDLC (Contd..) & Feasibility Study
 
Models of SDLC (Software Development Life Cycle / Program Development Life Cy...
Models of SDLC (Software Development Life Cycle / Program Development Life Cy...Models of SDLC (Software Development Life Cycle / Program Development Life Cy...
Models of SDLC (Software Development Life Cycle / Program Development Life Cy...
 
Introduction to Software Engineering
Introduction to Software EngineeringIntroduction to Software Engineering
Introduction to Software Engineering
 
CLOUD SECURITY IN INSURANCE INDUSTRY WITH RESPECT TO INDIAN MARKET
CLOUD SECURITY IN INSURANCE INDUSTRY WITH RESPECT TO INDIAN MARKETCLOUD SECURITY IN INSURANCE INDUSTRY WITH RESPECT TO INDIAN MARKET
CLOUD SECURITY IN INSURANCE INDUSTRY WITH RESPECT TO INDIAN MARKET
 
Application Software
Application SoftwareApplication Software
Application Software
 
Application Software – Horizontal & Vertical Software
Application Software – Horizontal & Vertical SoftwareApplication Software – Horizontal & Vertical Software
Application Software – Horizontal & Vertical Software
 
Software: Systems and Application Software
Software:  Systems and Application SoftwareSoftware:  Systems and Application Software
Software: Systems and Application Software
 
Programming Languages
Programming LanguagesProgramming Languages
Programming Languages
 
Number Codes and Registers
Number Codes and RegistersNumber Codes and Registers
Number Codes and Registers
 

Dernier

1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
negromaestrong
 

Dernier (20)

Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Role Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptxRole Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptx
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 

Data Formats used by Computers

  • 1. Data Formats used by Computers Dr. Kamal Gulati
  • 2. Introduction • Examples Real World Data Computer DataInput device Dear Mom: Keyboard 10110010… Digital camera 10110010…
  • 3. Format must be appropriate • The internal representation must be appropriate for the type of processing to take place (e.g., text, images, sound)
  • 4. Rules/Conventions • Proprietary formats – Unique to a product or company – E.g., Microsoft Word, Corel Word Perfect, IBM Lotus Notes • Standards – Evolve two ways: • Proprietary formats become de facto standards (e.g., Adobe PostScript, Apple Quick Time) • Committee is struck to solve a problem (Motion Pictures Experts Group, MPEG)
  • 5. Standards Organizations • ISO – International Standards Organization • CSA – Canadian Standards Association • ANSI – American National Standards Institute • IEEE – Institute for Electrical and Electronics Engineers • Etc.
  • 6. Examples of Standards Type of Data Standards Alphanumeric ASCII, EBCDIC, Unicode Image JPEG, GIF, PCX, TIFF Motion picture MPEG-2, Quick Time Sound Sound Blaster, WAV, AU Outline graphics/fonts PostScript, TrueType, PDF
  • 7. Why Standards? • Standard are “arbitrary” • They exist because they are – Convenient – Efficient – Flexible – Appropriate – Etc.
  • 8. Alphanumeric Data • Problem: Distinguishing between the number 123 (one hundred and twenty-three) and the characters “123” (one, two, three) • Four standards for representing letters (alpha) and numbers – BCD – Binary-coded decimal – ASCII – American standard code for information interchange – EBCDIC – Extended binary-coded decimal interchange code – Unicode
  • 9. Next 2 slides Standard Alphanumeric Formats • BCD • ASCII • EBCDIC • Unicode
  • 10. Binary-Coded Decimal (BCD) • Four bits per digit Digit Bit pattern 0 0000 1 0001 2 0010 3 0011 4 0100 5 0101 6 0110 7 0111 8 1000 9 1001 Note: the following bit patterns are not used: 1010 1011 1100 1101 1110 1111
  • 11. Example • 709310 = ? (in BCD) 7 0 9 3 0111 0000 1001 0011
  • 12. Next 22 slides Standard Alphanumeric Formats • BCD • ASCII • EBCDIC • Unicode
  • 13. The Problem • Representing text strings, such as “Hello, world”, in a computer
  • 14. Codes and Characters • Each character is coded as a byte • Most common coding system is ASCII (Pronounced ass-key) • ASCII = American National Standard Code for Information Interchange • Defined in ANSI document X3.4-1977
  • 15. ASCII Features • 7-bit code • 8th bit is unused (or used for a parity bit) • 27 = 128 codes • Two general types of codes: – 95 are “Graphic” codes (displayable on a console) – 33 are “Control” codes (control features of the console or communications channel)
  • 16. ASCII Chart 000 001 010 011 100 101 110 111 0000 NULL DLE 0 @ P ` p 0001 SOH DC1 ! 1 A Q a q 0010 STX DC2 " 2 B R b r 0011 ETX DC3 # 3 C S c s 0100 EDT DC4 $ 4 D T d t 0101 ENQ NAK % 5 E U e u 0110 ACK SYN & 6 F V f v 0111 BEL ETB ' 7 G W g w 1000 BS CAN ( 8 H X h x 1001 HT EM ) 9 I Y i y 1010 LF SUB * : J Z j z 1011 VT ESC + ; K [ k { 1100 FF FS , < L l | 1101 CR GS - = M ] m } 1110 SO RS . > N ^ n ~ 1111 SI US / ? O _ o DEL
  • 17. 000 001 010 011 100 101 110 111 0000 NULL DLE 0 @ P ` p 0001 SOH DC1 ! 1 A Q a q 0010 STX DC2 " 2 B R b r 0011 ETX DC3 # 3 C S c s 0100 EDT DC4 $ 4 D T d t 0101 ENQ NAK % 5 E U e u 0110 ACK SYN & 6 F V f v 0111 BEL ETB ' 7 G W g w 1000 BS CAN ( 8 H X h x 1001 HT EM ) 9 I Y i y 1010 LF SUB * : J Z j z 1011 VT ESC + ; K [ k { 1100 FF FS , < L l | 1101 CR GS - = M ] m } 1110 SO RS . > N ^ n ~ 1111 SI US / ? O _ o DEL
  • 18. 000 001 010 011 100 101 110 111 0000 NULL DLE 0 @ P ` p 0001 SOH DC1 ! 1 A Q a q 0010 STX DC2 " 2 B R b r 0011 ETX DC3 # 3 C S c s 0100 EDT DC4 $ 4 D T d t 0101 ENQ NAK % 5 E U e u 0110 ACK SYN & 6 F V f v 0111 BEL ETB ' 7 G W g w 1000 BS CAN ( 8 H X h x 1001 HT EM ) 9 I Y i y 1010 LF SUB * : J Z j z 1011 VT ESC + ; K [ k { 1100 FF FS , < L l | 1101 CR GS - = M ] m } 1110 SO RS . > N ^ n ~ 1111 SI US / ? O _ o DEL Most significant bit Least significant bit
  • 19. 000 001 010 011 100 101 110 111 0000 NULL DLE 0 @ P ` p 0001 SOH DC1 ! 1 A Q a q 0010 STX DC2 " 2 B R b r 0011 ETX DC3 # 3 C S c s 0100 EDT DC4 $ 4 D T d t 0101 ENQ NAK % 5 E U e u 0110 ACK SYN & 6 F V f v 0111 BEL ETB ' 7 G W g w 1000 BS CAN ( 8 H X h x 1001 HT EM ) 9 I Y i y 1010 LF SUB * : J Z j z 1011 VT ESC + ; K [ k { 1100 FF FS , < L l | 1101 CR GS - = M ] m } 1110 SO RS . > N ^ n ~ 1111 SI US / ? O _ o DEL e.g., ‘a’ = 1100001
  • 20. 95 Graphic codes 000 001 010 011 100 101 110 111 0000 NULL DLE 0 @ P ` p 0001 SOH DC1 ! 1 A Q a q 0010 STX DC2 " 2 B R b r 0011 ETX DC3 # 3 C S c s 0100 EDT DC4 $ 4 D T d t 0101 ENQ NAK % 5 E U e u 0110 ACK SYN & 6 F V f v 0111 BEL ETB ' 7 G W g w 1000 BS CAN ( 8 H X h x 1001 HT EM ) 9 I Y i y 1010 LF SUB * : J Z j z 1011 VT ESC + ; K [ k { 1100 FF FS , < L l | 1101 CR GS - = M ] m } 1110 SO RS . > N ^ n ~ 1111 SI US / ? O _ o DEL
  • 21. 33 Control codes 000 001 010 011 100 101 110 111 0000 NULL DLE 0 @ P ` p 0001 SOH DC1 ! 1 A Q a q 0010 STX DC2 " 2 B R b r 0011 ETX DC3 # 3 C S c s 0100 EDT DC4 $ 4 D T d t 0101 ENQ NAK % 5 E U e u 0110 ACK SYN & 6 F V f v 0111 BEL ETB ' 7 G W g w 1000 BS CAN ( 8 H X h x 1001 HT EM ) 9 I Y i y 1010 LF SUB * : J Z j z 1011 VT ESC + ; K [ k { 1100 FF FS , < L l | 1101 CR GS - = M ] m } 1110 SO RS . > N ^ n ~ 1111 SI US / ? O _ o DEL
  • 22. Alphabetic codes 000 001 010 011 100 101 110 111 0000 NULL DLE 0 @ P ` p 0001 SOH DC1 ! 1 A Q a q 0010 STX DC2 " 2 B R b r 0011 ETX DC3 # 3 C S c s 0100 EDT DC4 $ 4 D T d t 0101 ENQ NAK % 5 E U e u 0110 ACK SYN & 6 F V f v 0111 BEL ETB ' 7 G W g w 1000 BS CAN ( 8 H X h x 1001 HT EM ) 9 I Y i y 1010 LF SUB * : J Z j z 1011 VT ESC + ; K [ k { 1100 FF FS , < L l | 1101 CR GS - = M ] m } 1110 SO RS . > N ^ n ~ 1111 SI US / ? O _ o DEL
  • 23. Numeric codes 000 001 010 011 100 101 110 111 0000 NULL DLE 0 @ P ` p 0001 SOH DC1 ! 1 A Q a q 0010 STX DC2 " 2 B R b r 0011 ETX DC3 # 3 C S c s 0100 EDT DC4 $ 4 D T d t 0101 ENQ NAK % 5 E U e u 0110 ACK SYN & 6 F V f v 0111 BEL ETB ' 7 G W g w 1000 BS CAN ( 8 H X h x 1001 HT EM ) 9 I Y i y 1010 LF SUB * : J Z j z 1011 VT ESC + ; K [ k { 1100 FF FS , < L l | 1101 CR GS - = M ] m } 1110 SO RS . > N ^ n ~ 1111 SI US / ? O _ o DEL
  • 24. 000 001 010 011 100 101 110 111 0000 NULL DLE 0 @ P ` p 0001 SOH DC1 ! 1 A Q a q 0010 STX DC2 " 2 B R b r 0011 ETX DC3 # 3 C S c s 0100 EDT DC4 $ 4 D T d t 0101 ENQ NAK % 5 E U e u 0110 ACK SYN & 6 F V f v 0111 BEL ETB ' 7 G W g w 1000 BS CAN ( 8 H X h x 1001 HT EM ) 9 I Y i y 1010 LF SUB * : J Z j z 1011 VT ESC + ; K [ k { 1100 FF FS , < L l | 1101 CR GS - = M ] m } 1110 SO RS . > N ^ n ~ 1111 SI US / ? O _ o DEL Punctuation, etc.
  • 26. Common Control Codes • CR 0D carriage return • LF 0A line feed • HT 09 horizontal tab • DEL 7F delete • NULL 00 null Hexadecimal code
  • 27. 000 001 010 011 100 101 110 111 0000 NULL DLE 0 @ P ` p 0001 SOH DC1 ! 1 A Q a q 0010 STX DC2 " 2 B R b r 0011 ETX DC3 # 3 C S c s 0100 EDT DC4 $ 4 D T d t 0101 ENQ NAK % 5 E U e u 0110 ACK SYN & 6 F V f v 0111 BEL ETB ' 7 G W g w 1000 BS CAN ( 8 H X h x 1001 HT EM ) 9 I Y i y 1010 LF SUB * : J Z j z 1011 VT ESC + ; K [ k { 1100 FF FS , < L l | 1101 CR GS - = M ] m } 1110 SO RS . > N ^ n ~ 1111 SI US / ? O _ o DEL
  • 28. Terminology • Learn the names of the special symbols – [ ] brackets – { } braces – ( ) parentheses – @ commercial ‘at’ sign – & ampersand – ~ tilde
  • 29. 000 001 010 011 100 101 110 111 0000 NULL DLE 0 @ P ` p 0001 SOH DC1 ! 1 A Q a q 0010 STX DC2 " 2 B R b r 0011 ETX DC3 # 3 C S c s 0100 EDT DC4 $ 4 D T d t 0101 ENQ NAK % 5 E U e u 0110 ACK SYN & 6 F V f v 0111 BEL ETB ' 7 G W g w 1000 BS CAN ( 8 H X h x 1001 HT EM ) 9 I Y i y 1010 LF SUB * : J Z j z 1011 VT ESC + ; K [ k { 1100 FF FS , < L l | 1101 CR GS - = M ] m } 1110 SO RS . > N ^ n ~ 1111 SI US / ? O _ o DEL
  • 30. Escape Sequences • Extend the capability of the ASCII code set • For controlling terminals and formatting output • Defined by ANSI in documents X3.41-1974 and X3.64-1977 • The escape code is ESC = 1B16 • An escape sequence begins with two codes: ESC [ 1B16 5B16
  • 31. Examples • Erase display: ESC [ 2 J • Erase line: ESC [ K
  • 32. Next 1 slides Standard Alphanumeric Formats • BCD • ASCII • EBCDIC • Unicode
  • 33. EBCDIC • Extended BCD Interchange Code (pronounced ebb’-se-dick) • 8-bit code • Developed by IBM • Rarely used today • IBM mainframes only
  • 34. Next 2 slides Standard Alphanumeric Formats • BCD • ASCII • EBCDIC • Unicode
  • 35. Unicode • 16-bit standard • Developed by a consortia • Intended to supercede older 7- and 8-bit codes
  • 36. Unicode Version 2.1 • 1998 • Improves on version 2.0 • Includes the Euro sign (20AC16 = ) • From the standard: …contains 38,887 distinct coded characters derived from the supported scripts. These characters cover the principal written languages of the Americas, Europe, the Middle East, Africa, India, Asia, and Pacifica. http://www.unicode.org
  • 37. Keyboard Input • Key (“scan”) codes are converted to ASCII • ASCII code sent to host computer • Received by the host as a “stream” of data • Stored in buffer • Processed • Etc. pp. 69
  • 38. Shift Key • inhibits bit 5 in the ASCII code Key(s) ASCII code 6 5 4 3 2 1 0 Character 1 1 0 0 0 0 1 1 0 0 0 0 0 1 a A a aShift
  • 39. Control Key • inhibits bits 5 & 6 in the ASCII code Key(s) ASCII code 6 5 4 3 2 1 0 Character 1 1 0 0 0 1 1 0 0 0 0 0 1 1 c ETX c cCtrl Control code
  • 40. Other Input • OCR – optical character recognition • Bar code readers • Voice/audio input • Punched cards • Images / objects • Pointing devices pp. 69-86
  • 41. OCR Hello, world Page of text Optical scan 10110110… Computer file
  • 42. Other Input • OCR – optical character recognition • Bar code readers • Voice/audio input • Punched cards • Images / objects • Pointing devices pp. 69-86
  • 43. Bar Codes • An automatic identification (Auto ID) technology that streamlines identification and data collection • See http://www.digital.net/barcoder/barcode.html
  • 44. Other Input • OCR – optical character recognition • Bar code readers • Voice/audio input • Punched cards • Images / objects • Pointing devices pp. 69-86
  • 45. Voice/audio Input • Input device: microphone • Audio input is “digitized” and stored • Processed in two ways – As is (no recognition) – Recognized and converted to alphanumeric data (ASCII) Digitize 10110010…
  • 46. Other Input • OCR – optical character recognition • Bar code readers • Voice/audio input • Punched cards • Images / objects • Pointing devices pp. 69-86
  • 47. Punched Cards • Invented by Herman Hollerith (founder of IBM) • Each card holds 80 characters
  • 48. Other Input • OCR – optical character recognition • Bar code readers • Voice/audio input • Punched cards • Images / objects • Pointing devices pp. 69-86
  • 49. Images • Typically images are pictures that are optically scanned and saved as a “bit map” or in some other format • Many formats – gif, jpeg, …
  • 51. Objects • Images made of geometrically definable shapes • Offer efficiency, flexibility, small size, etc.
  • 52. Other Input • OCR – optical character recognition • Bar code readers • Voice/audio input • Punched cards • Images / objects • Pointing devices pp. 69-86
  • 53. Pointing Devices • Originally used for specifying coordinates (x, y) for graphical input • Today used as general purpose device for “graphical user interfaces” (GUIs)