'PCM' is the abbreviation for 'pulse code modulation.' To digitalize an analogue signal (i.e., voice signal) in a digital communication system, we usually employ the sampling technique. Before moving on to the main topic, we need to talk about sampling technique in more detail.

Before moving on to the main topic, we need to talk about sampling technique in more detail.

**Sampling:**

Sampling is a switching approach in which a switch is turned on in a specific time interval. Imagine a continuous voice signal passing through such a system; instead of a continuous signal, we get pulses at specific time intervals. Now the question arises as to how quickly that switching (sampling) operation must be completed for reliable transmission. Because we know that digital stuff requires less memory than analogue content. There is a restriction of sampling frequency which should be at least twice the message signal’s frequency.

**Quantization:**

Computers do not understand human language; they can only comprehend machine languages, which are essentially '0' and '1'. However, you are familiar with how real-world signals (such as voice signals) seem. If we only assign '0' and '1' to the sample values, we can clearly comprehend that they are all unique, but we are only representing them as '0' and '1'. That isn't right. That is why we use quantization to represent each sample value with a more meaningful notation, such as 0001, 0010, 0011, and so on. We can express 16 various levels of a signal with a 4 bit quantizer (as 2^4 =16), such as 0000, 0001, 0010, 0011, 0100, 0101, 0110, 0111, 1000, 1001, 1010, 1011, 1100, 1101, 1110.

For instance, in a simple system, there are two levels: the top level is +5 Volt, and the lower level is -5 Volt. As a result, the overall voltage range is +5 – (-5) = 10 Volts.

Now, (Vmax – Vmin) / 2 = 10/2 = 5 Volt is the step size.

We can now declare that if the voltage is between '0' and '5' Volts, we express it as '1'. When the signal value is between '0' and '-5' Volt, the value is set to '0'. Similarly, the number of levels in a 3 bit quantizer is 2^3= 8. Each step size is (10/3) Volts, or 3.33 Volts, if the overall voltage spread is 10 Volts. The step size is frequently expressed as delta (∆). We'll use it as a notation in the future.

Let us now discuss quantization error.

**Error in Quantization:**

The maximum quantization error will be ∆/2 in this case. If a signal falls between '0' and '5,' Volt there is a potential of getting a 2.5-volt error if it goes in the middle of those two levels. In the worst-case scenario, it can be quantized incorrectly as '0' or '1'. By increasing the levels and decreasing the step size, we may reduce the bit error.

**Question: **

Six signals are multiplexed using TDM, and the number of quantization levels employed is 256. What is the signal's transmission bandwidth? (The frequency of the message signal is 5 KHz.)

Answer:

Given,

In TDM, the number of signals for multiplexing is N = 6.

fm = 5 KHz is the frequency of the message signal.

n = 8 bits/sample in PCM

L = 256 is the number of quantization levels.

As a result, bandwidth equals (N*n*fs) / 2.

Alternatively, N*n*2fm /2

Or, 6*8*2*5 / 2 = 6*8*2*5

= 240 KHz

The PCM system's bit rate is now

N*n*2fm

=6*8*2*5

=480 kbps

**MATLAB Code for Pulse Code Modulation: **