Data Representation
Data representation is fundamental to information technology, as all information processed by computers must be represented in digital form. This topic covers analog and digital data, number systems, character encoding, binary arithmetic, and multimedia representation.
1. Analog vs Digital Data
Analog Data
Definition: Continuous signals that can take any value within a range.
Temperature readings from a mercury thermometer.
Human voice in air.
Examples:
Applications:
Audio recording using microphones before digital conversion.
Sensor readings that are inherently continuous.
Digital Data
Definition: Discrete signals represented using a finite number of values (usually 0s and 1s).
Computer files, digital images, digital audio recordings.
Examples:
Applications:
All IT systems process digital data for storage, computation, and transmission.
Analog-to-Digital Conversion (ADC)
When needed: Converting analog signals to digital format for processing by computers.
Recording voice using a microphone → converts sound waves (analog) to digital audio files (MP3/WAV).
Example:
Digital-to-Analog Conversion (DAC)
When needed: Converting digital data back to analog for human use.
Playing a digital music file through speakers.
Example:
Remark: Computers use digital data because it is less susceptible to noise, easier to store, transmit, and manipulate accurately.
2. Digital Data and Bit Representation
Each bit represents a binary state: 0 or 1.
The number of bits determines how many unique patterns can be represented:
Bits | Patterns / Combinations |
|---|---|
1 | 2 |
2 | 4 |
3 | 8 |
4 | 16 |
n | 2ⁿ |
Example: 3 bits can represent 8 different colours in a simple digital image.
3. Number Systems
a. Denary (Decimal) → Binary → Hexadecimal
Denary (base 10): 0–9
Binary (base 2): 0,1
Hexadecimal (base 16): 0–9, A–F
Conversion Example:
Decimal 13 → Binary: 1101 → Hexadecimal: D
b. Two’s Complement for Negative Integers
Used to represent negative numbers in binary.
+3 = 0011
−3 = 1101 (two’s complement)
Example: For 4-bit numbers:
c. Binary Arithmetic
Addition Example: 1010 + 0110 = 10000 → Overflow occurs if result exceeds bit limit.
Subtraction Example: 1010 − 0110 = 0100
Consider minimum and maximum values an n-bit number can hold (max 2 bytes = 16 bits).
4. Character Encoding
Computers represent characters using standardized codes.
ASCII: 7-bit code for English characters and control symbols.
Big-5: Traditional Chinese characters.
Guobiao (GB): Simplified Chinese characters.
Unicode: Universal standard supporting multiple languages and symbols.
Common standards:
Remark: Larger character sets require more bits for representation.
5. Multimedia Representation
Multimedia data includes images, audio, video, and text, which must be digitized for computer use.
Examples of Digitisation:
1. Images:
BMP, PNG, JPG formats.
Consider resolution, color depth, and file size differences.
2. Audio:
WAV, MP3 formats.
WAV is uncompressed (large files), MP3 is compressed (smaller files, some quality loss).
3. Video:
AVI, MPEG4 formats.
Compression affects file size and quality.
4. Text:
TXT, DOCX, ODT, PDF.
Usually stored using ASCII or Unicode encoding.
Remark: Understanding different file formats helps students choose suitable types for storage, quality, and application requirements.
6. Summary
Analog vs Digital: Analog is continuous; digital is discrete and preferred for IT systems.
Bit representation: n bits can represent 2ⁿ patterns.
Number systems: Decimal, binary, hexadecimal; use two’s complement for negatives.
Binary arithmetic: Addition and subtraction, with overflow awareness.
Character encoding: ASCII, Big-5, GB, Unicode.
Multimedia digitisation: Images, audio, video, text; different file formats have trade-offs in size and quality.
Remark: Mastery of data representation is crucial for all ICT topics, as it underpins storage, processing, communication, and multimedia handling in digital systems.