School Project

Digital Communication System Simulator in C#

An interactive simulator for the complete digital communication chain: text → binary → modulation → channel → demodulation → recovery. Every stage can be demonstrated on its own, or the whole end-to-end flow can be run in one go.

Project Overview

The project takes the “signal modulation and demodulation” capstone from the course guide as its backbone and folds in practice from several earlier stages, including source coding and data structures. The whole system is built on the plain .NET base class library with no third-party dependencies, and a unit test suite with a fixed random seed reproduces identical results on any machine.

About This Project

What it sets out to do

Modulation and demodulation are usually taught as abstract block diagrams. This project breaks the diagram into code that can be run and observed stage by stage, so the input and output of each link become concrete.

How it is organised

A console menu drives the program, each numbered entry demonstrating one module on its own; a separate end-to-end simulation strings the stages together into the full chain. The source-coding part implements Huffman coding, and the data-structure part hand-writes a linked-list queue.

What it uses

C# and .NET (targeting .NET 10), using only the base class library with no third-party NuGet dependencies; tests run on xUnit with the random seed fixed at 42.

Scope and limits

Aimed at teaching and demonstration, with the emphasis on explaining principles clearly and running each step through. It does not model realistic channel noise or hardware transmission.

Stages covered

Each link runs on its own so its input and output can be examined.

Source coding

Implements Huffman coding: character frequencies are counted, a prefix code table is built, the compression ratio is computed, and decoding is verified to restore the original text.

Custom data structures

A hand-written linked-list queue, with enqueue and dequeue traced alongside the changing count, plus exception handling verified for dequeuing an empty queue.

Signal modulation

Maps a binary sequence onto a transmittable signal form, the core stage of the whole chain.

Channel simulation

Models how the signal travels through the channel, bridging modulation and demodulation.

Demodulation and recovery

Recovers the binary sequence from the received signal and turns it back into text, checked against the original input.

Reproducible tests

End-to-end assertions under a fixed random seed, guaranteeing that the same input yields the same output on any machine.

Why the plain base class library

The project deliberately limits its dependencies so that every stage stays visible in the code rather than hidden behind a framework.

Zero third-party dependencies

No NuGet package is pulled in beyond xUnit for the test project, so cloning the repository and installing the .NET SDK is enough to run it.

Principles in plain sight

Encoding, modulation and demodulation are all implemented inside the project and can be read alongside the course notes.

Console interaction

Demo entries are chosen by menu number, with no graphical interface needed and identical behaviour on macOS, Windows and Linux.

Back to projects