Representation of Data
1. Meaning
Data representation is the method used to encode information so computers can store, process, and communicate it. Digital computers work with bits (0 and 1). Text, numbers, images, audio, and video are ultimately encoded as bit patterns.
2. From Information to Network Signals
The sender encodes information into bits. The communication system represents those bits as electrical, optical, or radio signals. The receiver recovers the bit stream and decodes it into usable information.
3. Representation of Text
Text is represented by assigning numeric codes to characters.
- ASCII: The original ASCII standard uses 7 bits and represents 128 values, including letters, digits, punctuation, and control characters.
- Unicode: A character standard designed to represent text from many writing systems.
- UTF-8: A widely used variable-length Unicode encoding that uses 1–4 bytes per code point.
The sender encodes characters into bytes. The receiver must interpret those bytes using the appropriate encoding.
4. Representation of Numbers
Numbers are represented using binary bit patterns.
- Unsigned integers: Represent non-negative values.
- Signed integers: Often use two's complement. For an n-bit two's-complement integer, the range is (-2^{n-1}) to (2^{n-1}-1).
- Floating-point numbers: Represent real-number approximations using a sign, exponent, and significand.
- Number systems: Binary uses base 2, decimal uses base 10, and hexadecimal uses base 16. One hexadecimal digit corresponds to four binary bits.
Example: Hexadecimal A represents decimal 10 and binary 1010.
5. Representation of Images
A digital image is commonly represented as a grid of pixels (picture elements).
- Resolution: Width and height in pixels, such as 1920 × 1080.
- Colour depth: Number of bits used per pixel. With b bits, up to (2^b) distinct values can be represented.
- Uncompressed image size: Approximately width × height × bits per pixel, excluding headers and other overhead.
- Compression: Reduces the data needed to store or transmit an image.
SVG illustration: pixels form an image
6. Representation of Audio
Digital audio represents sound by measuring an analogue waveform at regular intervals and converting each measurement to a digital value.
- Sampling rate: Number of samples taken per second, measured in hertz (Hz).
- Bit depth: Number of bits used for each sample.
- Channels: Mono has one channel; stereo has two.
- Uncompressed PCM bit rate:
Worked example: For 44,100 samples/s, 16 bits/sample, and 2 channels:
That is 1,411.2 kb/s, before protocol or file overhead.
7. Representation of Video
Digital video is a sequence of image frames, often accompanied by audio. Its data volume depends on frame resolution, frame rate (frames per second), colour depth, duration, audio quality, and compression. Video codecs reduce the amount of data needed for storage and network streaming.
8. Data Communication: Sender to Receiver
The quality of recovered data depends on correct encoding/decoding and channel reliability. Networks may use error detection, error correction, or retransmission to handle transmission errors.
9. Important Terms
| Term | Meaning |
|---|---|
| Bit (b) | A binary digit, 0 or 1 |
| Byte (B) | Usually 8 bits |
| Data rate | Amount of data transmitted per second, commonly bps |
| File size | Amount of stored data, commonly bytes |
| Encoding | Mapping information into a defined representation |
| Modulation | Mapping data onto a signal suitable for transmission |
| Lossless compression | Original data can be recovered exactly |
| Lossy compression | Some information is discarded to reduce size |
10. Quick Revision
- All digital information is represented by bits.
- ASCII and Unicode/UTF-8 are used for text.
- Integers and floating-point formats represent numbers.
- Images use pixels; resolution and colour depth affect size.
- Audio uses sampling and quantization; bit rate depends on sample rate, bit depth, and channels.
- Video consists of frames and usually uses compression.
- A communication system converts bits into signals and reconstructs the data at the receiver.
11. Exam-Style Questions
- Define data representation and explain why digital systems use binary.
- Differentiate ASCII, Unicode, and UTF-8.
- Explain pixel, resolution, and colour depth.
- Define sampling rate and bit depth. Calculate the bit rate of 48 kHz, 16-bit stereo PCM audio.
- Differentiate lossless and lossy compression with examples.
- Explain how data is encoded, transmitted, and decoded in a communication system.
- Distinguish encoding from modulation.