summaryrefslogtreecommitdiff
path: root/Electronic_Communication_by_D._Roddy/Chapter11_Pulse_Modulation_1.ipynb
blob: f9a35e7b8e73c4f3ef83664ed32bd77a3e9c8164 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Chapter11 Pulse Modulation"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 11.3.1,Pg.no.392"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The no . of bits per code word is 7.512\n",
      "Rounded off to 8\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "SNR=40.0\n",
    "#a) Determination of no . of bits /code\n",
    "n=(SNR -(10*math.log10(3))-(-10))/(20*math.log10(2))\n",
    "n=round(n,3)\n",
    "print 'The no . of bits per code word is',n\n",
    "print 'Rounded off to 8'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 11.3.2,Pg.no.393"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "a)The transmission BW is 64000.0 Hz\n",
      "b)The quantization S/N ration is 48.0\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "q=1.0\n",
    "W=4*10**3\n",
    "n=8.0\n",
    "#a) Determination of Tx Bandwidth\n",
    "B=(1+q)*W*n\n",
    "print 'a)The transmission BW is',B,'Hz'\n",
    "#b) Determination of quantization S/N ratio\n",
    "SN_dB=6*n\n",
    "print 'b)The quantization S/N ration is',SN_dB"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.10"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}