{
 "metadata": {
  "name": "",
  "signature": "sha256:69bad2cc1b97411ab194c6989d24ce9e98f48b912e29dd4ff77d5d659094fdfe"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter8-Operational Amplifiers"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex1-pg158"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "##Ex:8.1\n",
      "import math\n",
      "V_out=2.;\n",
      "V_in=400.*10**-6;\n",
      "A_v=V_out/V_in;\n",
      "A_v_dB=math.ceil (20.*(math.log (A_v)/math.log (10.)));\n",
      "print'%s %.2f %s'%(\"open loop voltage gain = \",A_v_dB,\" dB\"); \n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "open loop voltage gain =  74.00  dB\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex2-pg159"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "##Ex:8.2\n",
      "import math\n",
      "V_in=5.*10**-3;\n",
      "R_in=2.*10**6;\n",
      "I_in=V_in/R_in;\n",
      "print'%s %.2e %s'%(\"Input current = \",I_in,\" A\"); \n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Input current =  2.50e-09  A\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex3-pg160"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "##Ex:8.3\n",
      "import math\n",
      "V_out=10.;\n",
      "t=4.;\n",
      "SR=V_out/t;\n",
      "print'%s %.2f %s'%(\"Slew rate = \",SR,\" V/us\"); \n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Slew rate =  2.50  V/us\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex4-pg160"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "##Ex:8.4\n",
      "import math\n",
      "V_out=2.;\n",
      "SR=15.;##in V/us\n",
      "t=V_out/SR;\n",
      "print'%s %.2f %s'%(\"Time taken = \",t,\" us\"); \n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Time taken =  0.13  us\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex6-pg164"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "##Ex:8.6\n",
      "import math\n",
      "R_in=10000.;\n",
      "f1=250.;\n",
      "f2=15000.;\n",
      "C_in=0.159/(f1*R_in);\n",
      "C_f=0.159/(f2*R_in);\n",
      "print'%s %.2e %s'%(\"C_f = \",C_f,\" F\"); \n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "C_f =  1.06e-09  F\n"
       ]
      }
     ],
     "prompt_number": 5
    }
   ],
   "metadata": {}
  }
 ]
}