The Hong Kong University of Science and Technology · FACULTY OF ELECTRICAL ENGINEERING

ELEC1010 Chap.7 Quantization and Digital Precision

- one subject, every graph, every model, every mark
6 Chapters3-page Bible
Our own words - no uploaded lecturer files
Updated for this semester
Chapter 7 of 10 · ELEC1010

Quantization and Digital Precision

Map each sample to a finite level

Sampling chooses when a value is observed; quantization chooses which stored amplitude represents that observation. A uniform N-bit quantizer offers 2 to the power N codes across the stated input range. Dividing the range width by the number of levels gives the step size.

Keep range, level count and code count distinct before assigning any binary pattern.

Each input falls into an interval, and the encoder assigns that interval a code. Decoding returns a representative level rather than the exact analog input.

With midpoint reconstruction, the representative lies halfway between interval boundaries and the magnitude of quantization error stays within half a step for inputs inside the range. Stating the interval convention resolves ambiguity at exact boundaries.

A complete calculation writes levels, step size, selected interval, binary code, reconstructed value and signed or absolute error.

The round trip from input to code and back exposes two common mistakes: dividing the range by the number of boundary points instead of levels, and reporting the interval edge as the reconstructed midpoint. The half-step bound provides a final numerical check.

Adding one bit doubles the number of levels and halves the uniform step over the same range. Amplitude resolution improves, but each sample word becomes longer.

This benefit does not correct aliasing, because extra bits refine stored values only at existing sample instants. Conversely, increasing sampling rate does not remove amplitude rounding produced by a coarse quantizer.

Digital storage and transmission costs combine both choices. Raw bit rate equals samples per second multiplied by bits per sample and the number of channels.

Total size also includes duration, with conversion to bytes only after the bit count is known. Writing the units beside every factor prevents a stereo channel count or the eight-bits-per-byte conversion from disappearing.

Revision should pair a converter design with its data-rate consequence. Quantize several values, including a boundary and a value near full scale, decode them, and compare their errors.

Then hold sample rate fixed while changing bit depth, and hold bit depth fixed while changing sample rate. The comparison makes time resolution, amplitude resolution and storage demand three separate axes rather than one vague idea of digital quality.

In this chapter

What this chapter covers

  • 01

    Binary level count

  • 02

    Uniform step size

  • 03

    Interval assignment

  • 04

    Reconstruction value

  • 05

    Quantization error

  • 06

    Raw data rate

Worked example · free

Quantize a voltage

Q [10 marks]. A three-bit converter spans 0 to 4 V with midpoint reconstruction. Quantize 2.7 V. The marks shown are an AskSia study allocation, not the University's published marking scheme.
Bit depth controls vertical resolution.Bit depth controls vertical resolution. The right panel doubles the number of allowed levels across the same range, halving each uniform quantization step.More bits divide the same range into smaller steps2 bits = 4 levels3 bits = 8 levels
Bit depth controls vertical resolution. The right panel doubles the number of allowed levels across the same range, halving each uniform quantization step.
  • 3Find levels and step size.
  • 4Locate the interval and code.
  • 3Calculate reconstruction error.
Three bits give eight levels and a 0.5 V step. The sample lies in 2.5 to 3.0 V, represented by midpoint 2.75 V and index five, binary 101. Error is 0.05 V.
Sia tip — Check that the absolute reconstruction error is no larger than half the uniform step.
Glossary

Key terms

Quantization
Assignment of a sample to one of finitely many levels.
Bit Depth
The number of binary digits used for each quantized sample.
Quantization Level
One allowed representative value in the digital alphabet.
Quantization Error
The absolute difference between an original sample and its reconstruction.
Quantization Noise
The aggregate effect of quantization errors across many samples.
FAQ

Quantization and Digital Precision FAQ

How many levels do N bits provide?

They provide 2 to the power N distinct binary words and therefore that many levels. Each additional bit doubles the level count for the same represented range.

What sets the quantization step?

For a uniform quantizer, divide the represented signal range by the number of levels. A larger range or fewer bits produces a wider step and larger possible rounding error.

Why does greater precision require more data?

Every extra bit is stored for every sample. It doubles the available levels and reduces the step, but increases the raw bit rate by one bit times the sample rate and channel count.

What is the safest quantization check?

Decode the chosen binary word to its representative level and compare that value with the original input. Under midpoint reconstruction, the absolute error should remain within half one quantization step.

Study strategy

Exam move

For each design, write levels, range, step, interval, code, reconstructed value and error on separate lines. Check the half-step bound. Then calculate the raw data rate by multiplying samples per second, bits per sample, duration and channels. Keep bits and bytes distinct until the requested unit is clear. Audit the converter with a round trip.

Begin from range and bit depth, calculate levels and step, and mark the selected interval. Encode it, decode the code to its representative value and calculate error against the original input. Repeat with a neighbouring value to confirm that the code changes at the intended boundary. After the amplitude audit, compute bit rate independently from sample rate, word length and channel count.

Keeping the ledgers separate shows whether a proposed improvement changes time fidelity, amplitude fidelity or only storage demand.

Working through Quantization and Digital Precision in ELEC1010? Sia is AskSia’s AI Electrical Engineering tutor — ask any ELEC1010 Quantization and Digital Precision question and get a clear, step-by-step explanation grounded in how ELEC1010 is taught and assessed. Read this chapter free, then take your hardest questions to Sia.

A+Everything unlocked
Unlocks this Bible + all 13 of your subjects at The Hong Kong University of Science and Technology, plus 1,000+ more Bibles across the AskSia library.
Sia - your ELEC1010 tutor, unlimited, worked the way the exam marks it
The full 3-page Bible + practice bank with worked solutions
Chrome extension - sync your LMS so Sia knows your deadlines
Bilingual EN / Chinese on every Bible and every Sia answer
$0.99 Trial
30-day money-back · cancel in one tap · how it works