Which of the following best explains why digitization enables computational processing?
Think about how computers handle data internally.
Computers work with numbers, not continuous signals. Digitization turns signals into numbers, enabling storage and calculations.
What is the output of this Python code that simulates digitizing a simple signal?
import numpy as np signal = np.array([0.1, 0.5, 0.9, 1.2, 1.8]) digitized = np.round(signal * 10).astype(int) print(digitized.tolist())
Look at how the signal values are scaled and rounded.
The signal is multiplied by 10, then rounded to nearest integer, converting continuous values to discrete integers.
Given a continuous signal array, what is the resulting data after digitization and quantization steps?
import numpy as np signal = np.array([0.15, 0.45, 0.75, 1.05, 1.35]) quantization_levels = 4 max_val = signal.max() quantized = np.minimum(np.floor(signal / max_val * quantization_levels), quantization_levels - 1).astype(int) print(quantized.tolist())
Quantization maps values into discrete levels from 0 to quantization_levels - 1.
Values are scaled relative to max, multiplied by levels, then floored to integers. The last value maps to level 3, not 4.
Which plot correctly shows the digitized version of a sine wave sampled at 10 points?
import numpy as np import matplotlib.pyplot as plt x = np.linspace(0, 2*np.pi, 100) signal = np.sin(x) sampled_x = np.linspace(0, 2*np.pi, 10) sampled_signal = np.sin(sampled_x) digitized_signal = np.round(sampled_signal * 10) / 10 plt.plot(x, signal, label='Original Signal') plt.stem(sampled_x, digitized_signal, linefmt='r-', markerfmt='ro', basefmt='k-', label='Digitized Samples') plt.legend() plt.show()
Digitization rounds sampled points and shows them as discrete dots.
The original sine wave is smooth. Digitized samples are fewer points rounded to nearest 0.1, shown as red dots.
What error does this code produce when digitizing a signal?
import numpy as np signal = np.array([0.2, 0.4, 0.6, 0.8]) digitized = np.round(signal * 10).astype(float) print(digitized)
Check if astype(float) is valid after rounding integers.
Rounding produces floats, converting to float again is valid. Output is array of floats [2. 4. 6. 8.]
