Which statement best describes the difference between analog and digital signals?
Think about how the signal values change over time.
Analog signals vary smoothly over time with continuous values. Digital signals represent data as discrete steps, often using binary numbers.
Given a simple analog signal represented by a sine wave, what is the output of the sampling code below?
import numpy as np import matplotlib.pyplot as plt # Analog signal: sine wave x = np.linspace(0, 2 * np.pi, 1000) analog_signal = np.sin(x) # Sampling at 10 points sample_points = np.linspace(0, 2 * np.pi, 10) sampled_signal = np.sin(sample_points) print(sampled_signal)
Check the sine values at equally spaced points between 0 and 2π.
The sampled signal contains sine values at 10 equally spaced points, matching option D's values.
What is the number of unique values (levels) produced by quantizing an analog signal into 3 bits?
Recall that the number of levels is 2 raised to the number of bits.
With 3 bits, the number of quantization levels is 2^3 = 8.
Which plot correctly shows an analog sine wave and its digital sampled version?
import numpy as np import matplotlib.pyplot as plt x = np.linspace(0, 2 * np.pi, 1000) analog = np.sin(x) sample_x = np.linspace(0, 2 * np.pi, 20) digital = np.sin(sample_x) plt.figure(figsize=(8,4)) plt.plot(x, analog, label='Analog Signal') plt.stem(sample_x, digital, linefmt='r-', markerfmt='ro', basefmt='k-', label='Digital Samples') plt.legend() plt.show()
Look for a smooth curve representing analog and discrete points for digital.
The analog signal is continuous and smooth, while the digital samples are discrete points shown with stems.
You have an analog signal with a maximum frequency of 5 kHz. According to the Nyquist theorem, what is the minimum sampling rate required to reconstruct the signal without loss?
The Nyquist theorem states the sampling rate must be at least twice the highest frequency.
The minimum sampling rate is twice the maximum frequency, so 2 * 5 kHz = 10 kHz.
