summaryrefslogtreecommitdiff
path: root/A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu
diff options
context:
space:
mode:
authorPrashant S2020-04-14 10:25:32 +0530
committerGitHub2020-04-14 10:25:32 +0530
commit06b09e7d29d252fb2f5a056eeb8bd1264ff6a333 (patch)
tree2b1df110e24ff0174830d7f825f43ff1c134d1af /A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu
parentabb52650288b08a680335531742a7126ad0fb846 (diff)
parent476705d693c7122d34f9b049fa79b935405c9b49 (diff)
downloadall-scilab-tbc-books-ipynb-master.tar.gz
all-scilab-tbc-books-ipynb-master.tar.bz2
all-scilab-tbc-books-ipynb-master.zip
Merge pull request #1 from prashantsinalkar/masterHEADmaster
Initial commit
Diffstat (limited to 'A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu')
-rw-r--r--A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu/11-Architectural_Acoustics.ipynb133
-rw-r--r--A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu/12-Ultrasonics.ipynb127
-rw-r--r--A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu/13-Atomic_Physics.ipynb340
-rw-r--r--A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu/14-Lasers.ipynb190
-rw-r--r--A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu/15-Atomic_nucleus_and_nuclear_energy.ipynb546
-rw-r--r--A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu/16-Structure_of_Solids.ipynb163
-rw-r--r--A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu/17-The_Band_Theory_of_Solids.ipynb122
-rw-r--r--A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu/18-Semiconductors.ipynb264
-rw-r--r--A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu/19-PN_Junction_Diode.ipynb95
-rw-r--r--A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu/21-Magnetic_Materials.ipynb130
-rw-r--r--A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu/22-Superconductivity.ipynb125
-rw-r--r--A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu/23-Dielectrics.ipynb254
-rw-r--r--A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu/24-Fibre_optics.ipynb258
-rw-r--r--A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu/25-Digital_electronics.ipynb1599
-rw-r--r--A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu/4-Electron_Ballistics.ipynb256
-rw-r--r--A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu/5-Electron_Optics.ipynb129
-rw-r--r--A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu/6-Properties_of_Light.ipynb87
-rw-r--r--A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu/7-Interference_and_Diffraction.ipynb151
-rw-r--r--A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu/8-Polarization.ipynb94
19 files changed, 5063 insertions, 0 deletions
diff --git a/A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu/11-Architectural_Acoustics.ipynb b/A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu/11-Architectural_Acoustics.ipynb
new file mode 100644
index 0000000..cc813a0
--- /dev/null
+++ b/A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu/11-Architectural_Acoustics.ipynb
@@ -0,0 +1,133 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 11: Architectural Acoustics"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.1: calculation_of_total_absorption_and_average_absorption_coefficient.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 11.1\n",
+"//calculation of total absorption and average absorption coefficient\n",
+"\n",
+"//given values\n",
+"\n",
+"V=20*15*5;//volume of hall in m^3\n",
+"t=3.5;//reverberation time of empty hall in sec\n",
+"\n",
+"\n",
+"//calculation\n",
+"a1=.161*V/t;//total absorption of empty hall\n",
+"k=a1/(2*(20*15+15*5+20*5));\n",
+"disp(k,'the average absorption coefficient is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.2: calculation_of_average_absorption_coefficient.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 11.2\n",
+"//calculation of average absorption coefficient\n",
+"\n",
+"//given values\n",
+"\n",
+"V=10*8*6;//volume of hall in m^3\n",
+"t=1.5;//reverberation time of empty hall in sec\n",
+"A=20;//area of curtain cloth in m^2\n",
+"t1=1;//new reverberation time in sec\n",
+"\n",
+"//calculation\n",
+"a1=.161*V/t;//total absorption of empty hall\n",
+"a2=.161*V/t1;//total absorption after a curtain cloth is suspended\n",
+"\n",
+"k=(a2-a1)/(2*20);\n",
+"disp(k,'the average absorption coefficient is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.3: calculation_of_average_absorption_coefficient_and_area.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 11.3\n",
+"//calculation of average absorption coefficient and area\n",
+"\n",
+"//given values\n",
+"\n",
+"V=20*15*10;//volume of hall in m^3\n",
+"t=3.5;//reverberation time of empty hall in sec\n",
+"t1=2.5;//reduced reverberation time \n",
+"k2=.5;//absorption coefficient of curtain cloth\n",
+"//calculation\n",
+"a1=.161*V/t;//total absorption of empty hall\n",
+"k1=a1/(2*(20*15+15*10+20*10));\n",
+"disp(k1,'the average absorption coefficient is');\n",
+"a2=.161*V/t1;//total absorption when wall is covered with curtain\n",
+"a=t1*(a2-a1)/(t1*k2);\n",
+"disp(a,'area of wall to be covered with curtain(in m^2)is:')"
+ ]
+ }
+],
+"metadata": {
+ "kernelspec": {
+ "display_name": "Scilab",
+ "language": "scilab",
+ "name": "scilab"
+ },
+ "language_info": {
+ "file_extension": ".sce",
+ "help_links": [
+ {
+ "text": "MetaKernel Magics",
+ "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
+ }
+ ],
+ "mimetype": "text/x-octave",
+ "name": "scilab",
+ "version": "0.7.1"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu/12-Ultrasonics.ipynb b/A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu/12-Ultrasonics.ipynb
new file mode 100644
index 0000000..59734aa
--- /dev/null
+++ b/A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu/12-Ultrasonics.ipynb
@@ -0,0 +1,127 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 12: Ultrasonics"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.1: calculation_of_natural_frequency.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 12.1\n",
+"//calculation of natural frequency,magnetostriction\n",
+"\n",
+"//given values\n",
+"\n",
+"l=40*10^-3;//length of pure iron rod\n",
+"d=7.25*10^3;//density of iron in kg/m^3\n",
+"Y=115*10^9;//Young's modulus in N/m^2 \n",
+"\n",
+"//calculation\n",
+"f=(1*sqrt(Y/d))/(2*l);\n",
+"disp(f*10^-3,'the natural frequency(in kHz) is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.2: calculation_of_natural_frequency.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 12.2\n",
+"//calculation of natural frequency\n",
+"\n",
+"//given values\n",
+"\n",
+"t=5.5*10^-3;//thickness in m\n",
+"d=2.65*10^3;//density in kg/m^3\n",
+"Y=8*10^10;//Young's modulus in N/m^2 \n",
+"\n",
+"\n",
+"//calculation\n",
+"f=(sqrt(Y/d))/(2*t);//frequency in hertz\n",
+"disp(f*10^-3,'the natural frequency(in kHz) is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.3: calculation_of_depth_and_wavelength.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 12.3\n",
+"//calculation of depth and wavelength\n",
+"\n",
+"//given values\n",
+"\n",
+"f=.07*10^6;//frequency in Hz\n",
+"t=.65;//time taken for pulse to return\n",
+"v=1700;//velocity of sound in sea water in m/s\n",
+"\n",
+"//calculation\n",
+"d=v*t/2;//\n",
+"disp(d,'the depth of sea(in m) is');\n",
+"l=v/f;//wavelenght of pulse in m\n",
+"disp(l*10^2,'wavelength of pulse (in cm)is');"
+ ]
+ }
+],
+"metadata": {
+ "kernelspec": {
+ "display_name": "Scilab",
+ "language": "scilab",
+ "name": "scilab"
+ },
+ "language_info": {
+ "file_extension": ".sce",
+ "help_links": [
+ {
+ "text": "MetaKernel Magics",
+ "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
+ }
+ ],
+ "mimetype": "text/x-octave",
+ "name": "scilab",
+ "version": "0.7.1"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu/13-Atomic_Physics.ipynb b/A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu/13-Atomic_Physics.ipynb
new file mode 100644
index 0000000..a143a3b
--- /dev/null
+++ b/A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu/13-Atomic_Physics.ipynb
@@ -0,0 +1,340 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 13: Atomic Physics"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.1: calculation_of_rate_of_flow_of_photons.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 13.1\n",
+"//calculation of rate of flow of photons\n",
+"\n",
+"//given values\n",
+"\n",
+"l=5893*10^-10;//wavelength of light in m \n",
+"P=40;//power of sodium lamp in W\n",
+"d=10;//distance from the source in m\n",
+"s=4*%pi*d^2;//surface area of radius in m^2\n",
+"c=3*10^8;//velocity of light in m/s\n",
+"h=6.626*10^-34;//Planck's constant in Js\n",
+"//calculation\n",
+"E=P*1;//\n",
+"disp(E,'total energy emitted per second(in Joule)is');\n",
+"n=E*l/(c*h);//total no of photons\n",
+"R=n/s;\n",
+"disp(R,'rate of flow of photons per unit area (in /m^2) is')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.2: calculation_of_threshold_wavelength_and_stopping_potential.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 13.2\n",
+"//calculation of threshold wavelength and stopping potential\n",
+"\n",
+"//given values\n",
+"\n",
+"l=2000;//wavelength of light in armstrong \n",
+"e=1.6*10^-19;//charge of electron\n",
+"W=4.2;//work function in eV\n",
+"c=3*10^8;//velocity of light in m/s\n",
+"h=6.626*10^-34;//Planck's constant in Js\n",
+"//calculation\n",
+"x=12400/(W);//h*c=12400 eV\n",
+"disp(x,'threshold wavelength(in Armstrong)is');\n",
+"Vs=(12400/l-W);//\n",
+"disp(Vs,'stopping potential (in VOLTS) is')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.3: calculation_of_momentum_of_Xray_photon_undergoing_scattering.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 13.3\n",
+"//calculation of momentum of X-ray photon undergoing scattering\n",
+"\n",
+"//given values\n",
+"\n",
+"alpha=60*%pi/180;//scattering angle in radian\n",
+"e=1.6*10^-19;//charge ofelectrone\n",
+"W=12273;//work function in eV\n",
+"c=3*10^8;//velocity of light in m/s\n",
+"h=6.626*10^-34;//Planck's constant in Js\n",
+"hc=12400;//in eV\n",
+"m=9.1*10^-31//restmass of photon in kg\n",
+"//calculation\n",
+"x=hc/(W);//wavelength of photon undergoing modofied scattering in armstrong\n",
+"y=x-(h/(m*c))*(1-cos(alpha));\n",
+"p=h/y*10^10;\n",
+"disp(p,'momentum of photon(in kg-m/s) is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.4: EX13_4.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 13.4\n",
+"//calculation of wavelength of scattered radiation and velocity of recoiled electron\n",
+"\n",
+"//given values\n",
+"\n",
+"alpha=30*%pi/180;//scattering angle in radian\n",
+"e=1.6*10^-19;//charge ofelectron\n",
+"x=1.372*10^-10;//wavelength of incident radiation in m\n",
+"c=3*10^8;//velocity of light in m/s\n",
+"h=6.626*10^-34;//Planck's constant in Js\n",
+"m=9.1*10^-31//rest mass of photon in kg\n",
+"hc=12400;//in eV\n",
+"//calculation\n",
+"\n",
+"y=((x+(h/(m*c))*(1-cos(alpha))))*10^10;\n",
+"disp(y,'wavelength of scattered radiation(in armstrong)is');\n",
+"x1=x*10^10;//converting incident wavelength into armstrong\n",
+"KE=hc*e*((1/x1)-(1/y));//kinetic energy in Joule\n",
+"disp(KE,'kinetic energy in joule is ');\n",
+"v=sqrt(2*KE/m);\n",
+"disp(v,'velocity of recoiled electron (in m/s^2)is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.5: calculation_of_wavelength_of_light_emitted.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 13.5\n",
+"//calculation of wavelength of light emitted\n",
+"\n",
+"//given values\n",
+"e=1.6*10^-19;//charge of electrone\n",
+"c=3*10^8;//velocity of light\n",
+"h=6.626*10^-34;//Planck's constant in Js\n",
+"E1=5.36;//energy of first state in eV\n",
+"E2=3.45;//energy of second state in eV\n",
+"\n",
+"\n",
+"//1)calculation\n",
+"\n",
+"l=h*c*10^10/((E1-E2)*e);\n",
+"disp(l,'wavelength of scattered light(in Armstrong)is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.6: calculation_of_de_Broglie_wavelength.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 13.6\n",
+"//calculation of de Broglie wavelength \n",
+"\n",
+"//1)given values\n",
+"e=1.6*10^-19;\n",
+"h=6.626*10^-34;//Planck's constant in Js\n",
+"V=182;//potential difference in volts\n",
+"m=9.1*10^-31;//mass of e in kg\n",
+"\n",
+"\n",
+"//1)calculation\n",
+"\n",
+"l=h/sqrt(2*e*m*V);\n",
+"disp(l,'de Brogliewavelength (in m)is');\n",
+"\n",
+"\n",
+"//2)given values\n",
+"m1=1;//mass of object in kg\n",
+"v=1;//velocity of object in m/s\n",
+"l1=h/(m1*v);\n",
+"disp(l1,'debrogie wavelength of object in m) is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.7: calculation_of_uncertainty_in_position.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 13.7\n",
+"//calculation of uncertainty in position\n",
+"\n",
+"//1)given values\n",
+"\n",
+"h=6.626*10^-34;//Planck's constant in Js\n",
+"v1=220;//velocity of e in m/s\n",
+"m=9.1*10^-31;//mass of e in kg\n",
+"A=0.065/100;//accuracy\n",
+"\n",
+"\n",
+"//1)calculation\n",
+"v2=v1*A;//uncertainty in speed\n",
+"x1=h/(2*%pi*m*v2);//\n",
+"disp(x1,'uncertainty in position of e (in m)is');\n",
+"\n",
+"\n",
+"//2)given values\n",
+"m1=150/1000;//mass of object in kg\n",
+"x2=h/(2*%pi*m1*v2);\n",
+"disp(x2,'uncertainty in position of baseball(in m) is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.8: Energy_states_of_an_electron_and_grain_of_dust.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 13.8\n",
+"//calculation of energy states of an electron and grain of dust and comparing\n",
+"\n",
+"//1)given values\n",
+"L1=10*10^-10;//width of potential well in which e is confined\n",
+"L2=.1*10^-3;//width of potential well in which grain of dust is confined\n",
+"h=6.626*10^-34;//Planck's constant in Js\n",
+"v1=10^6;//velocity of garin of dust in m/s\n",
+"m1=9.1*10^-31;//mass of e in kg\n",
+"m2=10^-9;//mass of grain in kg\n",
+"\n",
+"//1)calculation\n",
+"\n",
+"Ee1=1^2*h^2/(8*m1*L1^2);//first energy state of electron\n",
+"disp(Ee1,'first energy state of e is ');\n",
+"Ee2=2^2*h^2/(8*m1*L1^2);//second energy state of electron\n",
+"disp(Ee2,'second energy state of e is ');\n",
+"Ee3=3^2*h^2/(8*m1*L1^2);//third energy state of electron\n",
+"disp(Ee3,'third energy state of e is ');\n",
+"disp('Energy levels of an electron in an infinite potential well are quantised and the energy difference between the successive levels is quite large.Electron cannot jump from one level to other on strength of thermal energy.Hence quantization of energy plays a significant role in case of electron')\n",
+"\n",
+"Eg1=1^2*h^2/(8*m2*L2^2);//first energy state of grain of dust\n",
+"disp(Eg1,'first energy state of grain of dust is ');\n",
+"Eg2=2^2*h^2/(8*m2*L2^2);//second energy state of grain of dust\n",
+"disp(Eg2,'second energy state of grain of dust is ');\n",
+"Eg3=3^2*h^2/(8*m2*L2^2);//third energy state of grain of dust\n",
+"disp(Eg3,'third energy state of grain of dust is ');\n",
+"KE=m2*v1^2/2;//kinetic energy of grain of dust;\n",
+"disp(KE,'kinetic energy of grain of dust is');\n",
+"disp('The energy levels of a grain of dust are so near to each other that they constitute a continuum.These energy levels are far smaller than the kinetic energy possessed by the grain of dust.It can move through all these energy levels without an external supply of energy.Thus quantization of energy levels is not at all significant in case of macroscopic bodies.')"
+ ]
+ }
+],
+"metadata": {
+ "kernelspec": {
+ "display_name": "Scilab",
+ "language": "scilab",
+ "name": "scilab"
+ },
+ "language_info": {
+ "file_extension": ".sce",
+ "help_links": [
+ {
+ "text": "MetaKernel Magics",
+ "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
+ }
+ ],
+ "mimetype": "text/x-octave",
+ "name": "scilab",
+ "version": "0.7.1"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu/14-Lasers.ipynb b/A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu/14-Lasers.ipynb
new file mode 100644
index 0000000..a176d69
--- /dev/null
+++ b/A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu/14-Lasers.ipynb
@@ -0,0 +1,190 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 14: Lasers"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.1: calculation_of_intensity_of_laser_beam.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 14.1\n",
+"//calculation of intensity of laser beam\n",
+"\n",
+"//given values\n",
+"P=10*10^-3;//Power in Watt\n",
+"d=1.3*10^-3;//diametre in m\n",
+"A=%pi*d^2/4;//area in m^2\n",
+"\n",
+"\n",
+"//calculation\n",
+"I=P/A;\n",
+"disp(I,'intensity (in W/m^2) is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.2: calculation_of_intensity_of_laser_beam.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 14.2\n",
+"//calculation of intensity of laser beam\n",
+"\n",
+"//given values\n",
+"P=1*10^-3;//Power in Watt\n",
+"l=6328*10^-10;//wavelength in m\n",
+"A=l^2;//area in m^2\n",
+"\n",
+"\n",
+"//calculation\n",
+"I=P/A;\n",
+"disp(I,'intensity (in W/m^2) is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.3: calculation_of_coherence_length_bandwidth_and_line_width.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 14.3\n",
+"//calculation of coherence length,bandwidth and line width\n",
+"\n",
+"//given values\n",
+"c=3*10^8;//velocity of light in m/s\n",
+"t=.1*10^-9;//timedivision in s\n",
+"l=6238*10^-10;//wavelength in m\n",
+"\n",
+"//calculation\n",
+"x=c*t;\n",
+"disp(x,'coherence length (in m) is');\n",
+"d=1/t;\n",
+"disp(d,'bandwidth (in Hz) is');\n",
+"y=l^2*d/c;//line width in m\n",
+"disp(y*10^10,'line width(in armstrong )is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.4: calculation_of_frequency_difference.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 14.4\n",
+"//calculation of frequency difference\n",
+"\n",
+"//given values\n",
+"c=3*10^8;//velocity of light in m/s\n",
+"l=.5;//distance in m\n",
+"\n",
+"//calculation\n",
+"f=c/(2*l);//in hertz\n",
+"disp(f/10^6,'frequency difference (in MHz) is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14.5: calculation_of_frequency_difference.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 14.5\n",
+"//calculation of no of cavity modes\n",
+"\n",
+"//given values\n",
+"c=3*10^8;//velocity of light in m/s\n",
+"n=1.75;//refractive index\n",
+"l=2*10^-2;//length of ruby rod in m\n",
+"x=6943*10^-10;//wavelength in m\n",
+"y=5.3*10^-10;//spread of wavelength in m\n",
+"\n",
+"//calculation\n",
+"d=c/n/l;\n",
+"f=c*y/x^2;\n",
+"m=f/d;\n",
+"disp(m,'no of modes is');"
+ ]
+ }
+],
+"metadata": {
+ "kernelspec": {
+ "display_name": "Scilab",
+ "language": "scilab",
+ "name": "scilab"
+ },
+ "language_info": {
+ "file_extension": ".sce",
+ "help_links": [
+ {
+ "text": "MetaKernel Magics",
+ "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
+ }
+ ],
+ "mimetype": "text/x-octave",
+ "name": "scilab",
+ "version": "0.7.1"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu/15-Atomic_nucleus_and_nuclear_energy.ipynb b/A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu/15-Atomic_nucleus_and_nuclear_energy.ipynb
new file mode 100644
index 0000000..afd7193
--- /dev/null
+++ b/A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu/15-Atomic_nucleus_and_nuclear_energy.ipynb
@@ -0,0 +1,546 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 15: Atomic nucleus and nuclear energy"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 15.10: calculation_of_crossection.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 15.10\n",
+"//calculation of crosssection\n",
+"\n",
+"//given values\n",
+"t=.01*10^-3;//thickness in m\n",
+"n=10^13;//no of protons bombarding target per s\n",
+"NA=6.02*10^26;//avogadro's number\n",
+"M=7;//atomic mass of lithium in kg\n",
+"d=500;//density of lithium in kg/m^3\n",
+"n0=10^8;//no of neutrons produced per s\n",
+"//calculation\n",
+"n1=d*NA/M;//no of target nuclei per unit volume\n",
+"n2=n1*t;//no of target nuclei per area\n",
+"A=n0/(n*n2);\n",
+"disp(A,'crosssection(in m^2) for this reaction is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 15.11: calculation_of_final_energy.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 15.11\n",
+"//calculation of final energy \n",
+"\n",
+"//given values\n",
+"B=.4;//max magnetic field in Wb/m^2\n",
+"c=3*10^8;\n",
+"e=1.6*10^-19;\n",
+"d=1.52;//diametre in m\n",
+"r=d/2;\n",
+"\n",
+"//calculation\n",
+"E=B*e*r*c;//E=pc,p=mv=Ber\n",
+"disp(E,'final energy of e(in J) is');\n",
+"E1=(E/e)/10^6;\n",
+"disp(E1,'final energy of e (in MeV) is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 15.12: calculation_of_amount_of_fuel.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 15.12\n",
+"//calculation of amount of fuel\n",
+"\n",
+"//given values\n",
+"P=100*10^6;//power required by city\n",
+"M=235;//atomic mass of Uranium in g\n",
+"e=20/100;//conversion efficiency\n",
+"NA=6.02*10^26;//avogadros number\n",
+"E=200*10^6*1.6*10^-19;//energy released per fission\n",
+"t=8.64*10^4;//day in seconds\n",
+"\n",
+"\n",
+"//calculation\n",
+"E1=P*t;//energy requirement\n",
+"m=E1*M/(NA*e*E);//no of nuclei N=NA*m/M,energy released by m kg is N*E,energy requirement=e*N*E\n",
+"disp(m,'amount of fuel(in kg) required is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 15.13: calculation_of_power_output.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 15.13\n",
+"//calculation of power output\n",
+"\n",
+"//given values\n",
+"M=235;//atomic mass of Uranium in kg\n",
+"e=5/100;//reactor efficiency\n",
+"m=25/1000;//amount of uranium consumed per day in kg\n",
+"E=200*10^6*1.6*10^-19;//energy released per fission\n",
+"t=8.64*10^4;//day in seconds\n",
+"NA=6.02*10^26;//avogadros number\n",
+"\n",
+"//calculation\n",
+"n=NA*m/M;//no of nuclei in 25g\n",
+"E1=n*E;//energy produced by n nuclei\n",
+"E2=E1*e;//energy converted to power\n",
+"P=E2/t;//power output in Watt\n",
+"disp(P/10^6,'power output in MW is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 15.14: calculation_of_power_developed.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 15.14\n",
+"//calculation of power developed\n",
+"\n",
+"//given values\n",
+"M=235;//atomic mass of Uranium in kg\n",
+"m=20.4;//amount of uranium consumed per day in kg\n",
+"E=200*10^6*1.6*10^-19;//energy released per fission\n",
+"t=3600*1000;//time of operation\n",
+"NA=6.02*10^26;//avogadros number\n",
+"\n",
+"//calculation\n",
+"n=NA*m/M;//no of nuclei in 20.4kg\n",
+"E1=n*E;//energy produced by n nuclei\n",
+"P=E1/t;//in Watt\n",
+"disp(P/10^6,'power developed in MW is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 15.15: calculation_of_amount_of_dueterium_consumed.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 15.15\n",
+"//calculation of amount of dueterium consumed\n",
+"\n",
+"//given values\n",
+"M1=2.01478;//atomic mass of Hydrogen in amu\n",
+"M2=4.00388;//atomic mass of Helium in amu\n",
+"amu=931;//amu in MeV\n",
+"e=30/100;//efficiency\n",
+"P=50*10^6;//output power\n",
+"NA=6.026*10^26;//avogadro number\n",
+"t=8.64*10^4;//seconds in a day\n",
+"\n",
+"//calculation\n",
+"Q=(2*M1-M2)*amu;//energy released in a D-D reaction in MeV\n",
+"O=Q*e*10^6/2;//actual output per dueterium atom in eV\n",
+"n=P/(O*1.6*10^-19);//no of D atoms required\n",
+"m=n*M1/NA;//equivalent mass of D required per s\n",
+"X=m*t;\n",
+"\n",
+"disp(X,'Deuterium requirement per day in kg is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 15.1: calculation_of_binding_energy_per_nucleon.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 15.1\n",
+"//calculation of binding energy per nucleon\n",
+"\n",
+"//given values\n",
+"Mp=1.00814;//mass of proton in amu\n",
+"Mn=1.008665;//mass of nucleon in amu\n",
+"M=7.01822;//mass of Lithium nucleus in amu\n",
+"amu=931;//amu in MeV\n",
+"n=7-3;//no of neutrons in lithium nucleus\n",
+"\n",
+"//calculation\n",
+"ET=(3*Mp+4*Mn-M)*amu;//total binding energy in MeV\n",
+"E=ET/7;//7 1s the mass number\n",
+"disp(E,'Binding energy per nucleon in MeV is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 15.2: calculation_of_energy.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 15.2\n",
+"//calculation of energy \n",
+"\n",
+"//given values\n",
+"M1=15.00001;//atomic mass of N15 in amu\n",
+"M2=15.0030;//atomic mass of O15 in amu\n",
+"M3=15.9949;//atomic mass of O16 in amu\n",
+"amu=931.4;//amu in MeV\n",
+"mp=1.0072766;//restmass of proton\n",
+"mn=1.0086654;//restmass of neutron\n",
+"\n",
+"//calculation\n",
+"Q1=(M3-mp-M1)*amu;\n",
+"disp(Q1,'energy required to remove one proton from O16 is');\n",
+"Q2=(M3-mn-M2)*amu;\n",
+"disp(Q2,'energy required to remove one neutron from O16 is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 15.3: calculation_of_binding_energy.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 15.3\n",
+"//calculation of binding energy \n",
+"\n",
+"//given values\n",
+"Mp=1.00758;//mass of proton in amu\n",
+"Mn=1.00897;//mass of nucleon in amu\n",
+"M=4.0028;//mass of Helium nucleus in amu\n",
+"amu=931.4;//amu in MeV\n",
+"\n",
+"//calculation\n",
+"E1=(2*Mp+2*Mn-M)*amu;//total binding energy\n",
+"disp(E1,'Binding energy in MeV is');\n",
+"E2=E1*10^6*1.6*10^-19;\n",
+"disp(E2,'binding energy in Joule is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 15.4: calculation_of_binding_energy.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 15.4\n",
+"//calculation of amount of unchanged material\n",
+"\n",
+"//given values\n",
+"T=2;//half life in years\n",
+"k=.6931/T;//decay constant\n",
+"M=4.0028;//mass of Helium nucleus in amu\n",
+"amu=931.4;//amu in MeV\n",
+"No=1;//initial amount in g\n",
+"\n",
+"//calculation\n",
+"N=No*(%e^(-k*2*T));\n",
+"disp(N,'amount of material remaining unchanged after four years(in gram) is');\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 15.5: calculation_of_halflife.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 15.5\n",
+"//calculation of amount of halflife\n",
+"\n",
+"//given values\n",
+"t=5;//time period in years\n",
+"amu=931.4;//amu in MeV\n",
+"No=5;//initial amount in g\n",
+"N=5-(10.5*10^-3);//amount present after 5 years\n",
+"\n",
+"\n",
+"//calculation\n",
+"k=log(N/No)/t;//decay constant\n",
+"T=-.693/k;\n",
+"disp(T,'halflife in years is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 15.6: calculation_of_activity.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 15.6\n",
+"//calculation of activity\n",
+"\n",
+"//given values\n",
+"t=28;//half life in years\n",
+"m=10^-3;//mass of sample\n",
+"M=90;//atomic mass of strontium\n",
+"NA=6.02*10^26;//avogadro's number\n",
+"\n",
+"\n",
+"//calculation\n",
+"n=m*NA/M;//no of nuclei in 1 mg sample\n",
+"k=.693/(t*365*24*60*60);//decay constant\n",
+"A=k*n;\n",
+"disp(A,'activity of sample(in disintegrations per second) is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 15.7: calculation_of_age_of_mineral.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 15.7\n",
+"//calculation of age of mineral\n",
+"\n",
+"//given values\n",
+"t=4.5*10^9;//half life in years\n",
+"M1=238;//atomic mass of Uranium in g\n",
+"m=.093;//mass of lead in 1 g of uranium in g\n",
+"NA=6.02*10^26;//avogadro's number\n",
+"M2=206;//atomic mass of lead in g\n",
+"\n",
+"//calculation\n",
+"n=NA/M1;//no of nuclei in 1 g of uranium sample\n",
+"n1=m*NA/M2;//no of nuclei in m mass of lead\n",
+"c=n1/n;\n",
+"k=.693/t;//decay constant\n",
+"T=(1/k)*log(1+c);\n",
+"disp(T,'age of mineral in years is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 15.8: calculation_of_age_of_wooden_piece.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 15.8\n",
+"//calculation of age of wooden piece\n",
+"\n",
+"//given values\n",
+"t=5730;//half life of C14 in years\n",
+"M1=50;//mass of wooden piece in g\n",
+"A1=320;//activity of wooden piece (disintegration per minute per g)\n",
+"A2=12;//activity of living tree\n",
+"\n",
+"//calculation\n",
+"k=.693/t;//decay constant\n",
+"A=A1/M1;//activity after death\n",
+"\n",
+"T=(1/k)*log(A2/A);\n",
+"disp(T,'age of mineral in years is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 15.9: calculation_of_energy_released.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 15.9\n",
+"//calculation of energy released\n",
+"\n",
+"//given values\n",
+"M1=10.016125;//atomic mass of Boron in amu\n",
+"M2=13.007440;//atomic mass of C13 in amu\n",
+"M3=4.003874;//atomic mass of Helium in amu\n",
+"mp=1.008146;//mass of proton in amu\n",
+"amu=931;//amu in MeV\n",
+"\n",
+"//calculation\n",
+"Q=(M1+M3-(M2+mp))*amu;//total binding energy in M\n",
+"disp(Q,'Binding energy per nucleon in MeV is');"
+ ]
+ }
+],
+"metadata": {
+ "kernelspec": {
+ "display_name": "Scilab",
+ "language": "scilab",
+ "name": "scilab"
+ },
+ "language_info": {
+ "file_extension": ".sce",
+ "help_links": [
+ {
+ "text": "MetaKernel Magics",
+ "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
+ }
+ ],
+ "mimetype": "text/x-octave",
+ "name": "scilab",
+ "version": "0.7.1"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu/16-Structure_of_Solids.ipynb b/A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu/16-Structure_of_Solids.ipynb
new file mode 100644
index 0000000..44f562d
--- /dev/null
+++ b/A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu/16-Structure_of_Solids.ipynb
@@ -0,0 +1,163 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 16: Structure of Solids"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 16.1: calculation_of_density.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 16.1\n",
+"//calculation of density\n",
+"\n",
+"//given values\n",
+"a=3.36*10^-10;//lattice constant in m\n",
+"M=209;//atomicmass of polonium in kg\n",
+"N=6.02*10^26;//avogadro's number\n",
+"z=1;//no of atom\n",
+"//calculation\n",
+"d=z*M/(N*a^3)\n",
+"\n",
+"disp(d,'density (in kg/m^3) is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 16.2: calculation_of_no_of_atoms.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 16.2\n",
+"//calculation of no of atoms\n",
+"\n",
+"//given values\n",
+"a=4.3*10^-10;//edge of unit cell in m\n",
+"d=963;//density in kg/m^3\n",
+"M=23;//atomicmass of sodium in kg\n",
+"N=6.02*10^26;//avogadro's number\n",
+"\n",
+"//calculation\n",
+"z=d*N*a^3/M;\n",
+"\n",
+"disp(z,'no of atoms is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 16.3: calculation_of_distance.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 16.3\n",
+"//calculation of distance\n",
+"\n",
+"//given values\n",
+"z=4;//no of atoms in fcc\n",
+"d=2180;//density in kg/m^3\n",
+"M=23+35.3;//atomicmass of sodium chloride in kg\n",
+"N=6.02*10^26;//avogadro's number\n",
+"\n",
+"//calculation\n",
+"a1=z*M/(N*d);\n",
+"a=a1^(1/3);\n",
+"l=a/2;//in m\n",
+"\n",
+"disp(l*10^10,'distance between adjacent chlorine and sodium atoms in armstrong is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 16.4: calculation_of_interatomic_spacing.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 16.4\n",
+"//calculation of interatomic spacing\n",
+"\n",
+"//given values\n",
+"alpha=30*%pi/180;//Bragg angle in degree\n",
+"h=1;\n",
+"k=1;\n",
+"l=1;\n",
+"m=1;//order of reflection\n",
+"x=1.75*10^-10;//wavelength in m\n",
+"\n",
+"//calculation\n",
+"d=m*x/(2*sin(alpha));\n",
+"a=d*sqrt(h^2+k^2+l^2);//in m\n",
+"\n",
+"disp(a*10^10,'interatomic spacing in armstrong is');"
+ ]
+ }
+],
+"metadata": {
+ "kernelspec": {
+ "display_name": "Scilab",
+ "language": "scilab",
+ "name": "scilab"
+ },
+ "language_info": {
+ "file_extension": ".sce",
+ "help_links": [
+ {
+ "text": "MetaKernel Magics",
+ "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
+ }
+ ],
+ "mimetype": "text/x-octave",
+ "name": "scilab",
+ "version": "0.7.1"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu/17-The_Band_Theory_of_Solids.ipynb b/A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu/17-The_Band_Theory_of_Solids.ipynb
new file mode 100644
index 0000000..f477133
--- /dev/null
+++ b/A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu/17-The_Band_Theory_of_Solids.ipynb
@@ -0,0 +1,122 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 17: The Band Theory of Solids"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 17.1: calculation_of_velocity_of_fraction_of_free_electrone.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 17.1\n",
+"//calculation of probability\n",
+"\n",
+"//given values\n",
+"E=.01;//energy difference in eV\n",
+"kT=.026;//temperture equivalent at room temp in e\n",
+"\n",
+"//calculation\n",
+"P=1/(1+(%e^(E/kT)));\n",
+"\n",
+"disp(P,'interatomic spacing is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 17.2: calculation_of_velocity_of_e.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 17.2\n",
+"//calculation of velocity of e\n",
+"\n",
+"//given values\n",
+"e=1.6*10^-19;//charge of e in C\n",
+"E=2.1*e;//fermi level in J\n",
+"m=9.1*10^-31;//mass of e in kg\n",
+"\n",
+"//calculation\n",
+"v=sqrt(2*E/m);\n",
+"\n",
+"disp(v,'velocity of e(in m/s)');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 17.3: calculation_of_velocity_of_fraction_of_free_electrones.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 17.3\n",
+"//calculation of velocity of fraction of free electrons\n",
+"\n",
+"//given values\n",
+"E=5.5;//fermi level in eV\n",
+"kT=.026;//temperture equivalent at room temp in e\n",
+"\n",
+"//calculation\n",
+"f=2*kT/E;\n",
+"\n",
+"disp(f,'fraction of free electrone\s upto width kT on either side of Ef is');"
+ ]
+ }
+],
+"metadata": {
+ "kernelspec": {
+ "display_name": "Scilab",
+ "language": "scilab",
+ "name": "scilab"
+ },
+ "language_info": {
+ "file_extension": ".sce",
+ "help_links": [
+ {
+ "text": "MetaKernel Magics",
+ "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
+ }
+ ],
+ "mimetype": "text/x-octave",
+ "name": "scilab",
+ "version": "0.7.1"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu/18-Semiconductors.ipynb b/A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu/18-Semiconductors.ipynb
new file mode 100644
index 0000000..62830d9
--- /dev/null
+++ b/A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu/18-Semiconductors.ipynb
@@ -0,0 +1,264 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 18: Semiconductors"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 18.2: calculation_of_probability.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 18.2\n",
+"//calculation of probability\n",
+"\n",
+"//given values\n",
+"T=300;//temp in K\n",
+"kT=.026;//temperture equivalent at room temp in eV\n",
+"Eg=5.6;//forbidden gap in eV\n",
+"\n",
+"//calculation\n",
+"f=1/(1+%e^(Eg/(2*kT)));\n",
+"\n",
+"disp(f,'probability of an e being thermally promoted to conduction band is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 18.3: calculation_of_fraction_of_e_in_CB.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 18.3\n",
+"//calculation of fraction of e in CB\n",
+"\n",
+"//given values\n",
+"T=300;//temp in K\n",
+"kT=.026;//temperture equivalent at room temp in eV\n",
+"Eg1=.72;//forbidden gap of germanium in eV\n",
+"Eg2=1.1;//forbidden gap of silicon in eV\n",
+"Eg3=5.6;//forbidden gap of diamond in eV\n",
+"\n",
+"//calculation\n",
+"f1=%e^(-Eg1/(2*kT));\n",
+"disp(f1,'fraction of e in conduction band of germanium is');\n",
+"f2=%e^(-Eg2/(2*kT));\n",
+"disp(f2,'fraction of e in conduction band of silicon is');\n",
+"f3=%e^(-Eg3/(2*kT));\n",
+"disp(f3,'fraction of e in conduction band of diamond is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 18.4: calculation_of_fractionional_change_in_no_of_e.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 18.3\n",
+"//calculation of fractionional change in no of e\n",
+"\n",
+"//given values\n",
+"T1=300;//temp in K\n",
+"T2=310;//temp in K\n",
+"Eg=1.1;//forbidden gap of silicon in eV\n",
+"k=8.6*10^-5;//boltzmann's constant in eV/K\n",
+"\n",
+"//calculation\n",
+"n1=(10^21.7)*(T1^(3/2))*10^(-2500*Eg/T1);//no of conduction e at T1\n",
+"n2=(10^21.7)*(T2^(3/2))*10^(-2500*Eg/T2);//no of conduction e at T2\n",
+"x=n2/n1;\n",
+"disp(x,'fractional change in no of e is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 18.5: calculation_of_resistivity.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 18.5\n",
+"//calculation of resistivity\n",
+"\n",
+"//given values\n",
+"e=1.6*10^-19;\n",
+"ni=2.5*10^19;//intrinsic density of carriers per m^3\n",
+"ue=.39;//mobility of e \n",
+"uh=.19;//mobility of hole\n",
+"\n",
+"\n",
+"//calculation\n",
+"c=e*ni*(ue+uh);//conductivity\n",
+"r=1/c;//resistivity\n",
+"disp(r,'resistivity in ohm m is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 18.6: calculation_of_conductivity_of_intrinsic_and_doped_semiconductors.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 18.6\n",
+"//calculation of conductivity of intrinsic and doped semiconductors\n",
+"\n",
+"//given values\n",
+"h=4.52*10^24;//no of holes per m^3\n",
+"e=1.25*10^14;//no of electrons per m^3\n",
+"ue=.38;//e mobility\n",
+"uh=.18;//hole mobility\n",
+"q=1.6*10^-19;//charge of e in C\n",
+"//calculation\n",
+"ni=sqrt(h*e);//intrinsic concentration\n",
+"ci=q*ni*(ue+uh);\n",
+"disp(ci,'conductivity of semiconductor(in S/m) is');\n",
+"cp=q*h*uh;\n",
+"disp(cp,'conductivity of doped semiconductor (in S/m) is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 18.7: calculation_of_hole_concentration.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 18.7\n",
+"//calculation of hole concentration\n",
+"\n",
+"//given values\n",
+"ni=2.4*10^19;//carrier concentration per m^3\n",
+"N=4*10^28;//concentration of ge atoms per m^3\n",
+"\n",
+"//calculation\n",
+"ND=N/10^6;//donor cocntrtn\n",
+"n=ND;//no of electrones\n",
+"\n",
+"p=ni^2/n;\n",
+"disp(p,'concentartion of holes per m^3 is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 18.8: calculation_of_Hall_voltage.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 18.8\n",
+"//calculation of Hall voltage\n",
+"\n",
+"//given values\n",
+"ND=10^21;//donor density per m^3\n",
+"B=.5;//magnetic field in T\n",
+"J=500;//current density in A/m^2\n",
+"w=3*10^-3;//width in m\n",
+"e=1.6*10^-19;//charge in C\n",
+"\n",
+"//calculation\n",
+"\n",
+"\n",
+"V=B*J*w/(ND*e);//in volts\n",
+"disp(V*10^3,'Hall voltage in mv is');"
+ ]
+ }
+],
+"metadata": {
+ "kernelspec": {
+ "display_name": "Scilab",
+ "language": "scilab",
+ "name": "scilab"
+ },
+ "language_info": {
+ "file_extension": ".sce",
+ "help_links": [
+ {
+ "text": "MetaKernel Magics",
+ "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
+ }
+ ],
+ "mimetype": "text/x-octave",
+ "name": "scilab",
+ "version": "0.7.1"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu/19-PN_Junction_Diode.ipynb b/A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu/19-PN_Junction_Diode.ipynb
new file mode 100644
index 0000000..5cdee10
--- /dev/null
+++ b/A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu/19-PN_Junction_Diode.ipynb
@@ -0,0 +1,95 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 19: PN Junction Diode"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 19.1: calculation_of_potential_barrier.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 19.1\n",
+"//calculation of potential barrier\n",
+"\n",
+"//given values\n",
+"e=1.6*10^-19;\n",
+"n=4.4*10^28;//no of atoms per m^3\n",
+"kT=.026*e;//temp eqvlnt at room temp\n",
+"ni=2.4*10^19;//no of intrinsic carriers per m^3\n",
+"NA=n/10^6;//no of acceptors\n",
+"ND=n/10^6;//no of donors\n",
+"\n",
+"//calculation\n",
+"V=(kT/e)*log(NA*ND/ni^2);\n",
+"disp(V,'potential barrier in volts is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 19.2: calculation_of_current.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 19.2\n",
+"//calculation of current\n",
+"\n",
+"//given values\n",
+"e=1.6*10^-19;\n",
+"kT=.026*e;//temp eqvlnt at room temp\n",
+"Io=2*10^-7;//current flowing at room temp in A\n",
+"V=.1;//forward bias voltage in volts\n",
+"\n",
+"//calculation\n",
+"I=Io*(%e^(e*V/kT)-1);//in Ampere\n",
+"disp(I*10^6,'current flowing when forward bias applied(in microampere)is');"
+ ]
+ }
+],
+"metadata": {
+ "kernelspec": {
+ "display_name": "Scilab",
+ "language": "scilab",
+ "name": "scilab"
+ },
+ "language_info": {
+ "file_extension": ".sce",
+ "help_links": [
+ {
+ "text": "MetaKernel Magics",
+ "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
+ }
+ ],
+ "mimetype": "text/x-octave",
+ "name": "scilab",
+ "version": "0.7.1"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu/21-Magnetic_Materials.ipynb b/A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu/21-Magnetic_Materials.ipynb
new file mode 100644
index 0000000..7765319
--- /dev/null
+++ b/A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu/21-Magnetic_Materials.ipynb
@@ -0,0 +1,130 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 21: Magnetic Materials"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 21.1: calculation_of_magnetizing_force_and_relative_permeability.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 21.1\n",
+"//calculation of magnetizing force and relative permeability\n",
+"\n",
+"//given values\n",
+"M=2300;//magnetization in A/m\n",
+"B=.00314;//flux density in Wb/m^2\n",
+"u=12.57*10^-7;//permeability in H/m\n",
+"\n",
+"//calculation\n",
+"H=(B/u)-M;\n",
+"disp(H,'magnetizing force(in A/m)is ');\n",
+"Ur=B/(u*H);\n",
+"disp(Ur,'relative permeability is')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 21.2: calculation_of_magnetization_and_magnetic_flux_density.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 21.2\n",
+"//calculation of magnetization and magnetic flux density\n",
+"\n",
+"//given values\n",
+"H=10^5;//external field in A/m\n",
+"X=5*10^-5;//susceptibility \n",
+"u=12.57*10^-7;//permeability in H/m\n",
+"\n",
+"//calculation\n",
+"M=X*H;\n",
+"disp(M,'magnetization (in A/m)is ');\n",
+"B=u*(M+H);\n",
+"disp(B,'magnetic flux density (in wb/m^2) is')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 21.3: calculation_of_relative_permeability.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 21.3\n",
+"//calculation of relative permeability\n",
+"\n",
+"//given values\n",
+"\n",
+"X=3.7*10^-3;//susceptibility at 300k\n",
+"T=300;//temp in K\n",
+"T1=200;//temp in K\n",
+"T2=500;//temp in K\n",
+"\n",
+"//calculation\n",
+"C=X*T;//curie constant\n",
+"XT1=C/T1;\n",
+"disp(XT1,'relative permeability at T1 is ');\n",
+"XT2=C/T2;\n",
+"disp(XT2,'relative permeability at T2 is')"
+ ]
+ }
+],
+"metadata": {
+ "kernelspec": {
+ "display_name": "Scilab",
+ "language": "scilab",
+ "name": "scilab"
+ },
+ "language_info": {
+ "file_extension": ".sce",
+ "help_links": [
+ {
+ "text": "MetaKernel Magics",
+ "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
+ }
+ ],
+ "mimetype": "text/x-octave",
+ "name": "scilab",
+ "version": "0.7.1"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu/22-Superconductivity.ipynb b/A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu/22-Superconductivity.ipynb
new file mode 100644
index 0000000..62aadb3
--- /dev/null
+++ b/A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu/22-Superconductivity.ipynb
@@ -0,0 +1,125 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 22: Superconductivity"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 22.1: calculation_of_magnetic_field.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 22.1\n",
+"//calculation of magnetic field\n",
+"\n",
+"//given values\n",
+"\n",
+"Tc=7.2;//transition temp in K\n",
+"T=5;//temp in K\n",
+"Hc=3.3*10^4;//magnetic field at T in A/m\n",
+"\n",
+"\n",
+"//calculation\n",
+"Hc0=Hc/(1-(T^2/Tc^2));\n",
+"disp(Hc0,'max value of H at 0K (in A/m) is ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 22.2: calculation_of_transition_temperature.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 22.2\n",
+"//calculation of transition temperature\n",
+"\n",
+"//given values\n",
+"\n",
+"T=8;//temp in K\n",
+"Hc=1*10^5;//critical magnetic field at T in A/m\n",
+"Hc0=2*10^5;//magnetic field at 0 K in A/m\n",
+"\n",
+"//calculation\n",
+"Tc=T/(sqrt(1-Hc/Hc0));\n",
+"disp(Tc,'transition temp in K is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 22.3: calculation_of_temp_at_which_there_is_max_critical_field.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 22.3\n",
+"//calculation of temp at which there is max critical field\n",
+"\n",
+"//given values\n",
+"\n",
+"Tc=7.26;//critical temp in K\n",
+"Hc=8*10^5;//max critical magnetic field at T in A/m\n",
+"H=4*10^4;// subjected magnetic field at in A/m\n",
+"\n",
+"//calculation\n",
+"T=Tc*(sqrt(1-H/Hc));\n",
+"disp(T,'max temp for superconductivity in K is');"
+ ]
+ }
+],
+"metadata": {
+ "kernelspec": {
+ "display_name": "Scilab",
+ "language": "scilab",
+ "name": "scilab"
+ },
+ "language_info": {
+ "file_extension": ".sce",
+ "help_links": [
+ {
+ "text": "MetaKernel Magics",
+ "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
+ }
+ ],
+ "mimetype": "text/x-octave",
+ "name": "scilab",
+ "version": "0.7.1"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu/23-Dielectrics.ipynb b/A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu/23-Dielectrics.ipynb
new file mode 100644
index 0000000..5eed48a
--- /dev/null
+++ b/A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu/23-Dielectrics.ipynb
@@ -0,0 +1,254 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 23: Dielectrics"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 23.1: calculation_of_relative_permittivity.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 23.1\n",
+"//calculation of relative permittivity\n",
+"\n",
+"//given values\n",
+"\n",
+"E=1000;//electric field in V/m\n",
+"P=4.3*10^-8;//polarization in C/m^2\n",
+"e=8.85*10^-12;//permittivity in F/m\n",
+"\n",
+"\n",
+"//calculation\n",
+"er=1+(P/(e*E));\n",
+"disp(er,'relative permittivity of NaCl is ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 23.2: calculation_of_electronic_polarizability.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 23.2\n",
+"//calculation of electronic polarizability\n",
+"\n",
+"//given values\n",
+"\n",
+"e=8.85*10^-12;//permittivity in F/m\n",
+"er=1.0024;//relative permittivity at NTP\n",
+"N=2.7*10^25;//atoms per m^3\n",
+"\n",
+"\n",
+"//calculation\n",
+"alpha=e*(er-1)/N;\n",
+"disp(alpha,'electronic polarizability (in F/m^2)is ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 23.3: calculation_of_electronic_polarizability_and_relative_permittivity.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 23.3\n",
+"//calculation of electronic polarizability and relative permittivity\n",
+"\n",
+"//given values\n",
+"\n",
+"e=8.85*10^-12;//permittivity in F/m\n",
+"N=9.8*10^26;//atoms per m^3\n",
+"r=.53*10^-10;//radius in m\n",
+"\n",
+"\n",
+"//calculation\n",
+"alpha=4*%pi*e*r^3;\n",
+"disp(alpha,'electronic polarizability (in F/m^2)is ');\n",
+"er=1+(4*%pi*N*r^3);\n",
+"disp(er,'relative permittivity is')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 23.4: calculation_of_electronic_polarizability_and_relative_permittivity.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 23.4\n",
+"//calculation of electronic polarizability and relative permittivity\n",
+"\n",
+"//given values\n",
+"w=32;//atomic weight of sulphur \n",
+"d=2.08*10^3;//density in kg/m^3\n",
+"NA=6.02*10^26;//avogadros number\n",
+"alpha=3.28*10^-40;//electronic polarizability in F.m^2\n",
+"e=8.854*10^-12;//permittiviy\n",
+"//calculation\n",
+"\n",
+"n=NA*d/w;\n",
+"k=n*alpha/(3*e);\n",
+"er=(1+2*k)/(1-k);\n",
+"disp(er,'relative permittivity is')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 23.5: calculation_of_ionic_polarizability.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 23.5\n",
+"//calculation of ionic polarizability\n",
+"\n",
+"//given values\n",
+"n=1.5;//refractive index\n",
+"er=6.75;//relative permittivity\n",
+"\n",
+"//calculation\n",
+"Pi=(er-n^2)*100/(er-1);\n",
+"disp(Pi,'percentage ionic polarizability (in %)) is')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 23.6: calculation_of_frequency_and_phase_difference.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 23.6\n",
+"//calculation of frequency and phase difference\n",
+"\n",
+"//given values\n",
+"t=18*10^-6;//relaxation time in s\n",
+"\n",
+"//calculation\n",
+"f=1/(2*%pi*t);\n",
+"disp(f,'frequency at which real and imaginary part of complx dielectric constant are equal is');\n",
+"alpha=atan(1)*180/%pi;// phase difference between current and voltage( 1 because real and imaginry parts are equal of the dielectric constant)\n",
+"disp(alpha,'phase diffeerence (in degree) is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 23.7: calculation_of_frequency.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 23.7\n",
+"//calculation of frequency\n",
+"\n",
+"//given values\n",
+"t=5.5*10^-3;//thickness of plate in m\n",
+"Y=8*10^10;//Young's modulus in N/m^2\n",
+"d=2.65*10^3;//density in kg/m^3\n",
+"\n",
+"\n",
+"\n",
+"//calculation\n",
+"f=sqrt(Y/d)/(2*t);//in Hz\n",
+"disp(f/10^3,'frequency of fundamental note(in KHz) is');"
+ ]
+ }
+],
+"metadata": {
+ "kernelspec": {
+ "display_name": "Scilab",
+ "language": "scilab",
+ "name": "scilab"
+ },
+ "language_info": {
+ "file_extension": ".sce",
+ "help_links": [
+ {
+ "text": "MetaKernel Magics",
+ "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
+ }
+ ],
+ "mimetype": "text/x-octave",
+ "name": "scilab",
+ "version": "0.7.1"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu/24-Fibre_optics.ipynb b/A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu/24-Fibre_optics.ipynb
new file mode 100644
index 0000000..2a2e306
--- /dev/null
+++ b/A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu/24-Fibre_optics.ipynb
@@ -0,0 +1,258 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 24: Fibre optics"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 24.1: Fiber_optics_numerical_aperture_calculation.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 24.1\n",
+"//Fiber optics\n",
+"\n",
+"//given values\n",
+"n=1.5;//refractive index\n",
+"x=.0005;//fractional index difference\n",
+"\n",
+"//calculation\n",
+"u=n*(1-x);\n",
+"disp(u,'cladding index is');\n",
+"alpha=asin(u/n)*180/%pi;\n",
+"disp(alpha,'critical internal reflection angle(in degree) is');\n",
+"theta=asin(sqrt(n^2-u^2))*180/%pi;\n",
+"disp(theta,'critical acceptance angle(in degree) is');\n",
+"N=n*sqrt(2*x);\n",
+"disp(N,'numerical aperture is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 24.2: calculation_of_acceptance_angle.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 24.2\n",
+"//calculation of acceptance angle\n",
+"\n",
+"//given values\n",
+"n=1.59;//cladding refractive index\n",
+"u=1.33;//refractive index of water\n",
+"N=.20;//numerical aperture offibre\n",
+"//calculation\n",
+"x=sqrt(N^2+n^2);//index of fibre\n",
+"N1=sqrt(x^2-n^2)/u;//numerical aperture when fibre is in water\n",
+"alpha=asin(N1)*180/%pi;\n",
+"disp(alpha,'acceptance angle in degree is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 24.3: calculation_of_normailsed_frequency.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 24.3\n",
+"//calculation of normalised frequency\n",
+"\n",
+"//given values\n",
+"n=1.45;//core refractive index\n",
+"d=.6;//core diametre in m\n",
+"N=.16;//numerical aperture of fibre\n",
+"l=.9*10^-6;//wavelength of light\n",
+"\n",
+"//calculation\n",
+"u=sqrt(n^2+N^2);//index of glass fibre\n",
+"V=%pi*d*sqrt(u^2-n^2)/l;\n",
+"disp(V,'normalised frequency is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 24.4: calculation_of_normailsed_frequency_and_no_of_modes.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 24.4\n",
+"//calculation of normailsed frequency and no of modes\n",
+"\n",
+"//given values\n",
+"n=1.52;//core refractive index\n",
+"d=29*10^-6;//core diametre in m\n",
+"l=1.3*10^-6;//wavelength of light\n",
+"x=.0007;//fractional refractive index\n",
+"\n",
+"//calculation\n",
+"u=n*(1-x);//index of glass fibre\n",
+"V=%pi*d*sqrt(n^2-u^2)/l;\n",
+"disp(V,'normalised frequency is');\n",
+"N=V^2/2;\n",
+"disp(N,'no of modes is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 24.5: calculation_of_numerical_aperture_and_maximum_acceptance_angle.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 24.5\n",
+"//calculation of numerical aperture and maximum acceptance angle\n",
+"\n",
+"//given values\n",
+"n=1.480;//core refractive index\n",
+"u=1.47;//index of glass\n",
+"l=850*10^-9;//wavelength of light\n",
+"V=2.405;//V-number\n",
+"\n",
+"//calculation\n",
+"r=V*l/sqrt(n^2-u^2)/%pi/2;//in m\n",
+"disp(r*10^6,'core radius in micrometre is');\n",
+"N=sqrt(n^2-u^2);\n",
+"disp(N,'numerical aperture is');\n",
+"alpha=asin(N)*180/%pi;\n",
+"disp(alpha,'max acceptance angle is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 24.6: calculation_of_power_level.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 24.6\n",
+"//calculation of power level\n",
+"\n",
+"//given values\n",
+"a=3.5;//attenuation in dB/km\n",
+"Pi=.5*10^-3;//initial power level in W\n",
+"l=4;//length of cable in km\n",
+"\n",
+"//calculation\n",
+"Po=Pi*10^6/(10^(a*l/10));\n",
+"disp(Po,'power level after km(in microwatt) is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 24.7: calculation_of_power_loss.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 24.7\n",
+"//calculation of power loss\n",
+"\n",
+"//given values\n",
+"Pi=1*10^-3;//initial power level in W\n",
+"l=.5;//length of cable in km\n",
+"Po=.85*Pi\n",
+"\n",
+"//calculation\n",
+"a=(10/l)*log10(Pi/Po);\n",
+"disp(a,'loss in dB/km is');"
+ ]
+ }
+],
+"metadata": {
+ "kernelspec": {
+ "display_name": "Scilab",
+ "language": "scilab",
+ "name": "scilab"
+ },
+ "language_info": {
+ "file_extension": ".sce",
+ "help_links": [
+ {
+ "text": "MetaKernel Magics",
+ "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
+ }
+ ],
+ "mimetype": "text/x-octave",
+ "name": "scilab",
+ "version": "0.7.1"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu/25-Digital_electronics.ipynb b/A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu/25-Digital_electronics.ipynb
new file mode 100644
index 0000000..f897508
--- /dev/null
+++ b/A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu/25-Digital_electronics.ipynb
@@ -0,0 +1,1599 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 25: Digital electronics"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 25.10: binary_division.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;\n",
+"clear;\n",
+"//example 25.10\n",
+"//binary division\n",
+"\n",
+"format('v',8);//changing the default precision to 8\n",
+"a=11001;//first number \n",
+"b=100;//second number\n",
+"A=bin21dec(a);//converting a in to decimal number \n",
+"B=bin21dec(b);//converting b in to decimal number \n",
+"S=A/B; //multiply the two decimal numbers\n",
+"temp=dec21bin(S);//converting the decimal product back to binary\n",
+"\n",
+"disp(temp,'quotient is');//displaying the final output"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 25.11: octal_additio.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 25.11\n",
+"//calculation of sum of two octal numbers\n",
+"\n",
+"//given values\n",
+"X='256';//divident\n",
+"Y='437';//divisor\n",
+"\n",
+"//calculation\n",
+"x=oct2dec(X);//decimal equivalent\n",
+"y=oct2dec(Y);//decimal equivalent\n",
+"z=x+y;\n",
+"Z=dec2oct(z);//binary equivalent\n",
+"disp(Z,'sum of the given octal numbers is')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 25.12: octal_multiplicatio.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 25.12\n",
+"//calculation of product of two octal numbers\n",
+"\n",
+"//given values\n",
+"X='15';//divident\n",
+"Y='24';//divisor\n",
+"\n",
+"//calculation\n",
+"x=oct2dec(X);//decimal equivalent\n",
+"y=oct2dec(Y);//decimal equivalent\n",
+"z=x*y;\n",
+"Z=dec2oct(z);//binary equivalent\n",
+"disp(Z,'product of the given octal numbers is')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 25.13: hexadecimal_additio.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 25.13\n",
+"//calculation of sum of hexadecimal numbers\n",
+"\n",
+"//given values\n",
+"X1='C';\n",
+"X2='A';\n",
+"X3='E';\n",
+"Y1='3';\n",
+"Y2='2';\n",
+"Y3='D';\n",
+"\n",
+"//calculation\n",
+"x1=hex2dec(X1);//decimal equivalent\n",
+"x2=hex2dec(X2);//decimal equivalent\n",
+"x3=hex2dec(X3);//decimal equivalent\n",
+"y1=hex2dec(Y1);//decimal equivalent\n",
+"y2=hex2dec(Y2);//decimal equivalent\n",
+"y3=hex2dec(Y3);//decimal equivalent\n",
+"z1=x1+y1;\n",
+"z2=x2+y2;\n",
+"z3=x3+y3;\n",
+"Z1=dec2hex(z1);//binary equivalent of sum\n",
+"Z2=dec2hex(z2);//binary equivalent of sum\n",
+"Z3=dec2hex(z3);//binary equivalent of sum\n",
+"disp(Z1,'sum of the first set of hexadecimal numbers is');\n",
+"disp(Z2,'sum of the second set of hexadecimal numbers is');\n",
+"disp(Z3,'sum of the thirdm set of hexadecimal numbers is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 25.14: binary_to_decimal_conversion.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 25.13\n",
+"//conversion of binary to decimal\n",
+"\n",
+"//given values\n",
+"X=10.101;//binary number\n",
+"\n",
+"//calculation\n",
+"Z=(1*2^1)+(0*2^0)+(1*2^-1)+(0*2^-2)+(1*2^-3);\n",
+"disp(Z,'decimal equivalent of the given binary number is')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 25.15: decimal_to_binary_conversion.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 25.15\n",
+"//conversion of decimal to binary\n",
+"\n",
+"//given values\n",
+"X=43;//decimal number\n",
+"\n",
+"//calculation\n",
+"Z=dec2bin(X);\n",
+"disp(Z,'binary equivalent of the given decimal number is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 25.16: decimal_to_binary_conversion.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;//clears the command window \n",
+"clear;//clears all the variables \n",
+"//example 25.16\n",
+"//decimal to binary conversion\n",
+"\n",
+"format('v',18);//changing the default prcision to 20 significant digits\n",
+"\n",
+"i=1;x=1;//flag bits\n",
+"\n",
+"dec=43.3125;//given decimal number which should be expressed in binary\n",
+"temp2=floor(dec);//separating integer part from the given number\n",
+"temp4=modulo(dec,1);//separating decimal part from the given number\n",
+"\n",
+"while(temp2>0)//storing each integer digit in vector for convenience\n",
+" p(i)=(modulo(floor(temp2),2))\n",
+" temp2=floor(temp2/2);\n",
+" i=i+1;\n",
+"end\n",
+"\n",
+"temp2=0;//clearing temporary variable 'temp2'\n",
+"\n",
+"for j=1:length(p)\n",
+"//multipliying bits of integer part with their position values and adding \n",
+" temp2=temp2+(p(j)*10^(j-1));\n",
+"end\n",
+"\n",
+"while(temp4~=0) //storing each decimal digit in vector for convenience\n",
+" temp4=temp4*2;\n",
+" d(x)=floor(temp4);\n",
+" x=x+1;\n",
+" temp4=modulo(temp4,1);\n",
+"end \n",
+"\n",
+"temp5=0;//clearing temporary variable 'temp5'\n",
+"\n",
+"for j=1:length(d)\n",
+"//multipliying bits of decimal part with their position values and adding \n",
+" temp5=temp5+(10^(-1*j)*d(j))\n",
+"end\n",
+"\n",
+"temp3=temp2+temp5;\n",
+"//finally adding both the integer and decimal parts to get total output.\n",
+"disp(temp3,'the equivalent binary number is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 25.17: decimal_to_octal_conversion.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;//clears the command window \n",
+"clear;//clears all the variables \n",
+"//example 25.17\n",
+"//decimal to octa conversion\n",
+"\n",
+"format('v',8);//making the default precision to 8 significant digits\n",
+"i=1;w=1;\n",
+"dec=375.23;//given decimal number which should be expressed in base 8\n",
+"temp=modulo(dec,1);//separating decimal part from the given number\n",
+"temp2=floor(dec);//separating integer part from the given number\n",
+"\n",
+"\n",
+"while(temp2>0)//storing each integer digit in vector for convenience\n",
+" p(i)=(modulo(floor(temp2),8))\n",
+" temp2=floor(temp2/8);\n",
+" i=i+1;\n",
+"end\n",
+"\n",
+"temp2=0;//clearing temporary variable 'temp2'\n",
+"\n",
+"for j=1:length(p)\n",
+"//multipliying bits of integer part with their position values and adding \n",
+" temp2=temp2+(p(j)*10^(j-1));\n",
+"end\n",
+"\n",
+"while(temp~=0) //storing each decimal digit in vector for convenience\n",
+" temp=temp*8;\n",
+" q(w)=floor(temp);\n",
+" w=w+1;\n",
+" temp=modulo(temp,1);\n",
+"end \n",
+"\n",
+"temp1=0; //flag bit\n",
+"for k=1:length(q)\n",
+"//multipliying bits of decimal part with their position values and adding \n",
+" temp1=temp1+(10^(-1*k)*q(k));\n",
+"end\n",
+"temp3=temp2+temp1;\n",
+"disp(temp3,'octal number is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 25.18: octal_to_binary_conversion.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 25.18\n",
+"//ocatl to binary conversion\n",
+"\n",
+"//given values\n",
+"X='257';//octal number\n",
+"\n",
+"//calculation\n",
+"x=oct2dec(X);//decimal equivalent\n",
+"Z=dec2bin(x);\n",
+"disp(Z,'binary number is ')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 25.19: octal_to_binary_conversion.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;//clears the command window \n",
+"clear;//clears all the variables \n",
+"//example 25.19\n",
+"//octal to binary conversion\n",
+"\n",
+"format('v',8);//setting the default precision to 8\n",
+"\n",
+"i=1;w=1;\n",
+"\n",
+"bin=34.56; //Given octal number which we need to be convert into binary\n",
+"temp1=floor(bin);//separating integer part from the given number\n",
+"temp0=modulo(bin,1);//separating decimal part from the given number\n",
+"temp2=temp0*10^2;//converting decimal value to interger for convenience\n",
+"while(temp1>0) //storing each integer digit in vector for convenience\n",
+" p(i)=modulo(temp1,10);\n",
+" temp1=round(temp1/10);\n",
+" i=i+1;\n",
+"end\n",
+"\n",
+"while(temp2>0) //storing each decimal digit in vector for convenience\n",
+" q(w)=modulo(temp2,10);\n",
+" temp2=floor(temp2/10);\n",
+" w=w+1;\n",
+" \n",
+"end\n",
+"temp1=0; //clearing temporary variable 'temp1\n",
+"\n",
+"for i=1:2\n",
+"//multipliying bits of decimal part with their position values and adding \n",
+" temp1=temp1+(p(i)*8^(i-1));\n",
+"end\n",
+"\n",
+"temp2=0;//clearing temporary variable 'temp2'\n",
+"for z=1:2\n",
+"//multipliying bits of decimal part with their position values and adding \n",
+" temp2=temp2+(q(z)*8^(-1*(3-z)));\n",
+" \n",
+"end\n",
+"\n",
+"temp=temp1+temp2;\n",
+"//adding both integer and decimal parts to get total deciaml value.\n",
+"dec=temp;\n",
+"\n",
+"temp2=floor(dec); //separating integer part from the given number\n",
+"temp3=modulo(dec,1);//separating decimal part from the given number\n",
+"format('v',18);//setting the default precision to 8\n",
+"\n",
+"i=1;x=1;//flag bits\n",
+"\n",
+"while(temp2>0)//storing each integer digit in vector for convenience\n",
+" p(i)=(modulo(floor(temp2),2))\n",
+" temp2=floor(temp2/2);\n",
+" i=i+1;\n",
+"end\n",
+"\n",
+"temp2=0; //clears temporary variable 'temp2'\n",
+"\n",
+"for j=1:length(p)\n",
+"//multipliying bits of integer part with their position values and adding \n",
+" temp2=temp2+(p(j)*10^(j-1));\n",
+"end\n",
+"\n",
+"temp4=modulo(temp3,1);\n",
+"\n",
+"while(temp4~=0)//storing each decimal digit in vector for convenience\n",
+" temp4=temp4*2;\n",
+" d(x)=floor(temp4);\n",
+" x=x+1;\n",
+" temp4=modulo(temp4,1);\n",
+"end \n",
+"\n",
+"temp5=0; //clears temporary variable 'temp2'\n",
+"\n",
+"for j=1:length(d)\n",
+"//multipliying bits of decimal part with their position values and adding \n",
+" temp5=temp5+(10^(-1*j)*d(j))\n",
+"end\n",
+"\n",
+"temp=temp2+temp5;\n",
+"//finally adding both the integer and decimal parts to get total output.\n",
+"disp(temp,'binary number is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 25.1: sum_of_two_binary_numbers.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 25.1\n",
+"//calculation of sum of two binary numbers\n",
+"\n",
+"//given values\n",
+"X='0011';//first binary number\n",
+"Y='0101';//second binary number\n",
+"\n",
+"//calculation\n",
+"x=bin2dec(X);//decimal equivalent\n",
+"y=bin2dec(Y);//decimal equivalent\n",
+"z=x+y;\n",
+"Z=dec2bin(z);\n",
+"disp(Z,'Sum of the given binary numbers is ')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 25.20: binary_to_octal_conversion.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;//clears the command window \n",
+"clear;//clears all the variables \n",
+"i=1;w=1;\n",
+"bin=1011.01101;//Given binary number which we need to be convert into octal\n",
+"\n",
+"//conversion to decimal first\n",
+"temp1=floor(bin);//separating integer part from the given number\n",
+"temp2=modulo(bin,1);//separating decimal part from the given number\n",
+"temp2=temp2*10^5;//converting decimal value to integer for convenience\n",
+"while(temp1>0)//storing each integer digit in vector for convenience\n",
+" p(i)=modulo(temp1,10);\n",
+" temp1=floor(temp1/10);\n",
+" i=i+1;\n",
+"end\n",
+"while(temp2>0)//storing each decimal digit in vector for convenience\n",
+" q(w)=modulo(temp2,2);\n",
+" temp2=(temp2/10);\n",
+" temp2=floor(temp2);\n",
+" w=w+1;\n",
+"end\n",
+"temp1=0;//flag bit\n",
+"for i=1:length(p)//checking whether it is a binary number or not\n",
+" if(p(i)>1) then\n",
+" disp('not a binary number');\n",
+" abort; \n",
+" end\n",
+"end\n",
+"for i=1:length(p)\n",
+"//multipliying bits of integer part with their position values and adding \n",
+" temp1=temp1+(p(i)*2^(i-1));\n",
+"end\n",
+"temp2=0;//flag bit\n",
+"for z=1:length(q)\n",
+"//multipliying bits of decimal part with their position values and adding \n",
+" temp2=temp2+(q(z)*2^(-1*(6-z)));\n",
+"end\n",
+"dec=temp1+temp2;\n",
+"//finally adding both the integer and decimal parts to get decimal equivalent\n",
+"\n",
+"//conversion from decimal to octal\n",
+"\n",
+"format('v',8);//making the default precision to 8 significant digits\n",
+"i=1;w=1;\n",
+"\n",
+"temp=modulo(dec,1);//separating decimal part from the given number\n",
+"temp2=floor(dec);//separating integer part from the given number\n",
+"\n",
+"\n",
+"while(temp2>0)//storing each integer digit in vector for convenience\n",
+" r(i)=(modulo(floor(temp2),8))\n",
+" temp2=floor(temp2/8);\n",
+" i=i+1;\n",
+"end\n",
+"\n",
+"temp2=0;//clearing temporary variable 'temp2'\n",
+"\n",
+"for j=1:length(r)\n",
+"//multipliying bits of integer part with their position values and adding \n",
+" temp2=temp2+(r(j)*10^(j-1));\n",
+"end\n",
+"\n",
+"while(temp~=0) //storing each decimal digit in vector for convenience\n",
+" temp=temp*8;\n",
+" s(w)=floor(temp);\n",
+" w=w+1;\n",
+" temp=modulo(temp,1);\n",
+"end \n",
+"\n",
+"temp1=0; //flag bit\n",
+"for k=1:length(s)\n",
+"//multipliying bits of decimal part with their position values and adding \n",
+" temp1=temp1+(10^(-1*k)*s(k));\n",
+"end\n",
+"temp3=temp2+temp1;\n",
+"disp(temp3,'octal number is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 25.21: hexa_to_decimal_conversion.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 25.21\n",
+"//hexadecimal to decimal conversion\n",
+"\n",
+"//given values\n",
+"X='AC5';//hexadecimal number\n",
+"\n",
+"//calculation\n",
+"x=hex2dec(X);//decimal equivalent\n",
+"disp(x,'decimal number is ')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 25.22: decimal_to_hexadecimal_conversion.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;//clears the command window \n",
+"clear;//clears all the variables \n",
+"//example 25.22\n",
+"//decimal to hexadecimal conversion\n",
+"format('v',4);//making the default precision to 8 significant digits\n",
+"dec=379.54;//given decimal\n",
+"w=1;i=1;\n",
+"\n",
+"temp1=floor(dec);//separating integer part from the given number\n",
+"temp2=modulo(dec,1);//separating decimal part from the given number\n",
+"x=dec2hex(temp1);//hexadecimal equivalent of integer part\n",
+"s=0;\n",
+"\n",
+"while(temp2~=0) //storing each decimal digit in vector for convenience\n",
+" temp2=temp2*16;\n",
+" q(w)=floor(temp2);\n",
+" s=s+1;//counter of a\n",
+" a(w)=dec2hex(q(w));\n",
+" w=w+1;\n",
+" temp2=modulo(temp2,1);\n",
+"end\n",
+"f=a(1);\n",
+"for i=2:s\n",
+" f=f+a(i);\n",
+"end\n",
+"b='.';//for concatenating to get the decimal part of hexadecimal \n",
+"hex=x+b+f;//concatenating integer and decimal part\n",
+"disp(hex,'hexadecimal equivalent is');\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 25.23: hexa_to_binary_conversion.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 25.23\n",
+"//hexadecimal to binary conversion\n",
+"\n",
+"//given values\n",
+"X='7AB';//hexadecimal number\n",
+"\n",
+"//calculation\n",
+"x=hex2dec(X);//decimal equivalent\n",
+"z=dec2bin(x);\n",
+"disp(z,'binary number is ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 25.24: binary_to_hexa_conversion.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 25.24\n",
+"//binary to hexadecimal conversion\n",
+"\n",
+"//given values\n",
+"X='1011101';//binary number\n",
+"\n",
+"//calculation\n",
+"x=bin2dec(X);//decimal equivalent\n",
+"z=dec2hex(x);\n",
+"disp(z,'hexadecimal number is ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 25.25: Substraction_by_ones_complement_method.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"clc;\n",
+"clear;\n",
+"//Example 25.25\n",
+"//substraction by one's complement method\n",
+"//aaa=input(' Enter the first no (in decimal) :');\n",
+"//bb=input(' Enter the number from which first no has to be substracted:');\n",
+"bb=14;\n",
+"aaa=-7;// substraction is addition of negative number\n",
+"if aaa<0 then\n",
+" aa=-1*aaa;\n",
+"else aa=aaa;\n",
+"end\n",
+"a=0;\n",
+"b=0;\n",
+"q=0;\n",
+"for i=1:5 //converting from decimal to binary \n",
+" x=modulo(aa,2);\n",
+" a= a + (10^q)*x;\n",
+" aa=aa/2;\n",
+" aa=floor(aa);\n",
+" q=q+1; \n",
+"end\n",
+"q=0;\n",
+"for i=1:5 //converting from decimal to binary \n",
+" y=modulo(bb,2);\n",
+" b= b + (10^q)*y;\n",
+" bb=bb/2;\n",
+" bb=floor(bb);\n",
+" q=q+1; \n",
+"end\n",
+"for i=1:5\n",
+" a1(i)=modulo(a,10);\n",
+" a=a/10;\n",
+" a=round(a);\n",
+" \n",
+"end\n",
+"for i=1:5\n",
+" b1(i)=modulo(b,10);\n",
+" b=b/10;\n",
+" b=round(b);\n",
+"end;\n",
+"if aaa<0 then// making one's complement if number is less than zero\n",
+" for i=1:5\n",
+" a1(i)=bitcmp(a1(i),1);\n",
+" end\n",
+" \n",
+" car(1)=0;\n",
+" \n",
+"for i=1:5\n",
+" c1(i)=a1(i)+b1(i)+car(i);\n",
+" if c1(i)== 2 then\n",
+" car(i+1)= 1;\n",
+" c1(i)=0;\n",
+" elseif c1(i)==3 then \n",
+" car(i+1)= 1;\n",
+" c1(i)=1;\n",
+" else \n",
+" car(i+1)=0;\n",
+" end;\n",
+"end;\n",
+"car2(1)=car(6);\n",
+"re=0;\n",
+"format('v',18);\n",
+" for i=1:5\n",
+" re=re+(c1(i)*(10^(i-1))) //result of one's complement addition \n",
+" end;\n",
+"\n",
+"\n",
+" \n",
+"for i=1:5\n",
+" s(i)=modulo(re,10);\n",
+" re=re/10;\n",
+" re=round(re);\n",
+"end;\n",
+" \n",
+"for i=1:5\n",
+" re1(i)=s(i)+car2(i);//addition of carry after one's complement addition\n",
+" if re1(i)== 2 then\n",
+" car2(i+1)= 1;\n",
+" re1(i)=0;\n",
+" elseif re1(i)==3 then \n",
+" car2(i+1)= 1;\n",
+" re1(i)=1;\n",
+" else \n",
+" car2(i+1)=0;\n",
+" end;\n",
+"end;\n",
+"\n",
+" re2=0;\n",
+"format('v',18);\n",
+" for i=1:5\n",
+" re2=re2+(re1(i)*(10^(i-1))) \n",
+" end; \n",
+"\n",
+" disp(re,'difference is') \n",
+" "
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 25.26: Substraction_by_ones_complement_method.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"clc;\n",
+"clear;\n",
+"//example 25.26\n",
+"//substraction by one's complement method\n",
+"//a=input(' Enter the first no (binary) :');\n",
+"//b=input(' Enter the number from which first no has to be substracted:');\n",
+"a=10001;\n",
+"b=10011;\n",
+"q=0;\n",
+"\n",
+"for i=1:5\n",
+" a1(i)=modulo(a,10);\n",
+" a=a/10;\n",
+" a=round(a);\n",
+" \n",
+"end\n",
+"for i=1:5\n",
+" b1(i)=modulo(b,10);\n",
+" b=b/10;\n",
+" b=round(b);\n",
+"end;\n",
+" for i=1:5//making one's complement of number to be substracted\n",
+" a1(i)=bitcmp(a1(i),1);\n",
+"end\n",
+" \n",
+"car(1)=0;\n",
+" \n",
+"for i=1:5\n",
+" c1(i)=a1(i)+b1(i)+car(i);\n",
+" if c1(i)== 2 then\n",
+" car(i+1)= 1;\n",
+" c1(i)=0;\n",
+" elseif c1(i)==3 then \n",
+" car(i+1)= 1;\n",
+" c1(i)=1;\n",
+" else \n",
+" car(i+1)=0;\n",
+" end;\n",
+"end;\n",
+"car2(1)=car(6);\n",
+"re=0;\n",
+"format('v',18);\n",
+"for i=1:5\n",
+" re=re+(c1(i)*(10^(i-1))) //result of one's complement addition \n",
+"end;\n",
+"\n",
+" \n",
+"for i=1:5\n",
+" s(i)=modulo(re,10);\n",
+" re=re/10;\n",
+" re=round(re);\n",
+"end;\n",
+"if car2(1)==1 then// checking carry\n",
+" \n",
+"for i=1:5\n",
+" re1(i)=s(i)+car2(i);//addition of carry after one's complement addition\n",
+" if re1(i)== 2 then\n",
+" car2(i+1)= 1;\n",
+" re1(i)=0;\n",
+" elseif re1(i)==3 then \n",
+" car2(i+1)= 1;\n",
+" re1(i)=1;\n",
+" else \n",
+" car2(i+1)=0;\n",
+" end;\n",
+"end;\n",
+"\n",
+" re2=0;\n",
+"format('v',18);\n",
+" for i=1:5\n",
+" re2=re2+(re1(i)*(10^(i-1))) \n",
+" end; \n",
+"disp(re2,'difference is') ;\n",
+"\n",
+"else\n",
+" for i=1:5\n",
+" re1(i)=bitcmp(s(i),1);\n",
+" end\n",
+" re2=0;\n",
+" for i=1:5\n",
+" re2=re2+(re1(i)*(10^(i-1)))\n",
+" end;\n",
+" re2=-1*re2;\n",
+" disp(re2,'difference is') ;\n",
+" end;\n",
+" \n",
+" "
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 25.27: Substraction_by_ones_complement_method.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"clc;\n",
+"clear;\n",
+"//example 25.27\n",
+"//substraction by one's complement method\n",
+"//a=input(' Enter the first no (binary) :');\n",
+"//b=input(' Enter the number from which first no has to be substracted:');\n",
+"a=10011;\n",
+"b=10001;\n",
+"q=0;\n",
+"\n",
+"for i=1:5\n",
+" a1(i)=modulo(a,10);\n",
+" a=a/10;\n",
+" a=round(a);\n",
+"end\n",
+"for i=1:5\n",
+" b1(i)=modulo(b,10);\n",
+" b=b/10;\n",
+" b=round(b);\n",
+"end;\n",
+"for i=1:5//making one's complement of number to be substracted\n",
+" a1(i)=bitcmp(a1(i),1);\n",
+"end\n",
+" \n",
+"car(1)=0;\n",
+" \n",
+"for i=1:5\n",
+" c1(i)=a1(i)+b1(i)+car(i);\n",
+" if c1(i)== 2 then\n",
+" car(i+1)= 1;\n",
+" c1(i)=0;\n",
+" elseif c1(i)==3 then \n",
+" car(i+1)= 1;\n",
+" c1(i)=1;\n",
+" else \n",
+" car(i+1)=0;\n",
+" end;\n",
+"end;\n",
+"car2(1)=car(6);\n",
+"re=0;\n",
+"format('v',18);\n",
+"for i=1:5\n",
+" re=re+(c1(i)*(10^(i-1))) //result of one's complement addition \n",
+"end;\n",
+"\n",
+"for i=1:5\n",
+" s(i)=modulo(re,10);\n",
+" re=re/10;\n",
+" re=round(re);\n",
+"end;\n",
+"if car2(1)==1 then// checking carry \n",
+" \n",
+"for i=1:5\n",
+" re1(i)=s(i)+car2(i);//addition of carry after one's complement addition\n",
+" if re1(i)== 2 then\n",
+" car2(i+1)= 1;\n",
+" re1(i)=0;\n",
+" elseif re1(i)==3 then \n",
+" car2(i+1)= 1;\n",
+" re1(i)=1;\n",
+" else \n",
+" car2(i+1)=0;\n",
+" end;\n",
+"end;\n",
+"\n",
+" re2=0;\n",
+"format('v',18);\n",
+" for i=1:5\n",
+" re2=re2+(re1(i)*(10^(i-1))) \n",
+" end; \n",
+" re2= -1*re2;\n",
+"disp(re2,'difference is') ;\n",
+"\n",
+"else\n",
+" for i=1:5\n",
+" re1(i)=bitcmp(s(i),1);\n",
+" end\n",
+" re2=0;\n",
+" for i=1:5\n",
+" re2=re2+(re1(i)*(10^(i-1)))\n",
+" end;\n",
+" re2=-1*re2;\n",
+" disp(re2,'difference is') ;\n",
+"\n",
+"end;\n",
+" \n",
+" "
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 25.28: finding_twos_complement.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;\n",
+"clear;\n",
+"//example25.28\n",
+"//finiding two's complement\n",
+"//a=input(' Enter the number (binary) :');\n",
+"a=1010;\n",
+"for i=1:4\n",
+" a1(i)=modulo(a,10);\n",
+" a=a/10;\n",
+" a=round(a);\n",
+" \n",
+"end\n",
+"for i=1:4//making one's complement of number\n",
+" a1(i)=bitcmp(a1(i),1);\n",
+"end\n",
+"for i=1:4\n",
+"car(1)=1;\n",
+"re(i)=a1(i)+car(i);//addition of one to one's complement to contain two's complement\n",
+" if re(i)== 2 then\n",
+" car(i+1)= 1;\n",
+" re(i)=0;\n",
+" elseif re(i)==3 then \n",
+" car(i+1)= 1;\n",
+" re(i)=1;\n",
+" else \n",
+" car(i+1)=0;\n",
+" end;\n",
+"end;\n",
+"\n",
+" re2=0;\n",
+"format('v',18);\n",
+" for i=1:4\n",
+" re2=re2+(re(i)*(10^(i-1))) \n",
+" end; \n",
+"disp(re2,'two s complement is'); "
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 25.29: Addition_of_negative_number_by_twos_complement_method.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"clc;\n",
+"clear;\n",
+"//Example 25.29\n",
+"//addition of negative number by by two's complement method\n",
+"//bb=input(' Enter the first no (in decimal) :');\n",
+"//aaa=input(' Enter the negative number that has to be added');\n",
+"bb=14;\n",
+"aaa=-7;\n",
+"if aaa<0 then\n",
+" aa=-1*aaa;\n",
+"else aa=aaa;\n",
+"end\n",
+"a=0;\n",
+"b=0;\n",
+"q=0;\n",
+"for i=1:5 //converting from decimal to binary \n",
+" x=modulo(aa,2);\n",
+" a= a + (10^q)*x;\n",
+" aa=aa/2;\n",
+" aa=floor(aa);\n",
+" q=q+1; \n",
+"end\n",
+"q=0;\n",
+"for i=1:5 //converting from decimal to binary \n",
+" y=modulo(bb,2);\n",
+" b= b + (10^q)*y;\n",
+" bb=bb/2;\n",
+" bb=floor(bb);\n",
+" q=q+1; \n",
+"end\n",
+"for i=1:5\n",
+" a1(i)=modulo(a,10);\n",
+" a=a/10;\n",
+" a=round(a);\n",
+" \n",
+"end\n",
+"for i=1:5\n",
+" b1(i)=modulo(b,10);\n",
+" b=b/10;\n",
+" b=round(b);\n",
+"end;\n",
+"if aaa<0 then// making one's complement of the negative number\n",
+" for i=1:5\n",
+" a1(i)=bitcmp(a1(i),1);\n",
+" end\n",
+" \n",
+" car(1)=0;\n",
+" \n",
+"for i=1:5\n",
+" c1(i)=a1(i)+b1(i)+car(i);\n",
+" if c1(i)== 2 then\n",
+" car(i+1)= 1;\n",
+" c1(i)=0;\n",
+" elseif c1(i)==3 then \n",
+" car(i+1)= 1;\n",
+" c1(i)=1;\n",
+" else \n",
+" car(i+1)=0;\n",
+" end;\n",
+"end;\n",
+"re=0;\n",
+"format('v',18);\n",
+" for i=1:5\n",
+" re=re+(c1(i)*(10^(i-1))) //result of one's complement addition \n",
+" end;\n",
+"for i=1:5\n",
+" s(i)=modulo(re,10);\n",
+" re=re/10;\n",
+" re=round(re);\n",
+"end;\n",
+"if car(6)==1 then// checking carry\n",
+" car2(1)=1;\n",
+" \n",
+"for i=1:5\n",
+" re1(i)=s(i)+car2(i);//addition of carry after one's complement addition\n",
+" if re1(i)== 2 then\n",
+" car2(i+1)= 1;\n",
+" re1(i)=0;\n",
+" elseif re1(i)==3 then \n",
+" car2(i+1)= 1;\n",
+" re1(i)=1;\n",
+" else \n",
+" car2(i+1)=0;\n",
+" end;\n",
+"end;\n",
+"\n",
+" re2=0;\n",
+"format('v',18);\n",
+" for i=1:5\n",
+" re2=re2+(re1(i)*(10^(i-1))) \n",
+" end; \n",
+"\n",
+" disp(re2,'difference is') ;\n",
+" \n",
+"else \n",
+" for i=1:5\n",
+" re1(i)=bitcmp(s(i),1);\n",
+" end\n",
+" re2=0;\n",
+" for i=1:5\n",
+" re2=re2+(re1(i)*(10^(i-1)))\n",
+" end;\n",
+" re2=-1*re2;\n",
+" disp(re2,'difference is') ;\n",
+" end;\n",
+" \n",
+" "
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 25.2: sum_of_two_binary_numbers.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;\n",
+"clear;\n",
+"//example 25.2\n",
+"//addition of binary numbers\n",
+"\n",
+"a=1010.00; //first number \n",
+"b=0011.11; //second number\n",
+"A=bin21dec(a); //converting a in to decimal number \n",
+"B=bin21dec(b); //converting b in to decimal number \n",
+"S=A+B; //adding the two decimal numbers\n",
+"temp=dec21bin(S); //converting the decimal sum back to binary\n",
+"format('v',10); //changing the default precision to 8\n",
+"disp(temp,'sum is'); //displaying the final output"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 25.30: Substraction_by_twos_complement_method.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"clc;\n",
+"clear;\n",
+"//example 25.27\n",
+"//substarction by one's complement method\n",
+"//a=input(' Enter the first no (binary) :');\n",
+"//b=input(' Enter the number from which first no has to be substracted:');\n",
+"a=10011;\n",
+"b=10001;\n",
+"q=0;\n",
+"\n",
+"for i=1:5\n",
+" a1(i)=modulo(a,10);\n",
+" a=a/10;\n",
+" a=round(a);\n",
+"end\n",
+"for i=1:5\n",
+" b1(i)=modulo(b,10);\n",
+" b=b/10;\n",
+" b=round(b);\n",
+"end;\n",
+"for i=1:5//making one's complement of number to be substracted\n",
+" a1(i)=bitcmp(a1(i),1);\n",
+"end\n",
+" \n",
+"car(1)=0;\n",
+" \n",
+"for i=1:5\n",
+" c1(i)=a1(i)+b1(i)+car(i);\n",
+" if c1(i)== 2 then\n",
+" car(i+1)= 1;\n",
+" c1(i)=0;\n",
+" elseif c1(i)==3 then \n",
+" car(i+1)= 1;\n",
+" c1(i)=1;\n",
+" else \n",
+" car(i+1)=0;\n",
+" end;\n",
+"end;\n",
+"\n",
+"re=0;\n",
+"format('v',18);\n",
+"for i=1:5\n",
+" re=re+(c1(i)*(10^(i-1))) //result of one's complement addition \n",
+"end;\n",
+"\n",
+"for i=1:5\n",
+" s(i)=modulo(re,10);\n",
+" re=re/10;\n",
+" re=round(re);\n",
+"end;\n",
+"if car(6)==1 then// checking carry \n",
+" \n",
+"for i=1:5\n",
+" re1(i)=s(i)+car2(i);//addition of carry after one's complement addition\n",
+" if re1(i)== 2 then\n",
+" car2(i+1)= 1;\n",
+" re1(i)=0;\n",
+" elseif re1(i)==3 then \n",
+" car2(i+1)= 1;\n",
+" re1(i)=1;\n",
+" else \n",
+" car2(i+1)=0;\n",
+" end;\n",
+"end;\n",
+"\n",
+" re2=0;\n",
+"format('v',18);\n",
+" for i=1:5\n",
+" re2=re2+(re1(i)*(10^(i-1))) \n",
+" end; \n",
+" re2= -1*re2;\n",
+"disp(re2,'difference is') ;\n",
+"\n",
+"else\n",
+" for i=1:5\n",
+" re1(i)=bitcmp(s(i),1);\n",
+" end\n",
+" re2=0;\n",
+" for i=1:5\n",
+" re2=re2+(re1(i)*(10^(i-1)))\n",
+" end;\n",
+" re2=-1*re2;\n",
+" disp(re2,'difference is') ;\n",
+"\n",
+"end;\n",
+" \n",
+" "
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 25.3: sum_of_two_binary_numbers.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;\n",
+"clear;\n",
+"//example 25.3\n",
+"//addition of two binary numbers\n",
+"\n",
+"a=1011.01; //first number \n",
+"b=1101.11; //second number\n",
+"A=bin21dec(a); //converting a in to decimal number \n",
+"B=bin21dec(b); //converting b in to decimal number \n",
+"S=A+B; //adding the two decimal numbers\n",
+"temp=dec21bin(S); //converting the decimal sum back to binary\n",
+"format('v',10); //changing the default precision to 8\n",
+"disp(temp,'sum is'); //displaying the final output"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 25.4: difference_of_two_binary_numbers.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 25.4\n",
+"//calculation of difference of two binary numbers\n",
+"\n",
+"//given values\n",
+"X='1011';//first binary number\n",
+"Y='0101';//second binary number \n",
+"\n",
+"//calculation\n",
+"x=bin2dec(X);//decimal equivalent\n",
+"y=bin2dec(Y);//decimal equivalent\n",
+"z=x-y;\n",
+"Z=dec2bin(z);\n",
+"disp(Z,'difference of the given binary numbers ');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 25.5: difference_of_two_binary_numbers.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 25.5\n",
+"//calculation of difference of two binary numbers\n",
+"\n",
+"//given values\n",
+"X='1000';//first binary number\n",
+"Y='0011';//second binary number \n",
+"\n",
+"//calculation\n",
+"x=bin2dec(X);//decimal equivalent\n",
+"y=bin2dec(Y);//decimal equivalent\n",
+"z=x-y;\n",
+"Z=dec2bin(z);\n",
+"disp(Z,'difference of the given binary numbers ')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 25.6: difference_of_two_binary_numbers.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;\n",
+"clear;\n",
+"//example 25.6\n",
+"//binary substraction\n",
+"\n",
+"format('v',8);//changing the default precision to 8\n",
+"a=1001.01;//first number \n",
+"b=0011.10;//second number\n",
+"A=bin21dec(a);//converting a in to decimal number \n",
+"B=bin21dec(b);//converting b in to decimal number \n",
+"S=A-B; //multiply the two decimal numbers\n",
+"temp=dec21bin(S);//converting the decimal product back to binary\n",
+"\n",
+"disp(temp,'difference is');//displaying the final output"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 25.7: product_of_two_binary_numbers.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 25.7\n",
+"//calculation of product of two binary numbers\n",
+"\n",
+"//given values\n",
+"X='10101';//first binary number with last two digits in fractional part\n",
+"Y='101';//second binary number with last two digits in fractional part\n",
+"\n",
+"//calculation\n",
+"x=bin2dec(X);//decimal equivalent\n",
+"y=bin2dec(Y);//decimal equivalent\n",
+"z=x*y;\n",
+"Z=dec2bin(z);\n",
+"disp(Z,'product of the given binary numbers is ')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 25.8: binary_multiplication.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;\n",
+"clear;\n",
+"//example 25.8\n",
+"//binary multiplication\n",
+"\n",
+"format('v',8);//changing the default precision to 8\n",
+"a=10101.01;//first number \n",
+"b=110.10;//second number\n",
+"A=bin21dec(a);//converting a in to decimal number \n",
+"B=bin21dec(b);//converting b in to decimal number \n",
+"S=A*B; //multiply the two decimal numbers\n",
+"temp=dec21bin(S);//converting the decimal product back to binary\n",
+"\n",
+"disp(temp,'product is');//displaying the final output"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 25.9: binary_division.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 25.9\n",
+"//calculation of quotient of two binary numbers\n",
+"\n",
+"//given values\n",
+"X='1101001';//divident\n",
+"Y='101';//divisor\n",
+"\n",
+"//calculation\n",
+"x=bin2dec(X);//decimal equivalent\n",
+"y=bin2dec(Y);//decimal equivalent\n",
+"z=x/y;\n",
+"Z=dec2bin(z);\n",
+"disp(Z,'quotient of the given binary numbers with last two digits in fractional part is ')"
+ ]
+ }
+],
+"metadata": {
+ "kernelspec": {
+ "display_name": "Scilab",
+ "language": "scilab",
+ "name": "scilab"
+ },
+ "language_info": {
+ "file_extension": ".sce",
+ "help_links": [
+ {
+ "text": "MetaKernel Magics",
+ "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
+ }
+ ],
+ "mimetype": "text/x-octave",
+ "name": "scilab",
+ "version": "0.7.1"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu/4-Electron_Ballistics.ipynb b/A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu/4-Electron_Ballistics.ipynb
new file mode 100644
index 0000000..a985c6d
--- /dev/null
+++ b/A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu/4-Electron_Ballistics.ipynb
@@ -0,0 +1,256 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 4: Electron Ballistics"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.1: EX4_1.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 4.1\n",
+"//Calculation of acceleration,time taken,distance covered and kinetic energy of an accelerating proton\n",
+"\n",
+"//given values\n",
+" m=1.67*10^-27;//mass of proton in kg\n",
+" q=1.602*10^-19;//charge of proton in Coulomb\n",
+" v1=0;//initial velocity in m/s\n",
+" v2=2.5*10^6;//final velocity in m/s\n",
+" E=500;//electric field strength in V/m\n",
+" //calculation\n",
+" a=E*q/m;//acceleration\n",
+"disp(a,'acceleration of proton in (m/s^2) is:');\n",
+"t=v2/a;//time\n",
+"disp(t,'time(in s) taken by proton to reach the final velocity is:');\n",
+"x=a*t^2/2;//distance\n",
+"disp(x,'distance (in m)covered by proton in this time is:');\n",
+"KE=E*q*x;//kinetic energy\n",
+"disp(KE,'kinetic energy(in J) at the time is:');\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.2: electrostatic_deflectio.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 4.2\n",
+"//electrostatic deflection\n",
+"//given values\n",
+"V1=2000;//in volts,potential difference through which electron beam is accelerated\n",
+"l=.04;//length of rectangular plates\n",
+"d=.015;//distance between plates\n",
+"V=50;//potential difference between plates\n",
+"//calculations\n",
+"alpha=atan(l*V/(2*d*V1))*(180/%pi);//in degrees\n",
+"disp(alpha,'angle of deflection of electron beam is:');\n",
+"v=5.93*10^5*sqrt(V1);//horizontal velocity in m/s\n",
+"t=l/v;//in s\n",
+"disp(t,'transit time through electric field is:')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.3: electron_projected_at_an_angle_into_a_uniform_electric_field.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 4.3\n",
+"//electron projected at an angle into a uniform electric field\n",
+"//given values\n",
+"v1=4.5*10^5;//initial speed in m/s\n",
+"alpha=37*%pi/180;//angle of projection in degrees\n",
+"E=200;//electric field intensity in N/C\n",
+"e=1.6*10^-19;//in C\n",
+"m=9.1*10^-31;//in kg\n",
+"a=e*E/m;//acceleration in m/s^2\n",
+"t=2*v1*sin(alpha)/a;//time in s\n",
+"disp(t,'time taken by electron to return to its initial level is:')\n",
+"H=(v1^2*sin(alpha)*sin(alpha))/(2*a);//height in m\n",
+"disp(H,'maximum height reached by electron is:')\n",
+"s=(v1^2)*(2*sin(alpha)*cos(alpha))/(2*a);//displacement in m\n",
+"disp(s,'horizontal displacement(in m)when it reaches maximum height is:')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.4: motion_of_an_electron_in_a_uniform_magnetic_field.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 4.4\n",
+"//motion of an electron in a uniform magnetic field\n",
+"//given values\n",
+"V=200;//potential difference through which electron is accelerated in volts\n",
+"B=0.01;//magnetic field in wb/m^2\n",
+"e=1.6*10^-19;//in C\n",
+"m=9.1*10^-31;//in kg\n",
+"v=sqrt(2*e*V/m);//electron velocity in m/s\n",
+"disp(v,'electron velocity is:')\n",
+"r=m*v/(e*B);//in m\n",
+"disp(r,'radius of path (in m)is:')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.5: motion_of_an_electron_in_a_uniform_magnetic_field_acting_at_an_angle.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 4.5\n",
+"//motion of an electron in a uniform magnetic field acting at an angle\n",
+"//given values\n",
+"v=3*10^7;//electron speed\n",
+"B=.23;//magnetic field in wb/m^2\n",
+"q=45*%pi/180;//in degrees,angle in which electron enter field\n",
+"e=1.6*10^-19;//in C\n",
+"m=9.1*10^-31;//in kg\n",
+"R=m*v*sin(q)/(e*B);//in m\n",
+"disp(R,'radius of helical path is:')\n",
+"p=2*%pi*m*v*cos(q)/(e*B);//in m\n",
+"disp(p,'pitch of helical path(in m) is:')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.6: Magnetostatic_deflection.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 4.6\n",
+"//Magnetostatic deflection\n",
+"//given values\n",
+"D=.03;//deflection in m\n",
+"m=9.1*10^-31;//in kg\n",
+"e=1.6*10^-19;//in C\n",
+"L=.15;//distance between CRT and anode in m\n",
+"l=L/2;\n",
+"V=2000;//in voltsin wb/\n",
+"B=D*sqrt(2*m*V)/(L*l*sqrt(e));//in wb/m^2\n",
+"disp(B,'transverse magnetic field acting (in wb/m^2)is:')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.7: electric_and_magnetic_fields_in_crossed_configuration.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 4.7\n",
+"//electric and magnetic fields in crossed configuration\n",
+"//given values\n",
+"B=2*10^-3;//magnetic field in wb/m^2\n",
+"E=3.4*10^4;//electric field in V/m\n",
+"m=9.1*10^-31;//in kg\n",
+"e=1.6*10^-19;//in C\n",
+"v=E/B;//in m/s\n",
+"disp(v,'electron speed is:')\n",
+"R=m*v/(e*B);//in m\n",
+"disp(R,'radius of circular path (in m) when electric field is switched off')"
+ ]
+ }
+],
+"metadata": {
+ "kernelspec": {
+ "display_name": "Scilab",
+ "language": "scilab",
+ "name": "scilab"
+ },
+ "language_info": {
+ "file_extension": ".sce",
+ "help_links": [
+ {
+ "text": "MetaKernel Magics",
+ "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
+ }
+ ],
+ "mimetype": "text/x-octave",
+ "name": "scilab",
+ "version": "0.7.1"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu/5-Electron_Optics.ipynb b/A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu/5-Electron_Optics.ipynb
new file mode 100644
index 0000000..1124c95
--- /dev/null
+++ b/A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu/5-Electron_Optics.ipynb
@@ -0,0 +1,129 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 5: Electron Optics"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.1: Electron_refraction_calculation_of_potential_difference.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 5.1\n",
+"//Electron refraction, calculation of potential difference\n",
+"\n",
+"//given values\n",
+" V1=250;//potential by which electrons are accelerated in Volts\n",
+" alpha1=50*%pi/180;//in degree\n",
+" alpha2=30*%pi/180;//in degree\n",
+"b=sin(alpha1)/sin(alpha2);\n",
+" //calculation\n",
+"V2=(b^2)*V1;\n",
+"a=V2-V1;\n",
+"disp(a,'potential difference(in volts) is:');\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.2: Cyclotro.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 5.2&5.3\n",
+"//Cyclotron, calculation of magnetic induction,maximum energy\n",
+"\n",
+"//given values\n",
+" f=12*(10^6);//oscillator frequency in Hertz\n",
+" r=.53;//radius of the dee in metre\n",
+" q=1.6*10^-19;//Deuteron charge in C\n",
+" m=3.34*10^-27;//mass of deuteron in kg\n",
+" //calculation\n",
+"B=2*%pi*f*m/q;//\n",
+"disp(B,'magnetic induction (in Tesla) is:');\n",
+"E=B^2*q^2*r^2/(2*m);\n",
+"disp(E,'maximum energy to which deuterons can be accelerated (in J) is')\n",
+"E1=E*6.24*10^18/10^6;//conversion of energy into MeV\n",
+"disp(E1,'maximum energy to which deuterons can be accelerated (in MeV) is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.4: calculation_of_linear_separation_of_lines_formed_on_photographic_plates.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 5.4\n",
+"//Mass spectrograph, calculation of linear separation of lines formed on photographic plates\n",
+"\n",
+"//given values\n",
+" E=8*10^4;//electric field in V/m\n",
+" B=.55//magnetic induction in Wb/m*2\n",
+" q=1.6*10^-19;//charge of ions\n",
+" m1=20*1.67*10^-27;//atomic mass of an isotope of neon\n",
+" m2=22*1.67*10^-27;//atomic mass of other isotope of neon\n",
+" //calculation\n",
+"x=2*E*(m2-m1)/(q*B^2);//\n",
+"disp(x,'separation of lines (in metre) is:')"
+ ]
+ }
+],
+"metadata": {
+ "kernelspec": {
+ "display_name": "Scilab",
+ "language": "scilab",
+ "name": "scilab"
+ },
+ "language_info": {
+ "file_extension": ".sce",
+ "help_links": [
+ {
+ "text": "MetaKernel Magics",
+ "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
+ }
+ ],
+ "mimetype": "text/x-octave",
+ "name": "scilab",
+ "version": "0.7.1"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu/6-Properties_of_Light.ipynb b/A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu/6-Properties_of_Light.ipynb
new file mode 100644
index 0000000..775a29e
--- /dev/null
+++ b/A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu/6-Properties_of_Light.ipynb
@@ -0,0 +1,87 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 6: Properties of Light"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.1: Optical_path_calculatio.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 6.1\n",
+"//Optical path calculation \n",
+"\n",
+"//given values\n",
+"n=1.33;//refractive index of medium\n",
+"x=.75;//geometrical path in micrometre\n",
+" //calculation\n",
+"y=x*n;//\n",
+"disp(y,'optical path (in micrometre) is:')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.2: Coherence_length_calculation.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 6.2\n",
+"//Coherence length calculation \n",
+"\n",
+"//given values\n",
+"l=1*10^-14;//line width in metre\n",
+"x=10.6*10^-6;//IR emission wavelength in metre\n",
+" //calculation\n",
+"y=x^2/l;//\n",
+"disp(y,'coherence length(in metre) is:')"
+ ]
+ }
+],
+"metadata": {
+ "kernelspec": {
+ "display_name": "Scilab",
+ "language": "scilab",
+ "name": "scilab"
+ },
+ "language_info": {
+ "file_extension": ".sce",
+ "help_links": [
+ {
+ "text": "MetaKernel Magics",
+ "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
+ }
+ ],
+ "mimetype": "text/x-octave",
+ "name": "scilab",
+ "version": "0.7.1"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu/7-Interference_and_Diffraction.ipynb b/A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu/7-Interference_and_Diffraction.ipynb
new file mode 100644
index 0000000..33f53cd
--- /dev/null
+++ b/A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu/7-Interference_and_Diffraction.ipynb
@@ -0,0 +1,151 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 7: Interference and Diffraction"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.1: plane_parallel_thin_film.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 7.1\n",
+"//plane parallel thin film\n",
+"\n",
+"//given values\n",
+"x=5890*10^-10;//wavelength of light in metre\n",
+"n=1.5;//refractive index\n",
+"r=60*%pi/180;//angle of refraction in degree\n",
+" //calculation\n",
+"t=x/(2*n*cos(r));\n",
+"disp(t*10^6,'thickness of plate (in micrometre) is:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.2: wedge_shaped_thin_film.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 7.2\n",
+"//wedge shaped thin film\n",
+"\n",
+"//given values\n",
+"x=5893*10^-10;//wavelength of light in metre\n",
+"n=1.5;//refractive index\n",
+"y=.1*10^-3;//fringe spacing\n",
+" //calculation\n",
+"z=x/(2*n*y);//angle of wedge\n",
+"alpha=z*180/%pi;//conversion of radian into degree\n",
+"disp(alpha,'angle of wedge (in degree) is:');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.3: Newtons_ring_experiment.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 7.3\n",
+"//Newton's ring experiment- calculation of refractive index\n",
+"\n",
+"//given values\n",
+"D1=1.5;//diametre (in cm)of tenth dark ring in air\n",
+"D2=1.27;//diametre (in cm)of tenth dark ring in liquid\n",
+"\n",
+"\n",
+" //calculation\n",
+"n=D1^2/D2^2;\n",
+"disp(n,'refractive index of liquid is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.4: nonreflecting_film.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 7.4\n",
+"//nonreflecting film\n",
+"\n",
+"//given values\n",
+"l=5500*10^-10;//wavelength of light\n",
+"n1=1.33;//refractive index of water\n",
+"n2=1.52;//refractive index of glass window pane\n",
+"x=sqrt(n1);//to check if it is nonreflecting\n",
+"\n",
+" //calculation\n",
+"t=l/(4*n1);//thickness of water film required\n",
+"disp(t*10^6,'minimum thickness of film (in metre) is');"
+ ]
+ }
+],
+"metadata": {
+ "kernelspec": {
+ "display_name": "Scilab",
+ "language": "scilab",
+ "name": "scilab"
+ },
+ "language_info": {
+ "file_extension": ".sce",
+ "help_links": [
+ {
+ "text": "MetaKernel Magics",
+ "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
+ }
+ ],
+ "mimetype": "text/x-octave",
+ "name": "scilab",
+ "version": "0.7.1"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu/8-Polarization.ipynb b/A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu/8-Polarization.ipynb
new file mode 100644
index 0000000..f777a3b
--- /dev/null
+++ b/A_Textbook_Of_Engineering_Physics_by_M_N_Avadhanulu/8-Polarization.ipynb
@@ -0,0 +1,94 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 8: Polarization"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.2: Polarizer.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 8.2\n",
+"//Polarizer,calculation of angle\n",
+"\n",
+"//given values\n",
+"Io=1;//intensity of polarised light\n",
+"I1=Io/2;//intensity of beam polarised by first by first polariser\n",
+"I2=Io/3;//intensity of light polarised by second polariser\n",
+"\n",
+"\n",
+" //calculation\n",
+"a=acos(sqrt(I2/I1));\n",
+"alpha=a*180/%pi;//conversion of angle into degree\n",
+"disp(alpha,'angle between characteristic directions (in degree) is');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.3: calculation_of_birefringence.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clc;clear;\n",
+"//Example 8.3\n",
+"//calculation of birefringence\n",
+"\n",
+"//given values\n",
+"\n",
+"l=6*10^-7;//wavelength of light in metre\n",
+"d=3*10^-5;//thickness of crystal\n",
+"\n",
+"\n",
+" //calculation\n",
+" x=l/(4*d);\n",
+"disp(x,'the birefringance of the crystal is');"
+ ]
+ }
+],
+"metadata": {
+ "kernelspec": {
+ "display_name": "Scilab",
+ "language": "scilab",
+ "name": "scilab"
+ },
+ "language_info": {
+ "file_extension": ".sce",
+ "help_links": [
+ {
+ "text": "MetaKernel Magics",
+ "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
+ }
+ ],
+ "mimetype": "text/x-octave",
+ "name": "scilab",
+ "version": "0.7.1"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}