Header Ads

Breaking News

Data Representation


Data representation refers to the methods used to store, process, and transmit data in a way that computers and other digital devices can understand. It is crucial in computing because data must be encoded into a format that hardware and software can manipulate efficiently. 

1. Types of Data Representation

A. Number Systems

Computers use different number systems to represent data. The primary ones include:

1. Binary (Base 2)

  1. Uses only two digits: 0 and 1

  2. Fundamental for computers, as they operate using electrical signals (ON = 1, OFF = 0)

  3. Example: (1011)₂ = (11)₁₀ in decimal

2. Decimal (Base 10)

  1. Commonly used by humans

  2. Uses ten digits: 0 to 9

  3. Example: (125)₁₀ = (1111101)₂ in binary

3. Octal (Base 8)

  1. Uses eight digits: 0 to 7

  2. Compact representation of binary

  3. Example: (27)₈ = (10111)₂

4. Hexadecimal (Base 16)

  1. Uses 0-9 and A-F (A=10, B=11, ..., F=15)

  2. Frequently used in memory addresses and color codes

  3. Example: (2F)₁₆ = (00101111)₂

B. Text Representation

Characters and words are stored as numbers using standard encoding schemes:

1. ASCII (American Standard Code for Information Interchange)

  1. Uses 7 or 8 bits per character

  2. Example: A = 65 (01000001 in binary)

2. Unicode

  1. Supports multiple languages and symbols

  2. Can use 8, 16, or 32 bits per character

  3. Example: 😊 (Unicode U+1F60A)

3. EBCDIC (Extended Binary Coded Decimal Interchange Code)

  1. Used mainly in IBM mainframes

  2. Example: A = 193 in EBCDIC

C. Image Representation

Images are represented using pixels (tiny dots) and various encoding methods:

1. Bitmap (Raster Images)

  1. Each pixel is stored with a color value

  2. Common formats: BMP, PNG, JPEG

  3. Example: 1920×1080 image = 2,073,600 pixels

2. Vector Graphics

  1. Uses mathematical formulas to define shapes

  2. Scalable without losing quality

  3. Formats: SVG, EPS

D. Audio Representation

Sounds are stored in digital form using sampling techniques:

1. Analog to Digital Conversion (ADC)

  1. Converts continuous sound waves into digital values

  2. Example: Microphones record sound as voltage changes

2. Sampling Rate

  1. Determines sound quality (higher rate = better quality)

  2. Example: 44.1 kHz = 44,100 samples per second (CD quality)

3. Common Audio Formats

  1. Lossless: FLAC, WAV (high quality, large size)

  2. Lossy: MP3, AAC (compressed, lower quality)

E. Video Representation

Videos are a sequence of images played rapidly with audio.

1. Frame Rate

  1. Number of images per second (fps)

  2. Example: 24 fps (cinematic), 60 fps (smooth motion)

2. Compression

  1. Lossless (e.g., ProRes) retains quality

  2. Lossy (e.g., MP4, AVI) reduces file size

2. Data Representation in Memory

A. Bit and Byte

  1. Bit (Binary Digit): Smallest data unit (0 or 1)

  2. Byte: 8 bits (stores one character)

B. Data Types

  1. Integer: Whole numbers (e.g., 100, -50)

  2. Float: Decimal numbers (e.g., 3.14)

  3. Character: Single letter or symbol (e.g., ‘A’)

  4. Boolean: True/False (1 or 0)

C. Memory Units

Unit - Size
Bit - 1 binary digit
Byte - 8 bits
Kilobyte (KB) - 1024 bytes
Megabyte (MB) - 1024 KB
Gigabyte (GB) - 1024 MB
Terabyte (TB) - 1024 GB

3. Importance of Data Representation

  1. Efficient storage and processing

  2. Enables data compression for faster transmission

  3. Ensures compatibility across different systems

  4. Helps in encryption and security








Post Comment