In [3]:

```
#Given
t = 71.4*10**-6
#calculation
f = 1/t
fourth_harmonic = f*4
min_sampling = 2*fourth_harmonic
#Result
print"(a) The frequency of the signal is ",round(f/10**3,1),"KHz"
print"(b) The fourth harmonic is ",round(fourth_harmonic/10**3,0),"KHz"
print"(c) Minimum sampling rate is ",round(min_sampling/10**3,0),"KHz"
```

In [5]:

```
#Given
N = 14
discrete_levels = 2.0**N
#Calculation
num_vltg_inc =2**N-1
resolution = 12/discrete_levels
#Result
print"(a) The numbedr of discrete levels that are represented using N number of bits are ",discrete_levels
print"(b) the number odf voltage increments required to divide the voltage range are ",num_vltg_inc
print"(c) Resolution of the digitization ",round(resolution*10**6,2),"microvolt"
```

In [7]:

```
#Given
N =12
SINAD1=78
#Calculation
SINAD2 = 6.02*N + 1.76
ENOB =(SINAD1 -1.76)/6.02
#Result
print"(a) The SINAD for 12 bit convertre is ",SINAD2,"db"
print"(b) The ENOB for the converter with SINAD of 78 dB is ",round(ENOB,2),"bits"
```

In [9]:

```
#Gievn
Vm = 1.0
Vin = 0.25
mu =255
#Calculation
import math
Vout = (Vm*log(1+mu*(Vin/Vm)))/log(1+mu)
gain =Vout/Vin
#Result
print"The output voltage of the compander ",round(Vout,2),"volt"
print"Gain of the compander is ",round(gain,0)
```

In [14]:

```
#Given
Vin = 0.8
Vm =1.0
mu =255
#Calculation
import math
Vout = (Vm*math.log(1+mu*(Vin/Vm)))/math.log(1+mu)
gain =Vout/Vin
#Result
print"The output voltage of the compander ",round(Vout,1),"volt"
print"Gain of the compander is ",round(gain,1)
```