>_
EngineeringNotes
Back to Computer Networks
Module 07 • Presentation Layer

Presentation Layer

The 6th layer of the OSI model, acting as the "Translator of the Network" by handling data formatting, translation, encryption, and compression.

01

Overview & Main Functions

The Presentation Layer works between the Application Layer (Layer 7) and the Session Layer (Layer 5).

Different computers use different data formats, character encoding systems, and encryption methods. The presentation layer ensures that data sent by one system can be properly understood by another system by converting it into a common standard format.

Network Translator

Converts data to a universal standard.

Core Responsibilities

1. Data Translation

Converts sender format → standard format → receiver format.

Example: Translating from ASCII encoding to Unicode.

2. Data Encryption

Protects data from unauthorized access by encrypting it before transmission and decrypting it at the receiver.

Example: HTTPS, online banking, secure passwords.

3. Data Compression

Reduces the size of data before transmission for faster transfer and reduced bandwidth usage.

Example: ZIP, RAR, JPEG, MP3, MP4.

4. Data Formatting

Ensures the proper structure and representation of text, images, video, and audio data.

Example: Standardizing how a document is laid out.
02

Working Process

Sender Side

1
Translate Data

Converts application data into standard format.

2
Compress Data

Reduces size if needed.

3
Encrypt Data

Provides security.

4
Send to Session Layer

Passes the processed data down.

Receiver Side

1
Receive Data

From the Session Layer.

2
Decrypt Data

Restores the encrypted data.

3
Decompress Data

Expands data to original size.

4
Translate Format

Converts standard format into receiver's format.

03

Formats, Encoding & Protocols

Data Formats Handled

TextASCII, Unicode
ImageJPEG, PNG, GIF
AudioMP3, WAV
VideoMP4, MPEG
DocsPDF, DOCX

Character Encoding

ASCII

Represents characters using 7 bits, supports English characters. (e.g., A = 65, B = 66).

Unicode

Supports almost all world languages and is used in modern systems. (e.g., Hindi, Chinese, Emojis).

Encryption Techniques

Symmetric Encryption

Uses the same key for both encryption and decryption.

Asymmetric Encryption

Uses different public and private keys.

Compression Techniques

Lossless Compression

Original data can be perfectly restored. No data is lost.

Examples: ZIP, PNG
Lossy Compression

Some data is removed permanently to reduce size significantly.

Examples: JPEG, MP3, MP4
Protocol/FormatPurpose & Details
SSL/TLSSecure Sockets Layer / Transport Layer Security. Used for secure internet communication (HTTPS).
JPEGImage compression format (Lossy).
GIFImage format that supports animated images.
MPEGStandard for video and audio compression.
ASCII / UnicodeUniversal character encoding standards.
04

Real-Life Examples & Comparisons

Watching YouTube
  • Compresses video
  • Encrypts stream
  • Converts formats
Online Banking
  • Encrypts passwords
  • Secures transactions
Sending Images on WhatsApp
  • Compresses image
  • Encrypts message
  • Converts data format
Advantages
  • Security (Encryption)
  • Reduced bandwidth (Compression)
  • Compatibility (Data translation)
  • Standardization (Common formats)
Disadvantages
  • Processing overhead
  • Extra CPU usage for transformations
  • Complexity of multiple format handling

Comparisons

Session LayerPresentation Layer
Manages sessionsManages data representation
Dialog controlTranslation
SynchronizationEncryption
Session maintenanceCompression
Presentation LayerApplication Layer
Data formattingUser services
Encryption/decryptionEmail, web browsing
CompressionDirect interaction with applications

OSI vs TCP/IP For Presentation Layer

In the OSI Model, the presentation layer is a separate layer (Layer 6). In the TCP/IP Model, there is no separate presentation layer; its functions are combined into the Application Layer.

05

Exam Prep & Analogy

Important Terms

Serialization

Converting data objects into transferable format.

Encoding

Converting data into a machine-readable format.

Encryption Key

Used for both encryption and decryption algorithms.

Common Exam Questions

Q1. What is the main function of presentation layer?
The presentation layer handles translation, encryption, decryption, compression, and formatting of data.
Q2. Why is presentation layer called translator layer?
Because it converts data between different formats and encoding systems so distinct systems can understand each other.
Q3. What is difference between compression and encryption?
  • Compression: Reduces size, improves speed.
  • Encryption: Provides security, protects data.
Q4. Name some presentation layer standards.
ASCII, Unicode, JPEG, MPEG, SSL/TLS.

Simple Analogy

Imagine two people speaking different languages. The presentation layer acts like a translator + security officer + file compressor.

Translating languageData Translation
Locking messageEncryption
Compressing filesCompression