{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 04 : Bipolar junction transistors"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.1, Page No 153"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#initialisation of variables\n",
      "Adc=.98\n",
      "Ib=100*10**-6\n",
      "\n",
      "#Calculations\n",
      "Ic=(Adc*Ib)/(1-Adc)\n",
      "print(\"value of Ic is %3.3fA \" %Ic)\n",
      "Ie=Ic/Adc\n",
      "\n",
      "#Results\n",
      "print(\" value of Ie is %3.3fA \" %Ie)\n",
      "Bdc=Adc/(1-Adc)\n",
      "print(\"The value of Bdc = %.2f \" %Bdc) "
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "value of Ic is 0.005A \n",
        " value of Ie is 0.005A \n",
        "The value of Bdc = 49.00 \n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.2, Page No 153"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#initialisation of variables\n",
      "Ic=1.0*10**-3\n",
      "Ib=25.0*10**-6\n",
      "\n",
      "#Calculations\n",
      "Bdc=Ic/Ib\n",
      "Ie=Ic+Ib\n",
      "Adc=Ic/Ie\n",
      "Ic=5\n",
      "Ib=Ic/Bdc\n",
      "\n",
      "print(\"The new base current = %.2f mA\" %(Ib*10**3)) "
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The new base current = 125.00 mA\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.3 Page No 157"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#initialisation of variables\n",
      "\n",
      "Bdc=80.0\n",
      "Bac=Bdc\n",
      "Vcc=18.0\n",
      "R1=10.0*10**3\n",
      "\n",
      "#Calculations\n",
      "Ib=15.0*10**-6#for Vb=.7\n",
      "Ic=Bdc*Ib\n",
      "Vc=Vcc-(Ic*R1)\n",
      "\n",
      "#Results\n",
      "print(\"dc collector voltage is %dV \" %Vc)\n",
      "print(\" when vi=50mV\")\n",
      "Ib=3.0*10**-6\n",
      "Vi=50.0*10**-3\n",
      "Ic=Bdc*Ib\n",
      "Vo=Ic*R1\n",
      "Av=Vo/Vi\n",
      "\n",
      "#Results\n",
      "print(\"Current voltage is %.1f V \" %(Av))"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "dc collector voltage is 6V \n",
        " when vi=50mV\n",
        "Current voltage is 48.0 V \n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.4, Page No 160"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#initialisation of variables\n",
      "Vcc=5.0\n",
      "Vce=.2\n",
      "R2=4.7*10**3\n",
      "Vi=2\n",
      "Vbe=.7\n",
      "\n",
      "#Calculations\n",
      "R1=12.0*10**3\n",
      "Ic=(Vcc-Vce)/R2\n",
      "Ib=(Vi-Vbe)/R1\n",
      "hFE=Ic/Ib\n",
      "\n",
      "#Results\n",
      "print(\"Transistor current gain is %.2f V \" %(hFE))\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Transistor current gain is 9.43 V \n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4.6 Page No 169"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#initialisation of variables\n",
      "Vbe=.7\n",
      "Vce=-6\n",
      "\n",
      "#Calculations\n",
      "Ib=20.0*10**-6\n",
      "Ic=2.5*10**-3#from output characteristics\n",
      "Bdc=Ic/Ib\n",
      "\n",
      "#Results\n",
      "print(\"The value of Bdc is %.1f V \" %Bdc)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The value of Bdc is 125.0 V \n"
       ]
      }
     ],
     "prompt_number": 5
    }
   ],
   "metadata": {}
  }
 ]
}