{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Chapter 7 Junction field effect transistors"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Ex 7_1 PG-7.13"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "For Vgs =0 V\n",
      "\n",
      " Idss=10 mA \n",
      "\n",
      "\n",
      " For Vgs =-1 V\n",
      "\n",
      " Idss=5.625 mA \n",
      "\n",
      "\n",
      " For Vgs =-4 V\n",
      "\n",
      " Idss=0 A \n",
      "\n"
     ]
    }
   ],
   "source": [
    "from __future__ import division\n",
    "Idss=10e-3#\n",
    "Vgs_off=-4#\n",
    "print\"For Vgs =0 V\"\n",
    "Vgs=0#\n",
    "Id=Idss#\n",
    "print\"\\n Idss=%.0f mA \\n\"%(Id*1e3)\n",
    "print\"\\n For Vgs =-1 V\"\n",
    "Vgs=-1#\n",
    "Id=Idss*(1-Vgs/Vgs_off)**2#\n",
    "print\"\\n Idss=%.3f mA \\n\"%(Id*1e3)\n",
    "print\"\\n For Vgs =-4 V\"\n",
    "Vgs=-4#\n",
    "Id=Idss*(1-Vgs/Vgs_off)**2#\n",
    "print\"\\n Idss=%.0f A \\n\"%(Id)\n",
    "#In the book this example is mention as Example-4_3\n",
    "#but  it is the first example in this chapter so I've taken this as Example-7_1 "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Ex 7_2 PG-7.17"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      " For Yfs_max=4000e-6\n",
      "\n",
      " Change in Id is +/- 0.2 mA \n",
      "\n",
      "\n",
      " Voltage gain is 20 \n",
      "\n",
      " For Yfs_min=1000e-6\n",
      "\n",
      " Change in Id is +/- 0.05 mA \n",
      "\n",
      "\n",
      " Voltage gain is 5 \n",
      "\n"
     ]
    }
   ],
   "source": [
    "Vi=50e-3#input supply\n",
    "Rd=5e3#\n",
    "Yfs_max=4000e-6#\n",
    "Yfs_min=1000e-6#\n",
    "print \" For Yfs_max=4000e-6\"\n",
    "Id_delta=Yfs_max*Vi#\n",
    "print\"\\n Change in Id is +/- %.1f mA \\n\"%(Id_delta*1e3)\n",
    "Vo=Id_delta*Rd##output voltage \n",
    "Av=Vo/Vi##voltge gain\n",
    "print\"\\n Voltage gain is %.0f \\n\"%(Av)\n",
    "print \" For Yfs_min=1000e-6\"\n",
    "Id_delta=Yfs_min*Vi#\n",
    "print\"\\n Change in Id is +/- %.2f mA \\n\"%(Id_delta*1e3)\n",
    "Vo=Id_delta*Rd##output voltage \n",
    "Av=Vo/Vi##voltge gain\n",
    "print\"\\n Voltage gain is %.0f \\n\"%(Av)\n",
    "#In the book this example is mention as Example-7_1\n",
    "#but  it is the second example in this chapter so I've taken this as Example-7_2 "
   ]
  }
 ],
 "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
}
