Representation of Data in Computer Networks
Data representation is the foundational concept that governs how real-world information — text, numbers, images, audio, and video — is converted into a machine-readable format that computers can process, store, and transmit across networks . Since computers operate using electronic components that exist in two states (on and off), all data is ultimately represented in binary — sequences of 0s and 1s .
The smallest unit of binary data is a bit (binary digit), which can hold either a 0 or a 1. Eight bits grouped together form a byte, which is the basic addressable unit of memory in most computer architectures . The representation of data is critical in computer networking because data must be encoded into signals suitable for transmission over physical media (copper wire, fiber optic cable, or wireless channels) and then accurately decoded at the receiving end .
There are two broad categories of data and signals in computer networks:
- Analog data/signals: Continuous values that vary smoothly over time (e.g., human voice, natural light). Analog signals can take on an infinite number of values within a range .
- Digital data/signals: Discrete values that change in steps. Digital signals have a finite number of discrete levels — typically two (0 and 1) in binary systems .
The distinction between data and signals matters: data is the information being communicated, while a signal is the physical embodiment of that information as it travels through the network medium .
Key Terminology
- Bit
- Byte
- Analog Signal
- Digital Signal
Footnotes
-
Unstop — Data Representation: Methods, Examples, & Uses — Overview of data representation types, encoding methods, and networking implications. ↩
-
Brainly — How is text, image, audio, and video data represented in computers? — Expert-verified explanation of binary data representation for all media types. ↩
-
Vaia — Data Representation in Computer Science — Fundamental concepts including binary systems, bits/bytes, number systems, and character encoding. ↩
-
Computer Science Café — IB Computer Science: Binary Data Representation — Encoding mechanisms for integers, text, images, audio, and video in binary. ↩
-
Sathyabama University — Analog and Digital Signals: Encoding and Modulation (Unit II) — Line encoding schemes, modulation, and signal types in computer networks. ↩ ↩2 ↩3
Representing Numbers and Letters with Binary — Crash Course Computer Science #4
Text Representation: Character Encoding
Text data is represented by assigning a unique binary code to each character (letters, digits, punctuation, control characters). Several encoding standards exist:
ASCII (American Standard Code for Information Interchange)
ASCII originally defined 128 characters using 7 bits, covering the English alphabet (upper and lowercase), digits 0–9, punctuation marks, and control characters like line feed, carriage return, and tab . An 8-bit extended ASCII (ISO-8859) later expanded this to 256 characters to include additional symbols and accented letters .
| Character | ASCII Decimal | ASCII Binary (7-bit) |
|---|---|---|
| A | 65 | 1000001 |
| B | 66 | 1000010 |
| a | 97 | 1100001 |
| 0 | 48 | 0110000 |
| Space | 32 | 0100000 |
| Carriage Return (CR) | 13 | 0001101 |
Unicode and UTF-8
Unicode was developed to overcome ASCII's limitation of supporting only English characters. Unicode can represent over 1 million characters. UTF-8, the most widely used encoding form, uses variable-length encoding: 1 byte for ASCII characters (backward compatible), 2 bytes for Latin and other common scripts, 3 bytes for most CJK (Chinese, Japanese, Korean) characters, and 4 bytes for rarely used historical or mathematical symbols . UTF-16 uses 2 or 4 bytes per character, and UTF-32 uses exactly 4 bytes for every character.
EBCDIC
EBCDIC (Extended Binary Coded Decimal Interchange Code) is an older 8-bit encoding scheme used mainly on IBM mainframe systems. It maps 256 characters but in a different arrangement than ASCII, making the two incompatible without conversion .
Footnotes
-
TutorialsPoint — Representation of Data/Information — ASCII, EBCDIC, and data representation methods. ↩ ↩2
-
Unstop — Data Representation: Methods, Examples, & Uses — Overview of data representation types, encoding methods, and networking implications. ↩
-
Unstop — Data Representation FAQ — Definitions and FAQs on data representation types and encoding standards. ↩
Numeric Data Representation
Numbers are represented in computers using positional number systems, most commonly binary (base-2), but also octal (base-8), decimal (base-10), and hexadecimal (base-16) .
| Decimal | Binary | Octal | Hexadecimal |
|---|---|---|---|
| 0 | 0000 | 0 | 0 |
| 5 | 0101 | 5 | 5 |
| 10 | 1010 | 12 | A |
| 15 | 1111 | 17 | F |
| 255 | 11111111 | 377 | FF |
Integer Representation
- Unsigned integers: All bits represent magnitude. An -bit unsigned integer can represent values from to .
- Signed integers: Commonly represented using two's complement, where the most significant bit (MSB) serves as the sign bit. An -bit two's complement integer ranges from to .
- Floating-point numbers: Represented using the IEEE 754 standard, which uses sign, exponent, and mantissa components. A 32-bit float (single precision) allocates 1 bit for sign, 8 bits for exponent, and 23 bits for the mantissa .
Hexadecimal in Networking
Hexadecimal is extensively used in networking for representing MAC addresses (e.g., 00:1A:2B:3C:4D:5E), IPv6 addresses, and payload data in packet analysis tools. Each hex digit maps to exactly 4 bits, making it a compact human-readable representation of binary .
Footnotes
-
Vaia — Data Representation in Computer Science — Fundamental concepts including binary systems, bits/bytes, number systems, and character encoding. ↩ ↩2 ↩3
-
Computer Science Café — IB Computer Science: Binary Data Representation — Encoding mechanisms for integers, text, images, audio, and video in binary. ↩
Converting Analog Audio to Digital Data
- 1Step 1
The continuous analog audio signal is sampled at discrete time intervals. The sampling rate determines how frequently the signal is measured. The Nyquist–Shannon sampling theorem states that the sampling frequency must be greater than twice the highest frequency component of the signal: For CD-quality audio, the sampling rate is 44,100 Hz, which is more than twice the human hearing range of approximately 20,000 Hz .
Footnotes
-
Wikipedia — Nyquist–Shannon Sampling Theorem — Formal definition of the sampling theorem, Nyquist frequency, and signal reconstruction. ↩
-
- 2Step 2
Each sampled value (which is a continuous amplitude) is rounded to the nearest discrete level. Quantization introduces a small error known as quantization error. The number of levels depends on the bit depth: an -bit system has levels. For example, 16-bit audio uses quantization levels .
Footnotes
-
Monolithic Power — Fundamental Concepts: Sampling, Quantization, and Encoding — ADC fundamentals including quantization levels, step size, and binary encoding. ↩
-
- 3Step 3
Each quantized sample is assigned a unique binary code. With 16 bits per sample, each sample value is represented as a 16-bit binary number. The total bit rate for CD-quality stereo audio is: .
Footnotes
-
Wikipedia — Nyquist–Shannon Sampling Theorem — Formal definition of the sampling theorem, Nyquist frequency, and signal reconstruction. ↩
-
- 4Step 4
The resulting binary stream can then be transmitted over a network using line-encoding schemes (such as Manchester or NRZ) to convert the binary data into physical signals suitable for the transmission medium .
Footnotes
-
Sathyabama University — Analog and Digital Signals: Encoding and Modulation (Unit II) — Line encoding schemes, modulation, and signal types in computer networks. ↩
-
Image Representation
Images are represented digitally using two primary approaches: bitmap (raster) and vector graphics .
Bitmap (Raster) Images
A bitmap image is a grid of pixels (picture elements), where each pixel's color is encoded in binary . The resolution of an image is defined by its dimensions (width × height in pixels), and the color depth (or bit depth) determines how many colors each pixel can represent.
| Color Depth | Bits per Pixel | Number of Colors |
|---|---|---|
| 1-bit | 1 | 2 |
| 8-bit | 8 | 256 |
| 16-bit | 16 | 65,536 |
| 24-bit (True Color) | 24 | 16,777,216 |
| 32-bit | 32 | 4,294,967,296 |
For a 24-bit True Color RGB image, each pixel uses 8 bits for Red, 8 bits for Green, and 8 bits for Blue. The total binary representation of one pixel requires bits .
The file size of an uncompressed bitmap can be calculated as:
For example, a image with 24-bit color depth requires:
Vector Graphics
Unlike bitmaps, vector graphics represent images using mathematical descriptions of shapes, lines, and curves rather than pixel grids. They can be scaled to any size without loss of quality and typically produce smaller file sizes for simple graphics .
Footnotes
-
Computer Science Café — IB Computer Science: Binary Data Representation — Encoding mechanisms for integers, text, images, audio, and video in binary. ↩
-
Brainly — How is text, image, audio, and video data represented in computers? — Expert-verified explanation of binary data representation for all media types. ↩
-
Unstop — Data Representation: Methods, Examples, & Uses — Overview of data representation types, encoding methods, and networking implications. ↩ ↩2
Audio and Video Representation
Audio Data
As discussed in the step-by-step section above, analog audio is digitized through sampling, quantization, and binary encoding. Key parameters include:
Below Nyquist's rate, a phenomenon called aliasing occurs, where high-frequency components "fold back" into lower frequencies, causing distortion and artifacts . An anti-aliasing filter removes frequencies above before sampling .
Video Data
Video is represented as a sequence of frames (individual images) displayed at a specific frame rate, typically 24, 30, or 60 frames per second (fps) . Each frame is encoded as a bitmap image, and an associated audio track is synchronized with the frame sequence .
The raw bit rate for uncompressed video can be enormous. For example, a video at 30 fps with 24-bit color:
This highlights the critical importance of compression. Common video codecs like H.264, H.265 (HEVC), and VP9 use inter-frame and intra-frame compression to reduce bit rates by factors of 100× or more while maintaining acceptable visual quality .
Footnotes
-
Wikipedia — Nyquist–Shannon Sampling Theorem — Formal definition of the sampling theorem, Nyquist frequency, and signal reconstruction. ↩ ↩2
-
Monolithic Power — Fundamental Concepts: Sampling, Quantization, and Encoding — ADC fundamentals including quantization levels, step size, and binary encoding. ↩
-
MathWorks — What Is the Nyquist Theorem? — Explanation of the Nyquist rate, aliasing, and signal reconstruction in digital systems. ↩
-
Brainly — How is text, image, audio, and video data represented in computers? — Expert-verified explanation of binary data representation for all media types. ↩ ↩2 ↩3
Common Audio Sampling Rates and Their Applications
Comparison of sampling rates across different audio applications
Line Encoding: From Data to Signals
Once data is represented in binary, it must be converted into physical signals for transmission across network media. This process is called line encoding (or line coding) .
Line encoding converts a sequence of bits into a sequence of voltage pulses. Several key schemes exist:
Line Encoding Schemes Overview
| Scheme | How 0 is Represented | How 1 is Represented | Self-Clocking? | Bandwidth Efficiency |
|---|---|---|---|---|
| NRZ-L | Low voltage | High voltage | No | High (1 bit/signal) |
| NRZ-I | No transition | Transition (inversion) | No | High |
| Manchester | High-to-low transition | Low-to-high transition | Yes | Low (50% efficiency) |
| Differential Manchester | Transition at start for 1, no transition for 0; always mid-bit transition | Always mid-bit transition | Yes | Low |
| RZ (Return-to-Zero) | Negative-to-zero pulse | Positive-to-zero pulse | Yes | Low (2 transitions/bit) |
| 4B/5B | 5-bit code for each 4-bit block (mapped to NRZ-I) | Same mapping system | No (uses NRZ-I) | ~80% efficiency |
NRZ (Non-Return-to-Zero)
In NRZ, the voltage level stays constant for the entire bit period. A high voltage represents a 1 and a low voltage represents a 0 (NRZ-L), or a transition (inversion) represents a 1 while no change represents a 0 (NRZ-I) . The main problem with NRZ is that long sequences of 0s or 1s cause a loss of clock synchronization at the receiver, making it difficult to determine bit boundaries .
Manchester Encoding
Manchester encoding combines clock and data signals into a single self-synchronizing stream. Each bit period contains a transition in the middle: a high-to-low transition encodes 0, and a low-to-high encodes 1 . This eliminates the synchronization problem of NRZ but requires twice the bandwidth (only 50% efficiency compared to NRZ) .
4B/5B Block Coding
To improve on Manchester's bandwidth penalty, block coding maps every 4-bit data group to a 5-bit code, ensuring sufficient transitions for synchronization. This achieves approximately 80% efficiency (4 data bits per 5 signal bits) and is commonly used with NRZ-I encoding in Fast Ethernet (100BASE-TX) .
Footnotes
-
Sathyabama University — Analog and Digital Signals: Encoding and Modulation (Unit II) — Line encoding schemes, modulation, and signal types in computer networks. ↩
-
IIT Kanpur — CS425: Computer Networks, Lecture 03: Data Encoding — NRZ encoding, synchronization issues, and comparison of line coding techniques. ↩ ↩2
-
GeeksforGeeks — Manchester Encoding in Computer Network — Manchester encoding principles, synchronization advantages, and bandwidth trade-offs. ↩ ↩2
-
Medium — The Evolution of Line Encoding Methods — Historical development of line encoding from NRZ through Manchester to block coding schemes like 4B/5B and 8B/10B. ↩
Evolution of Data Representation in Networks
Morse Code & Baudot
1870s–1920sEarly telecommunications used variable-length binary-like codes (dots and dashes) for text transmission. Émile Baudot introduced a fixed 5-bit code for teleprinters."
EBCDIC & Early Encoding
1940s–1950sIBM developed EBCDIC, an 8-bit character encoding for mainframe computers, supporting 256 characters for business data processing."
ASCII Standard Published
1963The American Standard Code for Information Interchange (ASCII) was published, defining a 7-bit character set covering 128 characters for English text, control codes, and punctuation."
NRZ & RZ Line Coding
1960s–1970sNon-Return-to-Zero and Return-to-Zero encoding methods became standard in early digital communication systems and serial interfaces."
Manchester Encoding in Ethernet
1980sManchester encoding was adopted in the original IEEE 802.3 Ethernet standard (10BASE5, 10BASE-T) for its self-clocking property."
Unicode Consortium Founded
1991The Unicode Consortium was established to create a universal character encoding standard supporting all world's writing systems."
4B/5B & Fast Ethernet
1990sBlock coding schemes like 4B/5B were introduced with 100 Mbps Fast Ethernet to overcome Manchester encoding's bandwidth limitations."
8B/10B & Advanced Encoding
2000s–Present8B/10B block coding became standard in Gigabit Ethernet (1000BASE-X). Modern standards use 64B/66B, 128B/130B, and sophisticated modulation schemes like PAM4 for 400G+ networking."
Video Compression Era
2000s–PresentH.264 (2003), H.265/HEVC (2013), and AV1 (2018) codecs revolutionized streaming by enabling high-quality video at dramatically reduced bit rates over networks."
Choosing the Right Encoding Scheme
When selecting a line encoding method for a network, consider the trade-off between bandwidth efficiency and self-clocking capability. NRZ is bandwidth-efficient but suffers from DC baseline wander and loss of synchronization on long runs of identical bits. Manchester guarantees synchronization at the cost of requiring twice the bandwidth. Block coding (4B/5B, 8B/10B) offers a good balance by adding overhead only for synchronization control bits .
Footnotes
-
Medium — The Evolution of Line Encoding Methods — Historical development of line encoding from NRZ through Manchester to block coding schemes like 4B/5B and 8B/10B. ↩
Aliasing and the Nyquist Limit
Sampling an analog signal below the Nyquist rate () causes aliasing — a distortion where high-frequency components are incorrectly reconstructed as lower frequencies. Always apply an anti-aliasing filter before the sampler to remove frequencies above 2. This is why CD audio uses 44,100 Hz to capture sounds up to ~20 kHz with a safety margin.
Footnotes
-
Wikipedia — Nyquist–Shannon Sampling Theorem — Formal definition of the sampling theorem, Nyquist frequency, and signal reconstruction. ↩
-
MathWorks — What Is the Nyquist Theorem? — Explanation of the Nyquist rate, aliasing, and signal reconstruction in digital systems. ↩
Common Questions on Data Representation
Data Representation Key Concepts
Knowledge Check
What is the minimum sampling rate required to perfectly reconstruct an analog signal with a highest frequency component of 20 kHz, according to the Nyquist theorem?
Explore Related Topics
OSI Model
The OSI model is a seven‑layer framework that defines data flow, encapsulation, and troubleshooting across networks.
- Layers 1‑7 progress from raw bits to user services; examples include Ethernet, IP, TCP, and HTTP.
- Encapsulation adds a header (and optional trailer) at each layer: , ending as bits.
- The model enables layered troubleshooting; e.g., Layer 3 problems involve routing/IP, Layer 7 involve application protocols.
- Compared to TCP/IP, OSI splits functions into more layers; Session and Presentation map into TCP/IP’s Application layer.
Floating Point Data Type in Computer Organisation and Architecture
Packets
Packets are the fundamental data units used in network communication, operating at the OSI Network layer and enabling packet‑switching across diverse paths.
- A packet consists of a header (source/destination IP, TTL, etc.), payload (user data), and often a trailer for error checking (e.g., CRC).
- Encapsulation adds headers at each OSI layer (segment → packet → frame) and decapsulation removes them at the receiver.
- Packets are routed by IP addresses via routers’ routing tables, while frames use MAC addresses for local hop‑to‑hop delivery.
- Exceeding the MTU causes fragmentation, and tools like Wireshark can sniff packets for debugging.