DataCompression-Section1
DataCompression-Section1
CS411
Section 1
Lecturer: Dr. Saleh Mesbah
TA: Mahmoud ElMorshedy
Agenda
• Example: Each student's test score is one piece of data, but average score of class
is information.
Data Types
Data
• Text
• Represented in characters that are encoded into
• ASCII (1 byte)
• Unicode
• UTF-8 (1-4 bytes) variable-length encoding
• UTF-16 (2-4 bytes) variable-length encoding
• UTF-32 (4 bytes) fixed-length encoding
Data Representation and Storage Cont.
• Numbers
• Numbering systems (Decimal – Hexadecimal – Octal – Binary)
• Integers: uint8 – uint16 – uint32 – uint64 – int8 – int16 – int32 – int64
• Floating-Point Numbers: 32-bit Single-Precision, 64-bit Double-Precision
Data Representation and Storage Cont.
• Programs
• Programs include code (opcode) and data (operands)
• Example: MOV, AL, 34h
• Audio
• Analog audio data is converted into digital form through “Sampling” using ADC
• Example: Sampling Rate 44.1 kHz with 16-bit resolution
• Audio file size(in Kbytes) = Sample Rate * Bit Resolution/8 * length * Number of
channels
Data Representation and Storage Cont.
• Images
• Digital images are made up of pixels. Each pixel in an image is made up of binary
numbers.
• Grayscale, Colored images.
• Video
• Video is made up of frames of images and audio file.
• Digital video file size (in bytes)= Frame size * Color depth * Frame Rate * length
• Example: Frame size(160*120), Color resolution(8-bit), Frame rate(25 fps), Duration=10
mins
Why Data Compression?