Complete the code to calculate the maximum number of levels for a given bit depth.
max_levels = 2 [1] bit_depth
The maximum number of levels is 2 raised to the power of the bit depth.
Complete the code to calculate the dynamic range in decibels (dB) from bit depth.
dynamic_range_db = 20 * [1] (2 ** bit_depth)
Dynamic range in dB is calculated as 20 times the base-10 logarithm of the number of levels.
Complete the code to correctly calculate the number of quantization levels.
quant_levels = 2 [1] bit_depth
The number of quantization levels is 2 raised to the bit depth.
Fill both blanks to create a dictionary mapping bit depths to their dynamic ranges in dB.
dynamic_ranges = {bit: 20 * [1] (2 ** bit) for bit in bits if bit [2] 0}The dynamic range is 20 times the log base 10 of the number of levels (2^bit). We only include positive bit depths.
Fill all three blanks to compute a dictionary of bit depths and their max levels, filtering for bit depths greater than 4.
max_levels_dict = {bit: 2 [1] bit for bit in bits if bit [2] 4 and bit [3] 16}The max levels are 2 raised to the bit depth. We filter bits greater than 4 and less than 16.
