{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Chapter - 8 : BIPOLAR JUNCTION TRANSISTORS"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Ex 8.1 Pg 161"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Ib=0.20 mA\n"
     ]
    }
   ],
   "source": [
    "from __future__ import division\n",
    "\n",
    "#e.g 8.1\n",
    "Ie=10*10**-3#\n",
    "Ic=9.8*10**-3#\n",
    "#Ie=Ib+Ic\n",
    "Ib=Ie-Ic#\n",
    "print \"Ib=%0.2f\"%(Ib*10**3),'mA'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Ex 8.2 Pg 161"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "a=0.9873\n"
     ]
    }
   ],
   "source": [
    "from __future__ import division\n",
    "\n",
    "Ie=6.28*10**-3#\n",
    "Ic=6.20*10**-3#\n",
    "a=Ic/Ie#\n",
    "print \"a=%0.4f\"%a"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Ex 8.3 Pg 161"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Ic=9.67 mA\n",
      "Ib=0.33 mA\n"
     ]
    }
   ],
   "source": [
    "from __future__ import division\n",
    "\n",
    "#e.g8.3\n",
    "a=0.967#\n",
    "Ie=10*10**-3#\n",
    "Ic=Ie*a##a=Ic/Ie\n",
    "print \"Ic=%0.2f\"%(Ic*10**3),\"mA\"\n",
    "Ib=Ie-Ic#\n",
    "print \"Ib=%0.2f\"%(Ib*10**3),\"mA\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Ex 8.4 Pg 162"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Ic=9.87 mA\n",
      "Ib=0.13 mA\n"
     ]
    }
   ],
   "source": [
    "from __future__ import division\n",
    "\n",
    "Ie=10*10**-3#\n",
    "alpha=0.987#\n",
    "Ic=Ie*alpha##alpha=Ic/Ie\n",
    "print \"Ic=%0.2f\"%(Ic*10**3),\"mA\"\n",
    "Ib=Ie-Ic#\n",
    "print \"Ib=%0.2f\"%(Ib*10**3),\"mA\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Ex 8.5 Pg 163"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "beta= 39.0\n",
      "alpha= 0.975\n"
     ]
    }
   ],
   "source": [
    "from __future__ import division\n",
    "\n",
    "alpha=0.975#\n",
    "beta=200#\n",
    "beta=(alpha/(1-alpha))#\n",
    "print \"beta=\",beta\n",
    "alpha=(beta/(1+beta))#\n",
    "print \"alpha=\",alpha"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Ex 8.6 Pg 163"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "IE=40.40 mA\n"
     ]
    }
   ],
   "source": [
    "from __future__ import division\n",
    "\n",
    "BETA=100#\n",
    "IC=40*10**-3#\n",
    "IB=IC/BETA#\n",
    "IE=IC+IB#\n",
    "print \"IE=%0.2f\"%(IE*10**3),\"mA\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Ex 8.7 Pg 164"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Ic=9.93 mA\n",
      "Ib=0.07 mA\n"
     ]
    }
   ],
   "source": [
    "from __future__ import division\n",
    "beta=150#\n",
    "Ie=10*10**-3#\n",
    "alpha=beta/(1+beta)\n",
    "Ic=alpha*Ie##as alpha=(Ic/Ie)\n",
    "print \"Ic=%0.2f\"%(Ic*10**3),\"mA\"\n",
    "Ib=Ie-Ic##as  Ie=Ib+Ic\n",
    "print \"Ib=%0.2f\"%(Ib*10**3),\"mA\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Ex 8.8 Pg 164"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Ic=80.00 mA\n",
      "Ie=80.47 mA\n"
     ]
    }
   ],
   "source": [
    "from __future__ import division\n",
    "beta=170#\n",
    "Ic=80*10**-3#\n",
    "Ib=Ic/beta##beta=(Ic/Ib)\n",
    "print \"Ic=%0.2f\"%(Ic*10**3),\"mA\"\n",
    "Ie=Ic+Ib#\n",
    "print \"Ie=%0.2f\"%(Ie*10**3),\"mA\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Ex 8.9 Pg 165"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Ic=25.00 mA\n",
      "Ie=25.12 mA\n"
     ]
    }
   ],
   "source": [
    "from __future__ import division\n",
    "Ib=125*10**-6#\n",
    "beta=200#\n",
    "Ic=beta*Ib#\n",
    "print \"Ic=%0.2f\"%(Ic*10**3),\"mA\"\n",
    "Ie=Ic+Ib#\n",
    "print \"Ie=%0.2f\"%(Ie*10**3),\"mA\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Ex 8.10 Pg 165"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Ib=0.09 mA\n",
      "Ic=11.91 mA\n"
     ]
    }
   ],
   "source": [
    "from __future__ import division\n",
    "Ie=12*10**-3#\n",
    "beta=140#\n",
    "Ib=Ie/(1+beta)#\n",
    "print \"Ib=%0.2f\"%(Ib*10**3),\"mA\"\n",
    "Ic=Ie-Ib##as  Ie=Ib+Ic\n",
    "print \"Ic=%0.2f\"%(Ic*10**3),\"mA\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Ex 8.11 Pg 165"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "BETA= 19.5238095238\n",
      "ALPHA= 0.951276102088\n",
      "IE=2.15 mA\n",
      "BETAn= 20.4545454545\n"
     ]
    }
   ],
   "source": [
    "from __future__ import division\n",
    "\n",
    "IB=105*10**-6#\n",
    "IC=2.05*10**-3#\n",
    "BETA=IC/IB#\n",
    "print \"BETA=\",BETA\n",
    "ALPHA=BETA/(1+BETA)#\n",
    "print \"ALPHA=\",ALPHA\n",
    "IE=IC+IB#\n",
    "print \"IE=%0.2f\"%(IE*10**3),\"mA\"\n",
    "DELTA_IB=27*10**-6#\n",
    "DELTA_IC=0.65*10**-3#\n",
    "IBn=IB+DELTA_IB#\n",
    "ICn=IC+DELTA_IC#\n",
    "BETAn=ICn/IBn#\n",
    "print \"BETAn=\",BETAn"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Ex 8.12 Pg 166"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Ic=5.15 mA\n",
      "Ie=5.25 mA\n"
     ]
    }
   ],
   "source": [
    "from __future__ import division\n",
    "\n",
    "#e.g 8.12\n",
    "alpha=0.98#\n",
    "Ico=5*10**-6#\n",
    "Ib=100*10**-6#\n",
    "Ic=((alpha*Ib)/(1-alpha))+(Ico/(1-alpha))#\n",
    "print \"Ic=%0.2f\"%(Ic*10**3),\"mA\"\n",
    "Ie=Ic+Ib#\n",
    "print \"Ie=%0.2f\"%(Ie*10**3),\"mA\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Ex 8.13 Pg 166"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Ic=13.01 mA\n",
      "Icbo50=49.25 microA\n",
      "Ic=15.01 mA\n"
     ]
    }
   ],
   "source": [
    "from __future__ import division\n",
    "Icbo=10*10**-6#\n",
    "beta=50#\n",
    "#Value of collector current when Ib=0.25*10**-3#\n",
    "Ib=0.25*10**-3#\n",
    "Ic=(beta*Ib)+(1+beta)*Icbo#\n",
    "print \"Ic=%0.2f\"%(Ic*10**3),\"mA\"\n",
    "#Value of new collector current if temperature rises to 50 degree\n",
    "t1=27#\n",
    "t2=50#\n",
    "Icbo50=Icbo*2**((t2-t1)/10)#\n",
    "print \"Icbo50=%0.2f\"%(Icbo50*10**6),\"microA\"\n",
    "#collector current at 50 degree\n",
    "Ic=beta*Ib+(1+beta)*Icbo50#\n",
    "print \"Ic=%0.2f\"%(Ic*10**3),\"mA\""
   ]
  }
 ],
 "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.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
