Analogue and digital signals

AQA 7408 3.13.2.1 Bits and bytes; analogue-to-digital conversion: sampling, voltage levels, quantisation and sample rate; effect of sample rate and number of bits; advantages and disadvantages of digital signals; noise; pulse code modulation; sensors; binary numbers 1 to 10

Key idea

An analogue signal can take any value within a range and changes continuously, like the voltage from a microphone. A digital signal can take only two levels, usually called 0 and 1 (low and high voltage). One binary digit is a bit, and a group of 8 bits is a byte. A word of n bits can represent 2n different values, so 3 bits give 8 levels and 8 bits give 256.

An analogue-to-digital converter (ADC) changes an analogue voltage into a binary number. It samples the voltage at regular intervals (the sampling rate, in samples per second) and quantises each sample, rounding it to the nearest of the available voltage levels. A higher sampling rate follows fast changes better, and more bits per sample give finer levels, so the digital signal is a better copy. Digital signals are less affected by noise because only two levels need to be recognised and the pulses can be regenerated. Sending the samples as a stream of binary words is pulse code modulation (PCM).

Analogue and digital signals compared.

Figure 30. Analogue and digital signals compared.

Read it: The analogue signal varies smoothly through any value. The digital signal has only two levels (low = 0, high = 1), so the pattern of highs and lows carries the information.

From sensor to binary number.

Figure 31. From sensor to binary number.

Read it: A sensor makes an analogue voltage, an amplifier adjusts its size, and the ADC samples and quantises it to give a binary number that a computer can store or process.

Sampling.

Figure 32. Sampling.

Read it: The ADC measures the voltage at regular instants (the red dots). The time between samples is the sampling interval and its reciprocal is the sampling rate.

Quantisation with 3 bits.

Figure 33. Quantisation with 3 bits.

Read it: Eight levels (000 to 111) span 0 to 4.0 V, so each step is 0.5 V. Any voltage within a step is given the same binary number: this rounding is quantisation. The dashed line is the original straight-line signal.

Sampling rate, noise and PCM

Sampling too slowly.

Figure 34. Sampling too slowly.

Read it: A 1.0 kHz signal is sampled at only 1.25 kHz. The red points fit a false, much slower wave (dashed): fast changes have been missed and the signal is wrongly reproduced. This is why a higher sampling rate gives better quality.

Noise on analogue and digital signals.

Figure 35. Noise on analogue and digital signals.

Read it: Noise added to an analogue signal cannot be separated from it. A noisy digital signal is still clearly high or low, so a regenerator can rebuild the original pulses exactly.

Pulse code modulation.

Figure 36. Pulse code modulation.

Read it: Sample, quantise, code as binary words, send the bits, and rebuild the voltage at the receiver with a digital-to-analogue converter.

Binary numbers 1 to 10.

Figure 37. Binary numbers 1 to 10.

Read it: Each place value is double the one on its right: 8, 4, 2, 1. For example 1001 = 8 + 1 = 9.

Equations: levels, step size and data rate

Equations: levels, step size and data rate

Symbol Meaning Unit
N number of voltage levels —
n number of bits per sample —
ΔV quantisation step (smallest voltage difference recorded) V
Vrange range of voltages the ADC accepts V
fs sampling rate Hz (samples s−1)
data rate bits sent per second bit s−1

Typical systems.

Figure 38. Typical systems.

Read it: Telephone speech: 8 kHz × 8 bits = 64 kbit s−1. CD audio: 44.1 kHz × 16 bits × 2 channels = 1.41 Mbit s−1. The third row shows the step size of an 8-bit ADC with a 5 V range.

Worked example: a 10-bit ADC

A 10-bit ADC accepts voltages from 0 to 5.0 V. Calculate the number of levels and the quantisation step. It samples 200 times a second: calculate the data rate.

  • Levels: N = 210 = 1024

  • Step: ΔV = 5.0 / 1024 = 4.9 × 10−3 V = 4.9 mV

  • Data rate: 200 × 10 = 2000 bit s−1 = 2.0 kbit s−1

Worked example: binary numbers

Convert 0111 to decimal and write 10 in 4-bit binary.

  • 0111: Place values 8, 4, 2, 1: 0 + 4 + 2 + 1 = 7

  • 10: 10 = 8 + 2, so the bits are 1 0 1 0: 1010

  • Check: 1010 → 8 + 0 + 2 + 0 = 10

Summary: analogue and digital signals.

Figure 39. Summary: analogue and digital signals.

Read it: Two levels, ADC (sample and quantise), more bits and a higher rate give a better copy, and digital signals can be regenerated.

Practice question Spec 3.13.2.1 · Digitising a signal 7 marks

The graph shows an analogue voltage signal. An ADC samples the signal at the times marked by the vertical lines. The ADC has 3 bits and accepts voltages between 0 and 8.0 V, so it has 8 levels, each 1.0 V wide, coded 000 (0 to 1 V) up to 111 (7 to 8 V).

Diagram for the practice question: Spec 3.13.2.1 · Digitising a signal

(a) Calculate the sampling rate. [1 mark]

(b) Show that the quantisation step of the ADC is 1.0 V. [2 marks]

(c) The sample at 1.0 ms is 5.4 V. State the binary number that is produced. [2 marks]

(d) A telephone system samples speech 8000 times per second using 8 bits per sample. Calculate the data rate. [1 mark]

(e) State the effect on the quality of the digitised signal of using more bits per sample. [1 mark]

Show Mark SchemeHide Mark Scheme
Part Answer Extra information (allow / ignore) Marks
(a) sampling interval 0.5 ms, so f = 1 / 0.5 × 10−3 = 2.0 × 103 Hz (2.0 kHz) unit required 1
(b) number of levels N = 23 = 8 1
step = 8.0 / 8 = 1.0 V 1
(c) 5.4 V lies in the level 5 V to 6 V, which is level 5 allow ‘it is rounded to 5 V’ 1
binary 101 allow 101 only if the answer 5 is shown 1
(d) 8000 × 8 = 64 000 bit s−1 (64 kbit s−1) 1
(e) the quality is better (finer voltage steps give a closer copy of the signal) allow ‘less quantisation error’ 1

Examiner’s note

Why the marks: In (b) show the number of levels from 23 before dividing. In (c) find the band the sample falls in, then convert the level number to binary: 5 = 4 + 1 = 101.

Key words: sampling rate, 1 / interval, 2n levels, quantisation step, binary, bits per sample.

Where marks go: (a) 1. (b) levels 1, step 1. (c) level 1, binary 1. (d) 1. (e) 1.

Practice question Spec 3.13.2.1 · Noise on a digital signal 7 marks

A digital signal is sent along a long cable. The diagram shows the signal as sent, and as received after noise has been added. The dashed line is a decision level halfway between the two logic levels.

Diagram for the practice question: Spec 3.13.2.1 · Noise on a digital signal

(a) State two advantages of sending information as a digital signal instead of an analogue signal. [2 marks]

(b) Explain how the received signal can be restored to its original form. [2 marks]

(c) State one disadvantage of digital transmission. [1 mark]

(d) Convert the binary number 1001 to a decimal number. [1 mark]

(e) Write the decimal number 6 as a 4-bit binary number. [1 mark]

Show Mark SchemeHide Mark Scheme
Part Answer Extra information (allow / ignore) Marks
(a)

noise can be removed (regenerated)

better quality or no loss of quality when copied or sent long distances

allow ‘can be processed by computers’; ‘many signals can share a line’; ‘can be stored easily’ 2
(b) compare the voltage with the decision level at each pulse (a regenerator) allow ‘a comparator’ 1
output a clean high if above the level and a clean low if below, which rebuilds the original pulses 1
(c) needs more bandwidth, or needs an ADC and DAC, or quantisation errors allow ‘information is lost in sampling’ 1
(d) 8 + 1 = 9 answer only, 1 mark 1
(e) 0110 allow 110 1

Examiner’s note

Why the marks: In (a) give two different advantages, one mark each. In (b) say how the decision is made and what the output is.

Key words: regenerated, decision level, comparator, bandwidth, ADC, binary place values 8, 4, 2, 1.

Where marks go: (a) 1 each, 2 max. (b) compare 1, clean output 1. (c) 1. (d) 1. (e) 1.

Quick-fire

Topic Question Model answer
Analogue What is an analogue signal? A signal that can take any value in a range.
Digital What is a digital signal? A signal with only two levels, 0 and 1.
Byte How many bits in a byte? Eight.
Levels How many levels has an n-bit ADC? 2n.
Sampling What is the sampling rate? The number of samples taken per second.
Quality How can quality be improved? Raise the sampling rate and use more bits per sample.
Noise Why is a digital signal less affected by noise? It can be regenerated: only two levels need to be recognised.
PCM What is pulse code modulation? Sending quantised samples as a stream of binary words.