Aug 19, 2019

EVEN OR ODD NUMBER PROGRAM

                                         
even or odd computer program,even or odd C++ program
even or odd computer program

EVEN OR ODD NUMBER

Program number# 4
            Program which determine even or odd number
Program:

void main (void)
int num, mod;
prnitf(“enter a number”);
scanf(“%d”, &num);
mod=num%2;
if(mod ==0 )
printf(“the entered number is even ”);
else if(mod==1)
printf(“the entered number is odd”);
else
printf(“the entered is invalid”);
}

LOSS AND PROFIT PROGRAM


                                                      CONDITIONAL PROGRAM

loss and profit computer program, loss and profit C++ program
loss and profit computer program

                                                             LOSS AND PROFIT

Program number# 2
            Program that determine loss and profit
Program:

  void main (void
{
 int sale, cost;
  printf(“enter cost price”);
  scanf(“%d”, &cost);
  printf(“enter sale price”);
  scanf(“%d”, &sale);
  if (sale > cost)
  printf(“you are in profit”);
  else
  printf(“you are in loss”);
}

  This program will print the loss and profit of different things which can be sale.....

Aug 17, 2019

PERCENTAGE AND GRADE PROGRAM

percentage and grade computer program,percentage and grade C++ program
percentage and grade computer program

                             
 PERCENTAGE AND GRADE
Program number# 3  
            Program that determine percentage and grade
Program:

void main ( )
{
  int math, physic, chemistry, computer, total, sum, percentage;
  printf(“enter number obtained in math”);
  scanf(“%d”, &math);
  printf(“enter number obtained in physic”);
  scanf(“%d”, &physic);
  printf(“enter number obtained in chemistry”);
  scanf(“%d”, &chemistry);
  printf(“enter number obtained in computer”);
  scanf(“%d”, &computer);
  printf(“enter total number”);
   scanf(“%d”, &total);
   sum= math+ physic+ chemistry+ computer;
  percentage= sum/total*100;
  if (percentage> = 80)
  printf(“A+”);
 else  if (percentage > = 70 && percentage < =79)
  printf(“A”);
 else  if (percentage > = 60 && percentage < =69)
  printf(“B”);
else  if (percentage > = 50 && percentage < =59)
  printf(“C”);
else  if (percentage > = 40 && percentage < =49)
  printf(“D”);
 else if (percentage > = 33 && percentage < =39)
  printf(“E”);
else  if (percentage < =32)
  printf(“FAIL”);
else
  printf(“invalid numbers”);
}

COMPUTER PROGRAMS


COMPUTER PROGRAMMING
computer programs, computer programs in C++, C++ programs
computer programs

SUM AND AVERAGE

Program number# 1
            Program that takes 3 inputs and process it for sum and average and its printout.
Program:

void main (void)
{
  int num1, num2, num3, sum;
  float avg;
  printf(“enter 1st  number”);
  scanf(“%d”,&num1);
  printf(“enter 2nd   number”);
  scanf(“%d”,&num2);
  printf(“enter 3rd   number”);
  scanf(“%d”,&num3);
 sum= num1+num2+num3;
avg=sum/3.0;
printf(“sum of given number is =%d \n average of given number is = %f”, sum, avg);
}

                                    CONDITIONAL PROGRAM
                                    LOSS AND PROFIT
Program number# 2
            Program that determine loss and profit
Program:

  void main (void
{
 int sale, cost;
  printf(“enter cost price”);
  scanf(“%d”, &cost);
  printf(“enter sale price”);
  scanf(“%d”, &sale);
  if (sale > cost)
  printf(“you are in profit”);
  else
  printf(“you are in loss”);
}

                                    PERCENTAGE AND GRADE
Program number# 3  
            Program that determine percentage and grade
Program:

void main ()
{
  int math, physic, chemistry, computer, total, sum, percentage;
  printf(“enter number obtained in math”);
  scanf(“%d”, &math);
  printf(“enter number obtained in physic”);
  scanf(“%d”, &physic);
  printf(“enter number obtained in chemistry”);
  scanf(“%d”, &chemistry);
  printf(“enter number obtained in computer”);
  scanf(“%d”, &computer);
  printf(“enter total number”);
   scanf(“%d”, &total);
   sum= math+ physic+ chemistry+ computer;
  percentage= sum/total*100;
  if (percentage> = 80)
  printf(“A+”);
 else  if (percentage > = 70 && percentage < =79)
  printf(“A”);
 else  if (percentage > = 60 && percentage < =69)
  printf(“B”);
else  if (percentage > = 50 && percentage < =59)
  printf(“C”);
else  if (percentage > = 40 && percentage < =49)
  printf(“D”);
 else if (percentage > = 33 && percentage < =39)
  printf(“E”);
else  if (percentage < =32)
  printf(“FAIL”);
else
  printf(“invalid numbers”);
}


                                    EVEN OR ODD NUMBER

Program number# 4
            Program which determine even or odd number
Program:

void main (void)
int num, mod;
prnitf(“enter a number”);
scanf(“%d”, &num);
mod=num%2;
if(mod ==0 )
printf(“the entered number is even ”);
else if(mod==1)
printf(“the entered number is odd”);
else
printf(“the entered is invalid”);
}

ITERATION PROGRAM
NAME PRINT
Program number# 5
            A program which print and name or statement number of times
Program:
  void main (void)
{
int a:
for (a=1;a<=10;a=a++)
printf(“its thrown out gadgets”);
}

This program will print the sentence ‘its thrown out gadgets’ 10 times.

                                                TABLE
Program number# 6
            Program which print table of given number.
Program:

void main(void)
{
int num, product,a;
printf(“enter a number ”);
scanf(“%d”, &num);
for (a=1;a<=10;a=a++)
{
product= num*a;
printf (“%d x %d = %d”, num, a, product );
}
}

 

























Aug 11, 2019

TRANSISTOR


TRANSISTOR:
  The term transistor made up of two different word ‘tran’ and ‘sistor’, where ‘tran’ means transfer and ‘siistor’ means resistor. Thus transistor is an electronic material which is used to transfer of resistor. And it was invented in late 1947.

TYPES:
  There are two mean type of resistor,
          a.       BJT transistor (Bipolar Junction Transistor)
          b.      FET transistor (Field Effect Transistor)
From where this two are subdivided into two separate types
For BJT transistor it is divided into (1) npn transistor (2) pnp transistor.
For FET transistor it subdivided into (1) MOSFET transistor (2) JFET transistor.
But here we going to see about BJT transistor npn and pnp transistor

CONSTRUCTION:
BJT Transistor
npn transistor,pnp transistor
transistor diagram
  BJT transistor is mainly consist of three terminals ( Base, Collector, Emitter)
  Ø  Its consist of two pn junction layer (1) Base-emitter junction (2) Collector base junction
  Ø  The base junction is highly doped highly doped mean region have high amount of electrons.
  Ø  Collector is moderately doped.
  Ø  Emitter is heavily doped
  Ø  The base region area is thin
  Ø  The collector region area is wider
     Ø  The emitter region area is greater than base region but less than collector region. 
npn transistor,pnp transistor
npn transistor


Jul 31, 2019

ZENER DIODE


ZENER DIODE:
 Zener diode is used as a voltage regulator. It provides stable reference at the output and operated always in reversed bias direction. The PN junction is heavily doped to construct the Zener diode, when we diode operated in reversed bias the early breakdown is called Zener breakdown, it’s a normal breakdown  all the application is operated in this breakdown after applying higher voltage then the breakdown changed in avalanche breakdown now in this breakdown the diode then not able to use again. The breakdown as
zener diode model
Zener diode
 AVALANCHE BREAKDOWN:
 In this breakdown the voltage is greater than the Zener voltage and hence it damaged and flow maximum voltage. Once time a diode is operated in avalanche breakdown than it can’t use another time it became useless.
ZENER BREAKDOWN:
Diode can be used again if it operated one time in Zener breakdown, in this breakdown the voltage is less than the avalanche breakdown the application is run in Zener test current region. If we considered that the Zener breakdown is operated in 5V than the avalanche is must greater then 5V. 
ZENER IMPENDENCE:
 The total resistance in a circuit is called impendence
From ohm,
                V=IR
And 
                 R=V/I
Where
                 R=Zz, V=Vz, I=Iz
Hence Zener impendence 
                 Zz=∆Vz/∆Iz  
NUMERIC 1:
A Zener diode exhibit a certain changed in Vz for a certain Changed in Iz on a portion of the linear characteristic curve between Izk and IzM in fig. what is the Zener impendence 

Solution:
              ∆Vz= 50mV
              ∆Iz= 5mA
               Zz=?
Here Zener impendence (Zz)=  ∆Vz/∆Iz 
              Zz= 50mV/5mA
                   = 10Ω
   

POWER SUPPLY FILTRATION(Capacitor as a filter)


POWER SUPPLY FILTRATION:
  When we convert AC into DC we had a problem that the signal has two states as shown fig (a) but we need straight line DC signal as shown in Fig (b).

Here we need something material that changed the eliminate the states and changed into a straight line as in fig (b) for this reason we use power supply filter which will be a capacitor.

CAPACITOR AS A FILTER:
   We used a capacitor with suitable farad (farad is unit of capacitor) as the capacitance of capacitor is high make a perfect DC where capacitance is the capability of storing charges or current.
Capacitor as a filter,power supply filtration
Capacitor as a filter

After placing capacitor the output signal will like as shown in fig.

Where the value of r, V(rect), Vdc, Vrp.p is given below


Numeric 1:

  Determine the ripple factor for the filtered bridge rectifier with the load indicated in fig.

Data:
        Vin = 120Vrms
         Frequency =120Hz
        Number of turn = = 10/1 = 0.1
        Capacitance = C= 100µf
        Limiting resistance = RL =220
       Ripple factor = r =?




BRIDGE RECTIFIER


BRIDGE RECTIFIER:
 In replacement of full wave rectifier we use Full wave bridge rectifier for rectification, change AC to DC current. But the question is here why we replace full wave rectifier, because bridge rectifier is more reliable than full wave it provide quantity of DC current as output. Overall the phenomenon of working of bridge is likely as full wave.

CONSTRUCTION:
bridge rectifier,full wave bridge rectifier
Bridge rectifier

DERIVATION:
          (1)     Vavg =Area/time =  2Vp /ㄫ

          (2)     Vpout = Vpsec – 1.4 where
            Vpsec = Number of turn * primary volt = ղ *Vpri
               If the primary voltage is given in rms then to find Vpri, multiply the rms value to 
              under root 2. same process goes for Vpsec
               Such as   Vpri = √2 *Vrms  
           (3)    PIV= Vpout + 0.7
NUMERIC =1

  Determine the peak output voltage for the bridge rectifier. Assuming the practical model. What PIV rating is required for the diodes? The transformer is specified to have a 12rms secondary voltage for the standard 120V across the primary.
Data:
                Vrms = 12V
                Vpout =?
Solution:
                Vpout = Vpsec – 1.4 where
                Vpsec =√2*12V 
                           = 16.97V
So
                 Vpout =16.97 -1.4
                            = 15.57V
And PIV required is
                  PIV = Vpout+ 0.7
                         = 15.57 + 0.7
                         = 16.2V

PEAK VOLTAGE:
                  P=V/I
            and I =P/V

HALF WAVE RECTIFIER


HALF WAVE RECTIFIER:
  Half wave rectifier is used to convert AC to DC. In half wave rectifier we use only on diode for rectification.Which gives high amount of ripple factor and only conduct either negative voltage or positive. it operate only one direction current due to use of only one diode.

CONSTRUCTION:
Half wave rectifier,What is half wave rectifier
Half wave rectifier

The signal of input and output shown in fig.

Half wave rectifier,What is half wave rectifier
Half wave rectifier

DERIVATION:

  First of all when we convert the AC to DC there should be a Vdc or Vavg to find Vavg we have
Half wave rectifier,What is half wave rectifier,numeric of Half wave rectifier
Half wave rectifier
                         

                                       (2)    Vp (out) = Vavg - 0.7

And 
                                       (3)     Peak inverse voltage = VIP
`                                                   VIP = Vp (in)


Numeric 1:
   What is the average value of half wave rectifier voltage?
Data:
            Peak voltage = Vp= 50V
            Pie = π =3.14
                  Vavg =Vdc =?
Solution:
                 Vavg= Vp/π
                 Vavg = 50/3.14
                          = 15.92V



Jul 25, 2019

DIODE MODELS WHEN IT IS IN REVERSED BIAS:


DIODE MODELS WHEN IT IS IN REVERSED BIAS:
Same like forward biasing in reversed biasing we study about three models of diode.
      1.      Ideal model
      2.      Practical model
      3.      Complete model

IDEAL MODEL:
  In ideal model of diode in reversed bias we keep
diode model, diode, what is diode
diode model
 ‘ Ir’ is zero such as
Ir = 0
So by applying K.V.L rule we got the equation which is
Vbias – Vrlimit – Vr=0
Here
Vrlimit = Ir. Rlimit
And Ir is zero so Vrlimit also become zero
Hence
Vbias – 0 – Vr= 0
Vr = Vbias

PRACTICAL MODEL:
  In practical model the ’Ir’ remains zero such as
Ir = 0
diode model, diode, what is diode
diode model
So by applying K.V.L rule we got the equation which is
Vbias – Vrlimit – Vr=0
Here
Vrlimit = Ir. Rlimit
And Ir is zero so Vrlimit also become zero
Hence
Vbias – 0 – Vr= 0
Vr = Vbias



diode models, diode,what is diode
diode model
COMPLETE MODEL:
  In complete we considered all the resistance in circuit so there will be a value for ‘Ir’ which will greater than zero so ‘Ir’ will be something
Ir 0
By applying K.V.L rule we got 
Vbias – Vrlimit – Vr =0
Here
 Vrlimit = Ir. Rlimit and Ir 0
So
Vr = Vbias – Vrlimit