Bird
Raised Fist0
Signal Processingdata~20 mins

ADC and DAC in signal chain in Signal Processing - Practice Problems & Coding Challenges

Choose your learning style10 modes available
Challenge - 5 Problems
🎖️
Signal Chain Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding ADC Sampling Rate Impact

What happens if the sampling rate of an Analog-to-Digital Converter (ADC) is set below the Nyquist rate for a given analog signal?

AThe ADC will automatically increase the sampling rate to avoid errors.
BThe digital signal will have aliasing, causing distortion and incorrect frequency representation.
CThe digital signal will perfectly represent the analog signal without distortion.
DThe analog signal will be amplified before conversion to compensate.
Attempts:
2 left
💡 Hint

Think about what happens when you sample too slowly compared to the signal frequency.

❓ Predict Output
intermediate
1:30remaining
Output of Quantization Levels in ADC

Given a 3-bit ADC, what is the number of discrete quantization levels it can represent?

Signal Processing
bits = 3
levels = 2 ** bits
print(levels)
A8
B3
C16
D6
Attempts:
2 left
💡 Hint

Number of levels equals 2 raised to the number of bits.

❓ data_output
advanced
2:00remaining
Effect of DAC Resolution on Output Voltage

Consider a 4-bit DAC with a reference voltage of 5V. What is the output voltage for a digital input value of 9?

Signal Processing
bits = 4
max_value = 2 ** bits - 1
ref_voltage = 5.0
input_value = 9
output_voltage = (input_value / max_value) * ref_voltage
print(round(output_voltage, 2))
A4.50 V
B2.25 V
C3.00 V
D3.13 V
Attempts:
2 left
💡 Hint

Calculate output voltage as (input / max) * reference voltage.

🔧 Debug
advanced
2:30remaining
Identify the Error in ADC Sampling Code

What error will the following Python code produce?

import numpy as np
sampling_rate = 8000
signal_freq = 10000
t = np.arange(0, 1, 1/sampling_rate)
signal = np.sin(2 * np.pi * signal_freq * t)
print(signal[:5])
AThe signal will be aliased because signal frequency exceeds sampling rate.
BValueError due to invalid frequency input.
CNo error; prints first 5 samples of the signal.
DTypeError because np.arange arguments are incorrect.
Attempts:
2 left
💡 Hint

Check the relationship between signal frequency and sampling rate.

🚀 Application
expert
3:00remaining
Choosing ADC and DAC Parameters for Audio Signal Chain

You are designing an audio signal chain for human voice (20 Hz to 20 kHz). Which combination of ADC and DAC parameters ensures high fidelity without aliasing or quantization noise?

ASampling rate: 20 kHz, ADC resolution: 8-bit, DAC resolution: 8-bit
BSampling rate: 30 kHz, ADC resolution: 12-bit, DAC resolution: 12-bit
CSampling rate: 15 kHz, ADC resolution: 24-bit, DAC resolution: 24-bit
DSampling rate: 44.1 kHz, ADC resolution: 16-bit, DAC resolution: 16-bit
Attempts:
2 left
💡 Hint

Consider Nyquist rate and typical audio bit depth for quality.

Practice

(1/5)
1. What is the main role of an ADC (Analog-to-Digital Converter) in a signal chain?
easy
A. Store digital data in memory
B. Convert digital data into analog signals
C. Amplify the analog signal before processing
D. Convert real-world analog signals into digital data

Solution

  1. Step 1: Understand ADC function

    An ADC takes continuous analog signals from the real world and changes them into digital numbers that computers can use.
  2. Step 2: Compare options to ADC role

    Only Convert real-world analog signals into digital data describes converting analog signals to digital data, which matches the ADC's main role.
  3. Final Answer:

    Convert real-world analog signals into digital data -> Option D
  4. Quick Check:

    ADC = Analog to Digital conversion [OK]
Hint: ADC always converts analog signals to digital data [OK]
Common Mistakes:
  • Confusing ADC with DAC
  • Thinking ADC amplifies signals
  • Assuming ADC stores data
2. Which of the following is the correct symbol for a DAC (Digital-to-Analog Converter) in a signal chain diagram?
easy
A. A triangle pointing right with 'DAC' label
B. A triangle pointing left with 'DAC' label
C. A triangle pointing right with 'ADC' label
D. A square with 'DAC' label

Solution

  1. Step 1: Recall DAC symbol conventions

    In signal diagrams, DAC is usually shown as a triangle pointing right with the label 'DAC'.
  2. Step 2: Match options to DAC symbol

    A triangle pointing right with 'DAC' label matches this description exactly, while others either have wrong direction or label.
  3. Final Answer:

    A triangle pointing right with 'DAC' label -> Option A
  4. Quick Check:

    DAC symbol = triangle right + 'DAC' label [OK]
Hint: DAC symbol is a right-pointing triangle labeled 'DAC' [OK]
Common Mistakes:
  • Confusing ADC and DAC symbols
  • Choosing left-pointing triangle for DAC
  • Selecting a square shape
3. Consider this Python code simulating a simple ADC conversion of an analog signal sampled at 3 points:
analog_signal = [0.1, 0.5, 0.9]
bit_depth = 2
max_level = 2**bit_depth - 1
adc_output = [int(x * max_level) for x in analog_signal]
print(adc_output)
What is the output printed?
medium
A. [0, 1, 2]
B. [0, 2, 3]
C. [0, 2, 4]
D. [1, 2, 3]

Solution

  1. Step 1: Calculate max_level from bit_depth

    bit_depth is 2, so max_level = 2^2 - 1 = 3.
  2. Step 2: Multiply each analog value by max_level and convert to int

    0.1*3=0.3 -> int=0, 0.5*3=1.5 -> int=1, 0.9*3=2.7 -> int=2.
  3. Final Answer:

    [0, 1, 2] -> Option A
  4. Quick Check:

    2-bit ADC max level 3, scaled values int = [0,1,2] [OK]
Hint: Multiply analog value by max level, then floor to int [OK]
Common Mistakes:
  • Confusing max_level calculation
  • Rounding instead of flooring
  • Misreading bit depth
4. The following code attempts to simulate a DAC converting digital values back to analog signals:
digital_values = [0, 1, 2, 3]
bit_depth = 2
max_level = 2**bit_depth - 1
analog_output = [x / max_level for x in digital_values]
print(analog_output)
However, the output is incorrect for a 3-bit DAC. What is the error?
medium
A. digital_values list is missing values
B. Division should be multiplied by max_level
C. bit_depth should be 3, not 2
D. max_level calculation is wrong

Solution

  1. Step 1: Identify bit_depth mismatch

    The code uses bit_depth=2 but digital_values go up to 3, which fits 2 bits. For 3-bit DAC, bit_depth should be 3.
  2. Step 2: Understand impact on max_level and output

    With bit_depth=3, max_level=7, so dividing digital values by 7 scales correctly. Using 3 causes wrong scaling.
  3. Final Answer:

    bit_depth should be 3, not 2 -> Option C
  4. Quick Check:

    bit_depth must match DAC bits [OK]
Hint: Match bit_depth to DAC bits for correct scaling [OK]
Common Mistakes:
  • Changing division to multiplication
  • Ignoring bit_depth mismatch
  • Assuming digital_values are wrong
5. You have a sensor outputting analog signals between 0 and 5 volts. You want to digitize this signal using a 4-bit ADC and then reconstruct it with a DAC. What is the smallest voltage step (resolution) that the ADC can detect?
medium
A. 5 volts divided by (2^4 - 1) = 0.357 volts
B. 5 volts divided by 2^4 = 0.3125 volts
C. 5 volts divided by (2^4 + 1) = 0.3125 volts
D. 5 volts divided by 2^4 - 1 = 0.3125 volts

Solution

  1. Step 1: Recall the standard resolution formula for an ADC

    The voltage resolution (LSB size) is the full-scale voltage divided by 2^n: V_fs / 2^n, where n is the number of bits.
  2. Step 2: Apply the formula

    Here, V_fs = 5 V, n = 4, so resolution = 5 / 2^4 = 5 / 16 = 0.3125 volts.
  3. Step 3: Match to options

    5 volts divided by 2^4 = 0.3125 volts exactly matches this formula and value. 5 volts divided by (2^4 - 1) = 0.357 volts incorrectly uses (2^4 - 1) and has a miscalculation (5/15 ≈ 0.333, not 0.357).
  4. Final Answer:

    5 volts divided by 2^4 = 0.3125 volts -> Option B
  5. Quick Check:

    Resolution = V_fs / 2^n [OK]
Hint: Resolution = voltage range / 2^bits [OK]
Common Mistakes:
  • Dividing by (2^bits - 1) instead of 2^bits
  • Miscalculating numerical values like 5/15 ≈ 0.333 as 0.357
  • Ambiguous formula parsing in options
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard