# Quantization confusion in pulse code modulation.

#### terabaaphoonmein

Joined Jul 19, 2020
108
I have a question-:
This is a quantized version of an information signal. Here number of bits used to encode is 4 so there are 16 levels.

Here is the encoding.
I tried to do this with similar type of questions.

But as you see here is the problem. There are 5 Voltage levels but only 4 possible encodings. There is a solution to this afaik it is to let like-:

4V-2V=00
2V-0V=01
0V-–2V=10
-2V- -4V=11.
But that is making less sense to me at the moment.
Can you shed some light in this issue?

#### ericgibbs

Joined Jan 29, 2010
15,691
Hi tera,
Here number of bits used to encode is 4 so there are 16 levels.
Is the waveform you have drawn a Sine wave.
How do assume there are only 4 levels.?

E

#### MrChips

Joined Oct 2, 2009
26,481
Ignore the 5 levels. There are only 4 ranges.
You cannot have the same voltage falling in two different ranges. You have to take into account an error value which we can call e.

As an example, let us suppose a unipolar signal is digitized into 2 bits and a step of 1V.

1st range is 0V to 1V (actually any value 1V and lower)
2nd range is 1V+e to 2V
3rd range is 2V+e to 3V
4th range is 3V+e and higher