You are on page 1of 99

II Yr/III Sem

PART-A

ACADEMIC YEAR: 2016-2017(ODD SEM)

PART - A
YEAR/SEM: II/III

BATCH: 2015 2019


IT T32 ELECTRONICS DEVICES AND CIRCUITS
2 MARKS

UNIT I
1. What is a diode?
Diode Di + ode
Di means two and ode means electrode. So physical contact of two electrodes is known as diode
and its important function is alternative current to direct current.
2. State the applications of a diode
Some of the typical applications of diodes include:

Rectifying a voltage, such as turning AC in to DC voltages


Isolating signals from a supply
Voltage Reference
Controlling the size of a signal
Mixing signals
Detection signals
Lighting

3. Draw the equivalent circuit of a diode?

4. What is break-over voltage


in a diode
The voltage at which the carriers
in the transition region are
accelerated by the electric field
which is sufficient enough to free
electron-hole pairs via is called
break over voltage in a diode.
5. Draw the neat diagram of forward bias?

MVIT/Dept of IT/2016-2017/ ODD SEM

II Yr/III Sem

PART-A

6. Draw the diode reverse bias diagram?

7. Define depletion region.


Depletion layer grows wider around the PN junction due to a lack of electrons and holes and
presents a high impedance path, almost an insulator. The result is that a high potential barrier is
created thus preventing current from flowing through the semiconductor material.
8. Explain barrier voltage.
A suitable positive voltage (forward bias) applied between the two ends of the PN junction can
supply the free electrons and holes with the extra energy. The external voltage required to
overcome this potential barrier that now exists is very much dependent upon the type of
semiconductor material used and its actual temperature. Typically at room temperature the
voltage across the depletion layer for silicon is about 0.6 - 0.7 volts and for germanium is about
0.3 - 0.35 volts. This potential barrier will always exist even if the device is not connected to any
external power source.

9. What do you mean rectifiers?


A rectifier is an electrical device that converts alternating current (AC), which periodically
reverses direction, to direct current (DC), which flows in only one direction. The process is
known as rectification.
MVIT/Dept of IT/2016-2017/ ODD SEM

II Yr/III Sem

10.

Write down the formulas for rectifier efficiency and ripple factor?

11.

Explain in detail on half-wave rectifier?

PART-A

When a single rectifier diode unit is placed in series with the load across an ac supply, it converts
alternating voltage into uni-directional pulsating voltage, using one half cycle of the applied
voltage, the other half cycle being suppressed because it conducts only in one direction. Unless
there is an inductance or battery in the circuit, the current will be zero, therefore, for half the
time. This is called half-wave rectification.
12.

What is meant be ripple factor?

The ripple factor for a Full Wave Rectifier is given by

The average voltage or the dc voltage available across the load resistance is

RMS value of the voltage at the load resistance is

15.
What are the advantages of zener diode
The main application of zener diodes are as voltage regulator, as a fixed reference voltage in
transistor biasing circuit, as peak clipper or limiters in wave shaping circuits and as a protector of
volt meter damages.
MVIT/Dept of IT/2016-2017/ ODD SEM

II Yr/III Sem

PART-A

Overvoltage protection is done by using Zener diodes because there is current flowing through
the diode after the reverse bias voltage exceeds a certain value. This circuit provides safety for
the equipment connected at the terminals. Normally the current should not exceed normal valve
but if due to any fault in the circuit the current exceeds the maximum allowable limit, the
equipment of the system can be damaged permanently.
16.

Draw the symbolic representation of zener diode and normal PN diode?

Zener doide

PN diode
17.

Define clippers?

Clipping circuits (also known as limiters, amplitude selectors, or slicers), are used to remove
the part of a signal that is above or below some defined reference level.
18.

Define clampers?

Clamping circuits, also known as dc restorers or clamped capacitors, shift an input signal by
an amount defined by an independent voltage source. While clippers limit the part of the input
signal that reaches the output according to some reference level(s), the entire input reaches the
output in a clamping circuit it is just shifted so that the maximum (or minimum) value of the
input is clamped to the independent source.
19.

Write a short note on voltage multipliers and list their types?

Voltage Multipliers are simple circuits made from diodes and capacitors that can increase the
input voltage by two, three, or four times and by cascading together individual half or full stage
multipliers in series to apply the desired DC voltage to a given load without the need for a stepup transformer.
Voltage multiplier circuits are classified as voltage doublers, triplers, or quadruplers, etc,
depending on the ratio of the output voltage to the input voltage.
20.

Explain voltage doublers

Voltage Doubler is a voltage multiplier circuit which has a voltage multiplication factor of two.
The circuit consists of only two diodes, two capacitors and an oscillating AC input voltage (a
MVIT/Dept of IT/2016-2017/ ODD SEM

II Yr/III Sem

PART-A

PWM waveform could also be used). This simple diode-capacitor pump circuit gives a DC
output voltage equal to the peak-to-peak value of the sinusoidal input. In other words, double the
peak voltage value because the diodes and the capacitors work together to effectively double the
voltage.
21.

Explain voltage tippler with its diagram

A voltage tripler circuit consists of one and a half voltage doubler stages. This voltage
multiplier circuit gives a DC output equal to three times the peak voltage value (3Vp) of the
sinusoidal input signal. As with the previous voltage doubler, the diodes within the voltage tripler
circuit charge and block the discharge of the capacitors depending upon the direction of the input
half-cycle.
Then 1Vpis dropped across C3 and 2Vp across C2 and as the two capacitors are in series, this
results in the load seeing a voltage equivalent to 3Vp. Note that the real output voltage will be
three times the peak input voltage minus the voltage drops across the diodes used, 3Vp
V(diode).
If a voltage tripler circuit can be made by cascading together one and a half voltage multipliers,
then aVoltage Quadrupler Circuit can be constructed by cascading together two full voltage
doubler circuits as shown.
22.

Draw the neat diagram for voltage quadrupler?

MVIT/Dept of IT/2016-2017/ ODD SEM

II Yr/III Sem

PART-A

UNIT II
1. Define thyristors?
A thyristor is normally four layer three-terminal device. Four layers are formed by alternating
n type and p type semiconductor materials. Consequently there are three p n junctions
formed in the device. It is a bistable device. The three terminals of this device are called anode
(A), cathode (K) and gate (G) respectively. The gate (G) terminal is control terminal of the
device. That means, the current flowing through the device is controlled by electrical signal
applied to the gate (G) terminal. The anode (A) and cathode (K) are the power terminals of the
device handle the large applied voltage and conduct the major current through the thyristor.
2. What are unidirectional thyristors
The thyristors which conduct in forward direction only are called as unidirectional thyristors. Ex:
SCR, Light Activated SCR (LASCR) and silicon control switch (SCS).
3. State the applications of thyristors

MVIT/Dept of IT/2016-2017/ ODD SEM

II Yr/III Sem

PART-A

A thyristor is designed to handle large current and voltage, it is used mainly in electrical power
circuit with system voltage more than 1 kV or currents more than 100 A. The main advantage of
using thyristors as power control device is that as the power is controlled by periodic on off
switching operation hence (ideally) there is no internal power loss in the device for controlling
power in output circuit. Thyristors are commonly used in some alternating power circuits to
control alternating output power of the circuit to optimize internal power loss at the expense of
switching speed.
4. Write a short note on SCR with its applications
The SCR stand for Silicon Control Rectifier, it is used in industries because it can handle high
values of current and voltage. Three terminals of SCR are
Anode - P-layer
Cathode - N-layer (opposite end)
Gate - P-layer near the cathode
Hence it has three junctions and four layers
Application

5.

SCR as a switch
SCR Half and Full wave rectifier
SCR as a static contactor
SCR for power control
SCR for speed control of d.c. shunt motor
Over light detector
Draw the neat diagram of SCR with its equivalent circuit of SCR

6. Draw the curve of forward and reverse characteristics of SCR

MVIT/Dept of IT/2016-2017/ ODD SEM

II Yr/III Sem

PART-A

7. Define the forward breakdown voltage of SCR


When anode is +ve w.r.t cathode the curve between V & I is called Forward characteristics.
OABC is the forward characteristics of the SCR at Ig =0. if the supplied voltage is increased
from zero point A is reached .SCR starts conducting voltage across SCR suddenly drops (dotted
curve AB) most of supply voltage appears across RL

8. What is the method to trigger the SCR


The Silicon Control Rectifier SCR is normally operated below the forward break over voltage
(VBO). To turn ON the Silicon Control Rectifier SCR we apply clock pulse at the gate terminal
which called triggering of Silicon Control Rectifier, but when the Silicon Control Rectifier SCR
turned ON, now if we remove the triggering voltage, the Silicon Control Rectifier SCR will
remain in ON state. This voltage is called Firing voltage.
9. Write a short note on uni-junction transistor (UJT)?
Unijunction transistor (abbreviated as UJT), also called the double-base diode is a 2-layer, 3terminal solid-state (silicon) switching device. The device has-a unique characteristic that when
it is triggered, its emitter current increases generatively (due to negative resistance characteristic)
until it is restricted by emitter power supply. Since the device has one pn junction and three leads
it is commonly called UJT.
10.

Draw UJT and its equivalent circuit

MVIT/Dept of IT/2016-2017/ ODD SEM

II Yr/III Sem

PART-A

11. State the application of UJT?


Relaxation oscillators.
Switching Thyristors like SCR, TRIAC etc.
Magnetic flux sensors.
Voltage or current limiting circuit.
Bistable oscillators.
Voltage or current regulators.
Phase control circuits.
12.

Draw the characteristic curve of UJT?

13.
Write a note on LED?
A light emitting diode (LED) is known to be one of the best optoelectronic devices out of the lot.
The device is capable of emitting a fairly narrow bandwidth of visible or invisible light when its
internal diode junction attains a forward electric current or voltage. The visible lights that an
LED emits are usually orange, red, yellow, or green. The invisible light includes the infrared
MVIT/Dept of IT/2016-2017/ ODD SEM

II Yr/III Sem

PART-A

light. The biggest advantage of this device is its high power to light conversion efficiency. That
is, the efficiency is almost 50 times greater than a simple tungsten lamp.
14.

With neat diagram, explain LCD?

Liquid crystal cell displays (LCDs) are used in similar applications where LEDs are used.
These applications are display of numeric and alphanumeric characters in dot matrix and
segmental displays.
The LCDs are of two types :
Dynamic scattering type and
Field effect type.
The liquid crystal material may be one of the several organic compounds which exhibit optical
properties of a crystal though they remain In liquid form. Liquid crystal is layered between glass
sheets with transparent electrodes deposited on the inside faces. When a potential is applied
across the cell, charge carriers flowing through the liquid disrupt the molecular arrangement and
produce turbulence. When the liquid is not activated, it is transparent. When the liquid is
activated the molecular turbulence causes light to be scattered in all directions and the cell
appears to be bright. The phenomenon is called dynamic scattering.
The construction of a field effect liquid crystal display is similar to that of the dynamic scattering
type, with the exception that two thin polarizing optical filters are placed at the inside of each
glass sheet. The liquid crystal material in the field effect cell is also of different type from that
employed in the dynamic scattering cell. The material used is twisted nematic type and actually
twists the light passing through the cell when the latter is not energized. This allows the light to
pass through the optical filters and the cell appears bright. When the cell is energized, no twisting
of light takes place and the cell appears dull.
15.

Explain schottky Barrier diode


A Schottky diode, also known as a hot carrier diode, is a semiconductor diode which has

low forward voltage drop and a very fast switching action. There is a small voltage drop across
the diode terminals when current flows through a diode. A normal diode will have a voltage drop
between 0.6 to 1.7 volts, while a Schottky diode voltage drop is usually between 0.15 and 0.45
volts. This lower voltage drop provides better system efficiency and higher switching speed. In a
Schottky diode, a semiconductormetal junction is formed between a semiconductor and a metal,
thus creating a Schottky barrier. The N-type semiconductor acts as the cathode and the metal

MVIT/Dept of IT/2016-2017/ ODD SEM

10

II Yr/III Sem

PART-A

side acts as the anode of the diode. This Schottky barrier results in both a low forward voltage
drop and very fast switching.
16. Write a note on varactor diode
Varactors are operated in a reverse-biased state. No current flows, but since the thickness of the
depletion zone varies with the applied bias voltage, the capacitance of the diode can be made to
vary. Generally, the depletion region thickness is proportional to the square root of the applied
voltage; capacitance is inversely proportional to the depletion region thickness. Thus, the
capacitance is inversely proportional to the square root of applied voltage. All diodes exhibit this
phenomenon to some degree, but varactor diodes are manufactured specifically to exploit this
effect and increase the capacitance (and thus the range of variability), whereas most ordinary
diode fabrication strives to minimize the capacitance. A varactor diode is best explained as a
variable capacitor. Think of the depletion region as a variable dielectric. The diode is placed in
reverse bias. Junction capacitance is present in all reverse biased diodes because of the depletion
region.
17. Write briefly on Tunnel diode.
A tunnel diode or Esaki diode is a type of semiconductor that is capable of very fast operation,
well into the microwave frequency region, made possible by the use of the quantum mechanical
effect called tunneling.
It was introduced by Leo Esaki in 1958.Heavily-doped p-n junction.Impurity concentration is
1part in 10^3 as compared to 1 part in 10^8 in p-n junction diode.Width of the depletion layer is
very small (about 100 A). It is generally made up of Ge andGaAs.
18. With neat diagram, explain photo-diode
Photo junction Devices are basically PN-Junction light sensors or detectors made from silicon
semiconductor PN-junctions which are sensitive to light and which can detect both visible light
and infra-red light levels.
19. With neat diagram, explain photo-transistor
An alternative photo-junction device to the photodiode is the Phototransistor which is basically a
photodiode with amplification. The Phototransistor light sensor has its collector-base PNjunction reverse biased exposing it to the radiant light source. Figure 5.38 Photo-transistor
Symbol. Phototransistors operate the same as the photodiode except that they can provide current
gain and are much more sensitive than the photodiode with currents are 50 to 100 times greater
than that of the standard photodiode and any normal transistor can be easily converted into a
phototransistor light sensor by connecting a photodiode between the collector and base.
MVIT/Dept of IT/2016-2017/ ODD SEM

11

II Yr/III Sem

PART-A

Phototransistors consist mainly of a bipolar NPN Transistor with its large base region electrically
unconnected, although some phototransistors allow a base connection to control the sensitivity,
and which uses photons of light to generate a base current which in turn causes a collector to
emitter current to flow. Most phototransistors are NPN types whose outer casing is either
transparent or has a clear lens to focus the light onto the base junction for increased sensitivity.

UNIT III
1. Write the Hybrid parameters equation for transistor amplifier?
Vi= hi Ii + hrVo
Io = hfIi + hoVo
In matrix

2.
Why hybrid parameters are called so? Define them?
The dimensions of the hybrid parameters are not alike, that is they are hybrid in nature so they
are called hybrid parameters.
h11 = [ V1/I1] at V2=0; h11 = Input impedance with output port short circuited.
h12 = [ V1/V2] at I1=0; h12 = Reverse voltage gain with input port open circuited.
h21 = [ I2/I1] at V2=0; h11 = Forward current gain with output port short circuited.
h22 = [ I2/V2] at I1=0; h11 = output impedance with input port open circuited.
3.

Draw a two port network and write the h-parameter equation

Hybrid equation:
Vi= hi Ii + hr Vo
Io = h f Ii + ho V o
4.Draw a CE amplifier and its hybrid representation?

MVIT/Dept of IT/2016-2017/ ODD SEM

12

II Yr/III Sem

5.

Draw a CC amplifier & its hybrid equivalent circuit

6.

Draw a CB amplifier & its hybrid equivalent circuit

7.

What is an amplifier?

PART-A

An amplifier is a circuit, which can be used to increase the amplitude of the input current or
voltage at the output by means of energy drawn from an external source.
8. Based on the transistor configuration how amplifiers are classified.
Based on transistor configuration, the amplifier are classified as
a. Common Emitter amplifier
b. Common Collector amplifier
c. Common Base amplifier
8. List out the classification of large signal amplifiers?
The large signal amplifiers are classified as follows.
a. Based on the input
i. small signal amplifiers
ii. large signal amplifiers
b. Based on the output
I. Voltage amplifier
II. Power amplifier
III. Current amplifier
c. Based on the transistor configuration
I. CE amplifier
II. CB amplifier
III. CC amplifier
d. Based on the number of stages
MVIT/Dept of IT/2016-2017/ ODD SEM

13

II Yr/III Sem

PART-A

I. Single stage amplifier


II. Multistage amplifier
e. Based on the Bandwidth
I. Untuned amplifier (wide band amplifier)
II. Tuned amplifier (narrow band amplifier)
f. Based on the frequency response
I. AF (Audio frequency) amplifier
II. IF (Intermediate frequency) amplifier
III. RF (Radio Frequency) amplifier
g. Based on the Biasing condition
I. Class A amplifier
II. Class B amplifier
III. Class C amplifier
IV. Class AB amplifier
V. Class D amplifier
VI. Class S amplifier
9.

What is the need for cascade amplifier?

For faithful amplification

When the amplification of single stage is not sufficient.

When the input or output impedence is not of the correct magnitude , for a particular
application 2 or more stages are connected.
10. What are the marits of cascade amplifier?

Very Compact circuit


Excellent frequency response.
Cheaper in cost

11. What is the effect of cascading on the bandwidth of an amplifier?

Gain increases
Bandwidth reduces

12. What is power amplifier?


A power amplifier is an electronic device that receives an electrical signal and reprocesses it to
amplify, or increase, its power.
13.

What are the classification of power amplifier?

Class A
Class B
Class C
Class D
Class AB

MVIT/Dept of IT/2016-2017/ ODD SEM

14

II Yr/III Sem

14.

PART-A

List the different applications of power amplifier?

Public address systems,


Sound reinforcement systems,
Stereo or home-theatre system.
Guitar amplifiers
Instrument amplifier
Keyboard amplifiers

15. What is class A power amplifier?


Class A power amplifier is a type of power amplifier where the output transistor is ON full
time and the output current flows for the entire cycle of the input wave form.
16. What are the Advantages & Disadvantages of Class A power amplifier?
Advantages
-The circuit is simple to design and to implement
-The load is connected directly in the collector circuit hence the output transformer is not
necessary. This makes the circuit cheaper.
Disadvantages
The load resistance is directly connected in collector and carries the quiescent collector
current. This causes considerable wastage of power.
Power dissipation is more. Hence power dissipation arrangements like heat sink are
essential.
The output impedances is high hence circuit cannot be used for low impedance loads,
such as loudspeakers.
The efficiency is very poor, due to large power dissipation
17. What is class B power amplifier?
Class B amplifier is a type of power amplifier where the active device (transistor) conducts
only for one half cycle of the input signal. That means the conduction angle is 180 for a Class
B amplifier.
18. Define Transformer coupled amplifier;
An amplifier where the load is coupled to the output using a transformer is called a
transformer coupled amplifier. Using transformer coupling the efficiency of the amplifier
can be improved to a great extent.
19. What is class C power amplifier?
Class C power amplifier is a type of amplifier where the active element (transistor) conduct
for less than one half cycle of the input signal. Less than one half cycle means the
conduction angle is less than 180 and its typical value is 80 to 120.
20. What is class D power amplifier?
Class D power amplifier is a type of audio amplifier were the power handling devices are
MVIT/Dept of IT/2016-2017/ ODD SEM

15

II Yr/III Sem

PART-A

operated as binary switches. Since the power handling devices (MOSFETS) works as
perfect binary switches, no time is wasted in between the transition of stages and no power
is wasted in the zero input condition. Class D power amplifiers are much power efficient
when compared to its predecessors like Class A, Class B and Class AB.
21. What is class AB power amplifier?
Class AB amplifier is an amplifier configuration that stands somewhere between Class A
and Class B configurations.
22. What is the difference between voltage amplifier and power amplifier?

23.

S.No

Characteristics

Voltage Amplifier

Power Amplifier

Current Gain

High, exceeding 100

Low 20-50

Collector Load

High about 10K

Low 5-20

Input Voltage

Low, a few mV

High, 2-4V

Collector Current

Low about 1mA

High exceeding 100mA

Power output

Low

High

Power dissipation
capacity

Less than 0.5W

More than 0.5W

Output Impedence

High about 10K

Low about 200

Coupling

Usually RC coupling

Transformer or tuned
circuit

Define power amplifier Efficiency.

The efficiencyof an amplifier represents the amount of a,c power delivered or transferred to
the load, from thed.c source i.e accepting the d.c. power input.
The generalisedexpression for an efficiency of an amplifier is,
24. List the difference of Class A,B,C &AB power amplifier
Class
Conduction
Angle

A
360o

180o

AB

Less than 90o

180 to 360o
In

Position of
the Q-point

Centre Point of Exactly


the Load Line

X-axis

on

the Below
X-axis

the

between

X-axis and the


Centre

Load

Line
MVIT/Dept of IT/2016-2017/ ODD SEM

the

16

II Yr/III Sem

Overall
Efficiency
Signal
Distortion

PART-A

Poor

Better

25 to 30%

70 to 80%

None if Correctly At
Biased

Higher

the

than 80%

X-axis

Crossover Point

Large Amounts

Better

than

but less than B


50 to 70%
Small Amounts

25. Write the two types of class A amplifier.


There are 2 types. i. Series fed or directly coupled class A amplifier
ii. Transformer coupled class A amplifier
In directly coupled type, the load is directly connected in the collector circuit. While in the
transformer coupled type, the load is coupled to the collector using a transformer called an
output transformer
26. Differentiate between class A and transformer coupled class A amplifiers in terms of
(a)operating point and (b) efficiency.

27.

Sl.No.

Class A amplifier

Transformer coupled class Aamplifier

Max. Efficiency is 25%.

Max. Efficiency is 50%.

Q point is center of load line

Q point is center of load

(VCEQ,ICQ) where VCEQ = VCC ICQRL

line(VCEQ,ICQ) where VCEQ = VCC

What are the Advantages & Disadvantages of Class B power amplifier?

Advantages

The efficiency is much highe than Class A operation.


When there is no input signal, the power dissipation is zero.
The even harmonics get cancelled. This reduces the harmonic distortion.
As the d.c current components flow in opposite direction through the primary winding, there
is no passibilty of d.c saturation of the core.

Disadvantages
Two centre tap transformers are necessary
The transformers, make the circuit bulky and hence costlier.
Frequency response is poor.
28. What is meant by cross over distortion in class B power amplifier and how it is
corrected? (OR) What is called as crossover distortion and how to minimize this
distortion?
MVIT/Dept of IT/2016-2017/ ODD SEM

17

II Yr/III Sem

PART-A

Transistors do not turn ON below 0.7V applied to the emitter junction. Therefore the
sinusoidal base voltage excitation will not result in the sinusoidal output current. This cause
one transistor off before the other begins on. This distortion is introduced during the time
when the operation crosses over from one transistor to the other transistor. This effect is called
cross-over distortion.
To overcome cross-over distortion, the transistors must operate in class AB mode where a
small standby current flows at zero excitation.
29. What are the Applications of Class C power amplifier?

RF oscillators.

RF amplifier.

FM transmitters.

Booster amplifiers.

High frequency repeaters.

Tuned amplifiers etc.


30. What is the significance of heat sink in power devices?
Thus practically it is necessary to keep the junction temperature less than
specified for the power transistor used in the power amplifier
The heat sink draws heat from the power transistor via thermal condition and expels the
heat into the ambient air via thermal convection and heat radiation.
The figure below shows a power transistor with a heat sink.
31. Mention any two parameters to be considered for designing the heat sink.
J-A is the total thermal resistance from transistor junction to the ambient temperature. J-C is
the thermal resistance for power transistor.
C-A is the thermal resistance for Insulator.
32. What is distortion in power amplifiers?

Distortion: The difference between the output waveform and the input waveform in an

amplifier.

Harmonic distortion: Due to non-linearity, the output waveform of an amplifier will be

slightly different from the a.c. input waveform.

Frequency distortion: If the signal components at different frequencies are amplified by

different amounts.

Phase or delay distortion: If the phase shift between input and output waveforms depends

upon the signals of different frequencies.

Cross-over distortion: Transistors do not turn ON below 0.7V applied to the emitter

MVIT/Dept of IT/2016-2017/ ODD SEM

18

II Yr/III Sem

PART-A

junction. Therefore the sinusoidal base voltage excitation will not result in the sinusoidal
output current. This cause one transistor off before the other begins on. This distortion is
introduced during the time when the operation crosses over from one transistor to the other
transistor.
33. Why do you call FET as field effect transistor?
The name field effect is derived from the fact that the current is controlled by an electric
field set up in the device by an external voltage, applied across gate and source terminals,
which reverse bias the junctions.
34. What is a FET?
A field effect (FET) is a three terminal semiconductor device in which current conduction
takes place by only one type of carriers (either holes or electron) and is controlled by an
electric field.
35.Why FET is called an unipolar device?
The operation of FET depends upon the flow of majority carriers only (either holes or
electrons) so the FET is said to be an unipolar device.
36.Define pinch off voltage?
It is the voltage at which the channel is pinched off, i.e. all the free charge from the channel
get removed. At Pinch-off voltage VP the drain current becomes constant.
37. Define drain resistance?
Drain resistance (rd) is defined as the ratio of small change in drain to source voltage (Vds) to
the corresponding change in drain current (Id) at constant gate to source voltage (Vgs). rd =
Vds / Id at constant gate to source voltage (Vgs)
38. Write down the relationship between various FET parameters?
Amplification factor = drain resistance * Transconductance = rd * gm
39. Mention the applications of FET.
FET is used as a buffer in measuring instruments, receivers since it has high i/p impedance and
low o/p impedance.
FETS are used in RF amplifiers in FM tuners and communication equipment for the low noise
level.
Since the device is voltage controlled, it is used as a voltage variable resistor in op-amps and
tone controls.
Used as phase shift oscillator because frequency drifts is low.
40. Why the input impedance of FET is more than that of a BJT?
The input impedance of FET is more than that of a BJT because the input circuit of FET is
reverse biased whereas the input circuit of BJT is forward biased.
41. What is meant by gate source threshold voltage of a FET?
MVIT/Dept of IT/2016-2017/ ODD SEM

19

II Yr/III Sem

PART-A

The voltage at which the channel is completely cur off and the drain current becomes zero is
called as gate source threshold voltage. Also called as VGS(off).
42.Why N channel FETs are preferred over P channel FETs?
In N channel FET the charge carriers are the electrons which have a mobility of about 1300 cm2/
VS, whereas in P channel FETs the charge carriers are the holes which have a mobility of about
500 cm2 /VS. the current in a semiconductor is directly proportional to mobility. Therefore the
current in N channel FET is more than that of P channel FET.

UNIT IV
Give the expression for the frequency of oscillations in a sine wave oscillator?
The expression for the frequency of oscillations in an op-amp sine wave oscillator is, f = 1 /
(2RC) 63.
2.What are the conditions for sustained oscillator or what is Barkhausen criterion?
Condition for sustained oscillation, a. Magnitude condition |Av| = 1 b. Phase condition Av =
0 These conditions are called as Barkhausen criterion.
3. What is Oscillator circuit?
A circuit with an active device is used to produce an alternating current is called an oscillator
circuit.
4.What are the classifications of Oscillators?
*Based on wave generated: i. Sinusoidal Oscillator, ii. Non-sinusoidal Oscillator or Relaxation
Oscillator Ex: Square wave, Triangular wave, Rectangular wave etc. *According to principle
involved: i. Negative resistance Oscillator, ii. Feedback Oscillator. *According to frequency
generated: i.Audio frequency oscillator 20 Hz 20 kHz ii.Radio frequency Oscillator 30 kHz
30 MHz iii. Ultrahigh frequency Oscillator 30 MHz 3 GHz iv.Microwave Oscillator 3 GHz
above. * Crystal Oscillators.
5.What are the types of feedback oscillators?
MVIT/Dept of IT/2016-2017/ ODD SEM

20

II Yr/III Sem

PART-A

* RC-Phase shift Oscillator, * LC-Oscillators i.Tuned collector Oscillator ii.Tuned emitter


Oscillator iii. Tuned collector base Oscillator iv. Hartley Oscillator v. Colpits Oscillator vi. Clap
Oscillator
6.What are the conditions for oscillation?
The total phase shift of an oscillator should be 360o. For feedback oscillator it should satisfies
Barhausen criterion.
7.Define Piezoelectric effect.
When applying mechanical energy to some type of crystals called piezoelectric crystals the
mechanical energy is converted into electrical energy is called piezoelectric effect.
Draw the equivalent circuit of crystal oscillator.

8. What is Miller crystal oscillator?


Explain its operation. It is nothing but a Hartley oscillator its feedback Network is replaced by a
crystal. Crystal normally generate higher frequency reactance due to the miller capacitance are in
effect between the transistor terminal.
9.State the frequency for RC phase shift oscillator.
The frequency of oscillation of RC-phase shift oscillator is
F=1/2RC (4k+6) Where k=2.639.

MVIT/Dept of IT/2016-2017/ ODD SEM

21

II Yr/III Sem

PART-A

UNIT V
1.

What is an op-amp?

The operational amplifier is a multi-terminal device, which is quite complex internally. An


operational amplifier is a direct coupled high gain amplifier usually consisting of one or more
differential amplifiers and usually followed by a level translator and an output stage. An
operational amplifier is available as a single integrated circuit package. It is a versatile device
that can be used to amplify dc as well as ac input signals and was originally designed for
computing such mathematical functions.
2.What are the characteristics of ideal op-amp?
Open loop voltage gain, (AOL) = b. Input impedance (Ri) = c. Output impedance (Ro) = 0
d. Bandwidth (BW) = e. Zero offset Vo = 0, when V1 = V2 = 0 40.
3.Define loading?
A large value of Rc cannot be used in a circuit since, a. A large value of resistance requires a
large chip area. b. For large Rc, quiescent drop across it increases and hence a large power
supply is required. These difficulties removed by using a current source. Hence, a current source
can also be used as an active load for an amplifier to obtain a very large voltage gain.
4. Define input offset voltage?
It is defined as the voltage that must be applied between the input terminals of an op-amp to
nullify the output.
5.Define input offset current?

MVIT/Dept of IT/2016-2017/ ODD SEM

22

II Yr/III Sem

PART-A

It is defined as the algebraic difference between the current entering the inverting and noninverting terminal of an op-amp.
6.Define input bias current?
It is defined as the average of the currents entering into the input terminals of an op-amp.
7.What are the two compensating techniques used in frequency compensation?
Two types of compensating techniques are used, they are, a. External compensation b. Internal
compensation
8.What is compensated op-amp?
Op-amp, which uses a capacitor internally for compensation, is called a compensated op-amp.
This op-amp has a high gain stability and low bandwidth.

9.What are the methods used in external compensation technique?


a.

Dominant-pole compensation b. Pole-zero compensation

10.Define slew rate?


Slew rate can be defined as the maximum rate of change of output voltage of op-amp with
respect to time.
11.How can the slew rate be made faster?
The slew rate can be made faster by having a high charging current or a small capacitance value.
12.What are the methods to improve slew rate?
The slew rate can be improved with higher closed-loop gain and dc supply voltage. But the slew
rate also varies with temperature. i.e., slew rate decreases with increase in temperature. b.
Another method for improving slew rate is, the rate at which voltage across the capacitor
increases is gain by, dVc/dt = I / C. where, I is the maximum current furnished by the op-amp to
the capacitor C. From the equation it is clear that for a higher slew rate, op-amp should have
either a higher current or a small value of capacitor.
13.What are the AC characteristics of an op-amp?
a. Frequency response b. Slew rate
14.What are the DC characteristics of an op-amp?
a.

input bias current b. Input offset current c .Input offset voltage d. Thermal drift
15. What is the type of feedback employed in the inverting op-amp amplifier?

MVIT/Dept of IT/2016-2017/ ODD SEM

23

II Yr/III Sem

PART-A

Negative feedback is employed in the inverting op-amp amplifier.


16. List the applications of instrumentation amplifier.
a. Temperature indicator b. Temperature controller c. Light intensity meters d. Water flow meter
c. Thermal conductivity meter f. Analog weight scale
17. What is the basic building block of an op-amp?
The basic building block of an op-amp is differential amplifier.
18.Define non-inverting amplifier?
The input is applied to the non-inverting input terminal and the inverting terminal connected to
the ground.

19. What is meant by voltage follower?


If the output voltage of an op-amp follows the input i.e., if the output voltage is equal to the input
voltage it is called as a voltage follower.
20. Define Common Mode Rejection Ratio.
The relative sensitivity of an op-amp to a difference signal as compared to a common mode
signal is called common-mode and gives the figure of merit for the differential amplifier.
CMRR, =|Ad/Ac|
21.Give some applications of Comparator.
a. Zero crossing detector b. Window detector
c. Time marker generator d. Phase detector
22.What is a window detector?
A device, usually consisting of a pair of voltage comparators, in which output indicates whether
the measured signal is within the voltage range bounded by two different thresholds (an "upper"
threshold and a "lower" threshold).

23.List the types of comparators.


Inverting comparator
Non-inverting comparator

24.Differentiate Schmitt trigger and comparator.


MVIT/Dept of IT/2016-2017/ ODD SEM

24

II Yr/III Sem

PART-A

A Schmitt trigger is a comparator with a small amount of positive feedback applied to create a
hysteresis for the input level.

25. What are the limitations of an ideal active differentiator?


At high frequency, differentiators may become unstable and break into oscillation. The input
impedance i.e. (1/C1) decreases with increase in frequency, thereby making the circuit sensitive
to high frequency noise.
26. State the important features of an instrumentation amplifier.
a. high gain accuracy b. high CMRR
c. high gain stability with low temperature co-efficient d. low dc offset
e. low output impedance

IT T33 DATA STRUCTURES


2 MARKS
UNIT I
1. Define Data structure.
A data structure is a logical or mathematical way of organizing data in the memory that consider
not only the items stored but also the relationships to each other and also characterized by
accessing functions.
Storage representation of user data: user data should be stored in such a way that
computer can understand it.
Retrieval of stored data: data stored in a computer should be retrieved in such a way
that user can understand it.
Transformation of user data: various operations which require to be performed on
user data so that it can be transformed from one form to another.
2. Give few examples of data structures.
TYPES OF DATA STRUCTURES
Data Structure

Primitive data structure

non primitive data structure

Ex: char, int, float

MVIT/Dept of IT/2016-2017/ ODD SEM

25

II Yr/III Sem

PART-A

Linear
data structure
Ex: list, stacks, queues

non linear
data structure
Ex: trees, graphs

Applications of data structures.


Compiler design
Operating System
Database Management system
Network analysis
3. Define Algorithm.
Algorithm is a solution to a problem independent of programming language. It consist of set of
finite steps which, when carried out for a given set of inputs, produce the corresponding output
and terminate in a finite time.
An algorithm is a sequence of finite number, set of steps involved in solving problems.
Algorithm is written either in programming or natural language. An algorithm consists of a set of
explicit and unambiguous finite steps which when carried out for a given set of initial condition,
produce corresponding output and terminate in a finite time

features of an efficient algorithm


Free of ambiguity
Efficient
in execution time
and compact
Completeness
Finiteness
Concise and compact
Completeness
4. Define ADT.
An ADT is a set of operation. Abstract data types are mathematical abstractions. Objects such as
lists, graphs, sets along with their operations can be viewed as ADT.

An Abstract Data Type (ADT) is a set of operations. Abstract data types are mathematical
abstractions; nowhere in an ADT's definition is there any mention of how the set of
operations is implemented. This can be viewed as an extension of modular design.

Objects such as lists, sets, and graphs, along with their operations, can be viewed as
abstract data types, just as integers, reals, and booleans are data types. Integers, reals, and
Booleans have operations associated with them, and so do abstract data types. For the set
ADT, there are various operations as union, intersection, size, and complement.
Alternately, the two operations union and find, which would define a different ADT on
the set.

The basic idea is that the implementation of these operations is written once in the
program, and any other part of the program that needs to perform an operation on the
ADT can do so by calling the appropriate function. If for some reason implementation

MVIT/Dept of IT/2016-2017/ ODD SEM

26

II Yr/III Sem

PART-A

details need to change, it should be easy to do so by merely changing the routines that
perform the ADT operations. This change, in a perfect world, would be completely
transparent to the rest of the program.

5. Define a stack.
A stack is an ordered collection of homogeneous data elements, where the insertion and
deletion operation take place at one end.(LIFO)
Similar to array and linked list, attack is also linear data structure.
Only difference compared to array and link list, insertion and deletion operations takes
place at any position.
In stack, Insertion and deletion operation specially termed as PUSH and POP
respectively.
Some terminologies of stack are TOP, ITEM, and SIZE.
TOP Position of the stack, where operations are preformed.
ITEM Element in a stack.
SIZE Maximum number of elements that a stack can accommodate.

The basic operations that can be


Push
Pop
Peek
Empty check
Fully occupied check

performed on a stack.

6. Mention the applications of stack.


Expression parsing
Evaluation of postfix expression
Balancing parenthesis
Towers of Hanoi
Reversing a string
Evaluation of postfix expression
Rules to be followed during infix to postfix conversions.
Fully parenthesize the expression starting from left to right. During parenthesizing, the
operators having higher precedence are first parenthesized.
MVIT/Dept of IT/2016-2017/ ODD SEM

27

II Yr/III Sem

PART-A

Move the operators one by one to their right, such that each operator replaces their
corresponding right parenthesis.
The part of the expression, which has been converted into postfix is to be treated as single
operand.

7. What do you mean by top of stack?


Top is the pointer which always points the top element of the Stack.
If Top =-1, then Stack is Empty.
We can insert a new element into stack by incrementing top by 1.
We can delete an element from stack by decrementing top by 1.

8. Define Expression, Operator and


Operand.
Expression: Expression is the collection of operators and operands.
Operator: Operator is the symbol which performs mathematical operations on variables.
Operand: Operand is the constant or variable whose values may be int, real, char.
Types of Expression
Expression is classified as three types according to position of operator with respect to the
operands. They are:
Infix: The operator is placed in between two operands. E.g.: A+B.
Postfix: The operator is placed after the operands. E.g.: AB+.
Prefix: The operator is placed before the operands. E.g.: +AB.
9. What is meant by recursion?
Recursion is an important tool to describe a procedure having several repetitions of the same. A
procedure is termed recursive if the procedure is defined by itself. As a simple example, let us
consider the case of calculation of the factorial value for an integer n.
n! = n x (n-1) x (n-2)x.x3x2x1

or n!= n x (n-1)!

The last expression is the recursive description of the factorial whereas the first is the iterative
definition.
10. Define linked list.
Linked list consists of a series of structures, which are not necessarily adjacent in memory. Each
structure contains the element and a pointer to a structure containing its successor. We call this
the Next Pointer. The last pointer points to NULL.
The two fields of linked list.
MVIT/Dept of IT/2016-2017/ ODD SEM

28

II Yr/III Sem

PART-A

Info field
Next field

State the different types of linked lists.


Singly linked list
Doubly linked list
Circular linked list
The basic operations carried out in a linked list.
Creation of a list
Insertion of a node
Deletion of a node
Modification of a node
Traversal of the list
advantages of using a linked list
It is not necessary to specify the number of elements in a linked list during its declaration
Linked list can grow and shrink in size depending upon the insertion and deletion that
occurs in the list
Insertions and deletions at any place in a list can be handled easily and efficiently
A linked list does not waste any memory space
11. Define singly linked list.
Singly linked lists contain nodes which have a data field as well as a next field, which points to
the next node in the linked list.
The two fields of linked list.
Info field
Next field

12. What is a doubly liked list?


In a simple linked list, there will be one pointer named as 'NEXT POINTER' to point the next
element, where as in a doubly linked list, there will be two pointers one to point the next element
and the other to point the previous element location.
Three fields of doubly linked list.
Info field
Left field
Right field

MVIT/Dept of IT/2016-2017/ ODD SEM

29

II Yr/III Sem

PART-A

13. Define circularly linked list.


In a doubly linked list, if the last node or pointer of the list, point to the first element of the list,
then it is a circularly linked list.

14. List out the applications of linked lists.


Manipulation of polynomials
Sparse matrices
Stacks
Queues
polynomial is represented using a linked list
Linked lists are used to represent and manipulate polynomials. In a linked representation of
polynomial each term of a polynomial is considered as a node. In a polynomial representation
each node contains three fields:
Coefficient field
Exponent field
Link field
15. State the difference between array and linked list.
Arrays
Size of an array is fixed
It is necessary to specify the number of
elements during declaration.
Insertions and deletions are
somewhat difficult

Linked Lists
Size of a list is variable
It is not necessary to specify the number of
elements during declaration
Insertions and deletions are carried
out easily

It occupies less memory than a linked list for It occupies more memory
the same number of elements
16. Define sparse matrix.
A sparse matrix is a matrix populated primarily with zeros as elements of the table. The fraction
of zero elements in a matrix is called the sparsity.

MVIT/Dept of IT/2016-2017/ ODD SEM

30

II Yr/III Sem

PART-A

UNIT II
1. What is Queue?
Queue is a linear and static data structure.
Queue is an ordered collection of elements in which we can insert an element at one end
called Rear and delete an element at another end called Front.
Initial condition of the stack Rear=Front=-1.
MVIT/Dept of IT/2016-2017/ ODD SEM

31

II Yr/III Sem
It is otherwise called as FIFO (First In First Out).

PART-A

QUEUE UING ARRAY

QUEUE

USING
LINKED LIST

2. What are the various operations that can be performed on Queue?


In Queue, we can perform two operations namely Insertion and Deletion.
Insertion: Insertion can be done by incrementing Rear by 1.
Queue is full. :

REAR=N
FRONT=1

Deletion: Deletion can be done by incrementing Front by 1.


Queue is empty.

FRONT=0
REAR =0

3. Define Priority Queue.


1. A priority queue is another variation of queue structure.
2. In priority queue each element has been assigned a value called priority of value.
3. In priority queue element can be inserted or deleted not only at end and also any
position.
4. Element of X of priority P, will be deleted before the element which is at Front.
5. Insertion of an element also based on priority, Instead of adding after the rear, it may
be inserted within the intermediate position based on priority value.
A

P1

P2

P3

P4

P5

P6

P7

P8

(Priority queue representation)


MVIT/Dept of IT/2016-2017/ ODD SEM

32

II Yr/III Sem

PART-A

6. A priority queue does not follow the basic principle of priority queue as follows
i. An element of higher priority processed before any element of lower priority.
ii. Two elements of same priority are processed according to the order in which they
were added to the queue.
4. Define Dequeue.
In generally , liner queue usual practices FIFO .
Elements are added from the rear and elements are deleted from the front.
But in doubly ended queue we can make use of both end for insertion and deletion.
That mean possible to insert the elements by rear as well as front.
Similarly it is possible to delete the elements by rear as well as front.
Insertion by front end
Deletion by front end
10

Deletion by front end


end

20

30

40

50

Insertion by Rear

Fig.9 (structure of doubly ended Queue)


5. Difference between Stack and Queue.
Stack
Queue
A Stack is an ordered collection of data items, A Queue is an ordered collection of items,
where all insertion and deletions always are made where all insertions are made at the end of
at the end of the sequence called Top.
the sequence called Rear and all deletions
always are made from the beginning of the
sequence called Front.
In Stack, we get data items out in reverse order In Queue, we get data items out in same
compared to the order they have been put into the order compared to the order they have
stack.
been put into the queue.
Stack is otherwise called as FIFO.

Queue is otherwise called as FIFO.

6. Define Ascending Priority Queue.


In this elements are placed in ascending order.
The first smallest element is placed in first position and second smallest element in
second position and so on.
The new data item is inserted in priority queue without affecting the ascending order of
queue.
7. Define Descending Priority Queue.
In this elements are placed in descending order.
The first highest element is placed in first position and second highest element is placed
in second position and so on.
MVIT/Dept of IT/2016-2017/ ODD SEM

33

II Yr/III Sem

PART-A

The new data item is inserted in priority queue without affecting the descending order of
queue.

8. Define Input restricted Dequeue.

It means we can insert the element only at one end and delete the elements at both ends.
The below diagram shows the input restricted Dequeue.

9. Define Output restricted Dequeue.


It means we can insert the elements in both ends and delete the elements at only one end.
The below diagram shows the output restricted Dequeue.

10. How to insert at element at the end of the Dequeue.


First check the Dequeue is full or not.
We have to check whether the element is first to be added or inserted if it is true assign
front and rear is 0.
Now insert an element.
11. How to insert an element at the beginning of the Dequeue.
First check the Dequeue is full or not.
We have to check whether the element is first to be inserted if it is true then perform the
following steps
Shift the elements from left to right
So that we need the number of elements present in the Dequeue ,the position of the last
element i.e. the position of the rear
Now insert any element in zeroth position.
12. How to delete an element at the beginning of Dequeue.
Delete the first element from the front position of the Dequeue
The index of next element is stored in front pointer.
Increment the front pointer by one.
MVIT/Dept of IT/2016-2017/ ODD SEM

34

II Yr/III Sem

PART-A

13. How to delete an element at the end of Dequeue.


The last element is deleted.
The index of next element is stored in rear pointer
Decrement the rear pointer by one.

14. Define multiple queues using single array

F1
10
1

One of the application of queue is categorization of data is possible.


Multiple queues are used to store variety of data.
We can implement multiple queues using single dimensional array.
Insertion from its rear end and deletion its front end can be possible for desired queue.
F3&R3
R1
F2
R2
F4
R4

20
2

30

40
3

50
6

60
7

70
8

80
9

10

11

12

13

14

15

16

Q1 of size 5

Q2 of size 4

Q3 of size 2

Q4 of size 5

(Representation of multi queue using one dimensional array)


From the diagram there are 4 queue having own and rear positioned at appropriate place
in a single dimensional array
We can perform insertion deletion of any element at any queue
15. Write down applications of queue?
Batch processing in an operating system
To implement priority Queues.
MVIT/Dept of IT/2016-2017/ ODD SEM

35

II Yr/III Sem

PART-A

Priority queues can be used to sort the elements using Heap Sort.
Simulation.
Mathematics user Queuing theory.
Computer networks where the server takes jobs of the client as per the queue strategy.

16. What is circular queue? Give its advantages?


In circular Queue, the insertion of a new element is performed at the very first location of the
queue if the last location of the queue is full, in which the first element comes just after the last
element.

UNIT III
1. What is a tree?
A tree is a finite set of one or more nodes such that there is a specially designated node called the
Root, and zero or more non empty sub trees T1, T2, T3.Tk, each of whose roots are connected
by a directed edge from Root R.

2. Define the following terminologies in tree?


a. Siblings, Path
Sibling: children of the same parents are said to be siblings. In above example B, C, D, E are
siblings, F, G are siblings. Similarly I,J & K,L are siblings.
Path: A path from node n1 to nk is defined as a sequence of nodes n1,n2,n3nk such that n1 is
the parent of ni+1. For 1<i<k. there is exactly only one path from each node to root. In the above
figure path from A to L is A,C F,L. where A is the parent for C, C is the parent of F and F is the
parent of L.
b. Length, Degree.
Length: The length is defined as the number of edges on the path. In the above figure the length
for the path A to L is 3.
Degree: The number of sub trees of a node is called its degree.
In the Above figure Degree of A is 4, Degree of C is 2, D is 1, H is 0.
c. Level, depth, height.
MVIT/Dept of IT/2016-2017/ ODD SEM

36

II Yr/III Sem

PART-A

Level: The level of a node is defined by initially letting the root be at level one, if a node is at
level L then its children are at level L+1. Level of A=1, B, C, D=2;F, G, H, I, J=3;L, M, =4.
Depth: For any node n, the depth of n is the length of the unique path from root to n. The Depth
of the root is zero. In the figure depth of node F is 2, node L is 3.
Height: For any node n, the height of the node n is the length of the longest path from n to the
leaf. The height of the leaf is zero, height of node F is 1, and Height of L is 0.
3. Define binary tree and write down its node declarations?
Binary tree is a tree in which no node can have more than two children. Maximum number of
nodes at level I of a binary tree is 2 i+1. It is defined as finite set of nodes such that
T is empty (called the empty binary tree), or
T contains a specially designated node called the root of T, and the remaining nodes of T
form two disjoint binary trees T1, and T2 which are called the left sub-tree and the right
sub tree, respectively.
Node declaration:
Struct TreeNode
{
Int Element;
Struct TreeNode *Left;
Struct TreeNode *Right;
};
4. List some of the possible types of binary Tree?
A few important frequently used trees are listed below.
Expression tree
Binary search tree
Heap tree
Threaded binary tree
Huffman tree
AVL tree
Red black tree
Splay tree
Decision tree
5. Comparison between tree & binary tree?
Tree: A general tree has any number of children.

MVIT/Dept of IT/2016-2017/ ODD SEM

37

II Yr/III Sem

PART-A

Binary tree: A binary Tree has not more than two children.

6. Discuss a FULL binary tree?


A binary tree is a FULL binary tree if it contains the maximum possible number of nodes at all
levels.

7. Discuss a COMPLETE binary tree?


A complete binary tree of height h has between 2 and 2
elements should be filled from left to right.

-1 nodes. In the bottom level the

8. What is the representation of binary tree?


There are two ways for representing binary tree, they are
a. Linear representation b. Linked representation
Linear: The elements are represented using arrays. For any element in position i, the left child is
in position 2i, the right child is in position (2i+1), and the parent is in position (i/2).
Linked: The elements are represented using pointers. Each node in linked representation has
three fields, namely,
Pointer to the left subtree
MVIT/Dept of IT/2016-2017/ ODD SEM

38

II Yr/III Sem

PART-A

Data field
Pointer to the right subtree

9. List some of the properties of binary tree?


In any binary tree, the maximum number of nodes on level l is 2, where l>0.
The maximum number of nodes possible in a binary tree of height h is 2 -1.
The minimum number of nodes possible in a binary tree of height h is h.
For any non-empty binary tree, if n is the number of nodes and e is the number of edges,
then n=e+1.
The height of a complete binary tree with n number of nodes is [log (n+1)].
the operations of binary tree
The main operations of binary tree can be listed as follows:
Insertion: To include a node into an existing (may be empty) binary tree.
Deletion: To delete a node from a non-empty binary tree.
Traversal: To visit all the nodes in a binary tree.
Merge: To merge two binary trees into a larger one.
10. Define binary search tree?
A binary search tree (BST) or ordered binary tree is a node-based binary tree data
structure which has the following properties.
The left subtree of a node contains only nodes with keys less than the node's key.
The right subtree of a node contains only nodes with keys greater than the node's
key.
Both the left and right subtrees must also be binary search trees.
The major advantage of binary search trees over other data structures is that the related
sorting algorithms and search algorithms such as in-order traversal can be very efficient.
Binary search trees are more fundamental data structure used to construct more abstract
data structures such as sets, multisets and associative arrays.
11. What is traversing? What is tree traversal? Mention its types?
The traversal operation is the frequently used operation on a binary tree.
Binary tree traversal is a visiting all the nodes in the binary tree once.
A full traversal on a binary tree gives a linear ordering of data in the tree.
The visit always starts from root node to do any of the following.
1. To move to the left of that node. It is denoted by L
2. To move to the right of that node. it is denoted by R.
TYPES OF TRAVERSAL
1. Inorder traversal (LVR) :Example: a+b*c
2. Pre order traversal (VLR): Example: +a*bc
3. Post order traversal (LRV):Example: abc*+

MVIT/Dept of IT/2016-2017/ ODD SEM

39

II Yr/III Sem

PART-A

12. Define AVL Tree.


An empty tree is height balanced. If T is a non-empty binary tree with TL and TR as its
left and right subtrees, then T is height balanced if
i) TL and TR are height balanced and
ii) hL - hR 1
Where hL and hR are the heights of TL and TR respectively.
The categories of AVL rotations
Let A be the nearest ancestor of the newly inserted nod which has the balancing factor 2. Then
the rotations can be classified into the following four categories:
Left-Left: The newly inserted node is in the left subtree of the left child of A.
Right-Right: The newly inserted node is in the right subtree of the right child of A
Left-Right: The newly inserted node is in the right subtree of the left child of A.
Right-Left: The newly inserted node is in the left subtree of the right child of A.
Balance factor of a node in AVL tree
The height of left subtree minus height of right subtree is called balance factor of a node in AVL
tree.The balance factor may be either 0 or +1 or -1.The height of an empty tree is -1.
13. What do you mean by balanced trees?
Balanced trees have the structure of binary trees and obey binary search tree properties.
Apart from these properties, they have some special constraints, which differ from one data
structure to another. However, these constraints are aimed only at reducing the height of the tree,
because this factor determines the time complexity.
Eg: AVL trees, Splay trees.
14. Define splay tree.
A splay tree is a binary search tree in which restructuring is done using a scheme called splay.
The splay is a heuristic method which moves a given vertex v to the root of the splay tree using a
sequence of rotations.
Idea behind splaying
Splaying reduces the total accessing time if the most frequently accessed node is moved towards
the root. It does not require to maintain any information regarding the height or balance factor
and hence saves space and simplifies the code to some extent.
The types of rotations available in Splay tree.
Let us assume that the splay is performed at vertex v, whose parent and grandparent are p and g
respectively. Then, the three rotations are named as:
Zig: If p is the root and v is the left child of p, then left-left rotation at p would suffice. This case
always terminates the splay as v reaches the root after this rotation.
MVIT/Dept of IT/2016-2017/ ODD SEM

40

II Yr/III Sem

PART-A

Zig-Zig: If p is not the root, p is the left child and v is also a left child, then a left- left rotation at
g followed by a left-left rotation at p, brings v as an ancestor of g as well as p.
Zig-Zag: If p is not the root, p is the left child and v is a right child, perform a left-right rotation
at g and bring v as an ancestor of p as well as g.
15. Define B-tree of order M.
A B-tree of order M is a tree that is not binary with the following structural properties:
The root is either a leaf or has between 2 and M children.
All non-leaf nodes (except the root) have between M/2 and M children.
All leaves are at the same depth.
Applications of B-tree
1. Database implementation
2. Indexing on non primary key fields

UNIT IV
1. What is meant by sorting?
Ordering the data in an increasing or decreasing fashion according to some relationship among
the data item is called sorting.
MVIT/Dept of IT/2016-2017/ ODD SEM

41

II Yr/III Sem

PART-A

Various factors to be considered in deciding a sorting algorithm


a. Programming time
b. Execution time of the program
c. Memory needed for program environment
Sorted Array: 1

EG:

11

15

23

29

2. What are the two main classifications of sorting based on source of data?
Internal sorting
External sorting
3. Define external sorting.
External sorting is a process of sorting in which large blocks of data stored in storage devices are
moved to the main memory and then sorted.
EG:

Sorted Array: 1

11

15

23

29

4. Define internal sorting.


Internal sorting is a process of sorting the data which reside in the main memory.
EG:

Sorted Array: 1

11

15

23

29

5. What are the various factors to be considered in deciding a sorting algorithm?


Programming time
Execution time of program
Memory needed for program environment.
6. What is the main idea in bubble sort?
In this sorting method, to arrange elements in ascending order, we begin with the 0 th

element an compare it with the 1st element.


If it is found to be greater than the 1st element, then they can be interchanged.
In this way all the elements are compared (excluding last) with their next element and
are interchanged if required. On completing the first iteration, the largest element gets
placed at the last position. After all the iterations, the list becomes a sorted list

MVIT/Dept of IT/2016-2017/ ODD SEM

42

II Yr/III Sem

PART-A

7. What is the idea behind insertion sort?


Insertion sort is performed by inserting a particular element at the appropriate position.
In insertion sort, the first iteration starts with comparison of 1st element with the 0th element.
In the second iteration 2nd element is compared with the 0th and 1st. In general in every
iteration an element is compared with all elements.
If at some point it is found that the element can be inserted at a position then space is created
for it by shifting the other elements one position to the right and inserting the element at the
suitable position.
This procedure is repeated for all the elements in the array.
8. Define selection sort.
Selection sort is the easiest method of sorting. To sort the data in ascending order, the
0th element is compared with all other elements. If the 0 th element then they are
interchanged.
In this way after the first iteration, the smallest element is placed at 0 th position. The
procedure is repeated for 1st element.
9. Define shell sort.
The shell sort overcomes this limitation, gains speed than insertion sort, by comparing
elements that are at a specific distance from each other, and interchanges them if
necessary.The shell sort divides the list into smaller sub lists, and then sorts the sub lists
seperately using the insertion sort. This is done by considering the input list being nsorted.
This method splits the input list into h-independent sorted files. The procedure of h-sort
is insertion sort considering only the hth element (starting any where).The value of h will
be initially high and is repeatedly Decremented until it reaches 1.When h is equal to 1 , a
MVIT/Dept of IT/2016-2017/ ODD SEM

43

II Yr/III Sem

PART-A

regular insertion sort is performed on the list, but by then the 1ist of data is guaranteed to
be almost sorted. Using the above Procedure for any sequence values of h, always ending
in 1 will produce a sorted list.
9. What is the purpose of quick sort?
The divide-and-conquer approach can be used to arrive at an efficient sorting method
different from merge sort. In merge sort, the file a[1:n] was divided at its midpoint into
sub arrays which were independently sorted & later merged.

In Quick sort, the division into 2 sub arrays is made so that the sorted sub arrays do not
need to be merged later.

This is accomplished by rearranging the elements in a[1:n] such that a[i]<=a[j] for all i
between 1 & n and all j between (m+1) & n for some m, 1<=m<=n.

Thus the elements in a[1:m] & a[m+1:n] can be independently sorted.

No merge is needed. This rearranging is referred to as partitioning.

Function partition( ) of algorithm accomplishes an in-place partitioning of the elements of


the elements a[m:p-1].

It is assumed that a[p] a[m] and that a[m] is the partitioning element. If m=1 & p-1=n,
then a[n+1] must be defined and must be greater than or equal to all elements in a[1:n]

The assumption that a[m] is the partition element is merely for convenience, other
choices for the partitioning element than the first item in the set are better in practice.

10. What is the average efficiency of heap sort?


The average efficiency of heap sort is 0 (n(log2 n)) where, n is the number of elements sorted.
11. Name some of the external sorting methods?
Polyphase merging
Oscillation sorting
Merge sorting
12. When is a sorting method said to be stable?
A sorting method is said to be stable, it two data items of matching values are guaranteed to be
not rearranged with respect to each other as the algorithm progresses.
13. Define radix sort.
Radix sort is a small method that many people intuitively use when alphabetizing a
large list of names.

MVIT/Dept of IT/2016-2017/ ODD SEM

44

II Yr/III Sem

PART-A

Specifically, the list of names is first sorted according to the first letter of each names,
that is, the names are arranged in 26 classes
Intuitively, one might want to sort numbers on the most significant digit.
But Radix sort do counter-intuitively by sorting on the least significant digits first.

On the first pass entire numbers sort on the least significant digit and combine in a
array.

Then on the second pass, the entire numbers are sorted again on the second leastsignificant digits and combine in a array and so on.

14. What is the main idea behind merge sort?


Merging is the process of combining two sorted lists into merge sorted list. To perform
the merge sort both the sorted lists are compared. The smaller of both the elements from
both the lists are placed in the third list.
Given an unsorted array, the array is divided into two array say x and y and can be sorted
with any of the sorting algorithm. The 0th element from the first array is compared with
0th of the second array y. If it is smaller than it is moved to the third array. Now the 0 th
element from the first array is compared with 1st element from the second array.
Then the 1st element from the first array is compared with the 1 st element from the second
array. Now the1st element from the first array in compared with the 2 nd element in the
second array and place it in the third array.
The same procedure is repeated till the end of one of the arrays is reached. Now the
remaining elements from the other array are placed directly into the third list as are
already in sorted order
The merge algorithm also uses divide and conquer rule for its operation .The most
popular method for sorting on external storage device is Merge sort.

UNIT V
1. Define Hashing.
Hashing is the transformation of string of characters into a usually shorter fixed length value
or key that represents the original string. Hashing is used to index and retrieve items in a
database because it is faster to find the item using the short hashed key than to find it using the
original value.
Hash table
The hash table data structure is merely an array of some fixed size, containing the keys. A
key is a string with an associated value. Each key is mapped into some number in the range 0 to
tablesize-1 and placed in the appropriate cell.
Hash function

MVIT/Dept of IT/2016-2017/ ODD SEM

45

II Yr/III Sem

PART-A

A hash function is a key to address transformation which acts upon a given key to compute
the relative position of the key in an array. The choice of hash function should be simple and it
must distribute the data evenly. A simple hash function is hash_key=key mod tablesize.
Importance of hashing.
Maps key with the corresponding value using hash function.
Hash tables support the efficient addition of new entries and the time spent on searching
for the required data is independent of the number of items stored.
2. What do you mean by collision in hashing?

When an element is inserted, it hashes to the same value as an already inserted element,
and then it produces collision.
Collision resolution methods
Separate chaining or external hashing
Open addressing or closed hashing
3. What do you mean by separate chaining?
Separate chaining is a collision resolution technique to keep the list of all elements that
hash to the same value. This is called separate chaining because each hash table element is a
separate chain (linked list). Each linked list contains all the elements whose keys hash to the
same index.
Advantage of separate chaining.
More number of elements can be inserted as it uses linked lists.
Disadvantages of separate chaining.
The elements are evenly distributed. Some elements may have more elements and some
may not have anything.
It requires pointers. This leads to slow the algorithm down a bit because of
the time required to allocate new cells, and also essentially requires the
implementation of a second data structure.
4. What do you mean by open addressing?
Open addressing is a collision resolving strategy in which, if collision occurs alternative cells
are tried until an empty cell is found. The cells h0(x), h1(x), h2(x),. are tried in succession,
where hi(x)=(Hash(x)+F(i))mod Tablesize with F(0)=0. The function F is the collision resolution
strategy.
types of collision resolution strategies in open addressing?
Linear probing
Quadratic probing
Double hashing
5. What is Probing?
Probing is the process of getting next available hash table array cell.
linear probing
MVIT/Dept of IT/2016-2017/ ODD SEM

46

II Yr/III Sem

PART-A

Linear probing is an open addressing collision resolution strategy in which F is a linear


function of i, F(i)=i. This amounts to trying sequentially in search of an empty cell. If the table is
big enough, a free cell can always be found, but the time to do so can get quite large.
quadratic probing
Quadratic probing is an open addressing collision resolution strategy in which F(i)=i2. There
is no guarantee of finding an empty cell once the table gets half full if the table size is not prime.
This is because at most half of the table can be used as alternative locations to resolve collisions.
Double hashing
Double hashing is an open addressing collision resolution strategy in which
F(i)=i.hash2(X). This formula says that we apply a second hash function to X and probe at a
distance hash2(X), 2hash2(X) and so on. A function such as hash2(X)=R-(XmodR), with R a
prime smaller than Table size.
6. What do you mean by primary and secondary clustering?
In linear probing collision resolution strategy, even if the table is relatively empty, blocks
of occupied cells start forming. This effect is known as primary clustering means that any key
hashes into the cluster will require several attempts to resolve the collision and then it will add to
the cluster(primary clustering)
Although quadratic probing eliminates primary clustering, elements that hash to the same
position will probe the same alternative cells. This is known as secondary clustering.

7. What do you mean by rehashing?


If the table gets too full, the running time for the operations will start taking too long and
inserts might fail for open addressing with quadratic resolution. A solution to this is to build
another table that is about twice as big with the associated new hash function and scan down the
entire original hash table, computing the new hash value for each element and inserting it in the
new table. This entire operation is called rehashing.
Need for extendible hashing
If either open addressing hashing or separate chaining hashing is used, the major problem
is that collisions could cause several blocks to be examined during a Find, even for a welldistributed hash table. Extendible hashing allows a find to be performed in two disk accesses.
Insertions also require few disk accesses.
8. What is a graph? Give one example?
A graph G=(V,E) consists of a set of vertices, V and set of edges E.
Vertices are reffered to as nodes and the arc between the odes are reffered to as edges. Each edge
is a pair (v,w) where v, w V. (i.e) v=V1, w=V2..

MVIT/Dept of IT/2016-2017/ ODD SEM

47

II Yr/III Sem

PART-A

Here V1, V2, V3,V4 are the vertices and (V1,V2),(V2,V3),(V3,V4),(V4,V1),(V2,V4),(V1,V3)


are edges.
9. What is digraph, undirected & weighted graph?
Digraph: directed graph is a graph which consists of directed edges, where each edge in E is
unidirectional. It is also referred as Digraph. If (v,w) is a directed edge then (v,w)=(w,v)
Undirected: An undirected graph is a graph, which consists of undirected edges. If (v,w) is an
undirected edge then (v,w)=(w,v)
Weighted graph: A graph is said to be weighted graph if every edge in the graph is assigned a
weight or value. It can be directed or undirected graph.
10. What is a complete graph, strongly connected graph, degree, acyclic graph?
A complete graph is a graph in which there is an edge between every pair of vertices. A
complete graph with n vertices will have n (n-1)/2 edges.
If there is a path from every vertex to every other vertex in adirected graph then it is said
to be strongly connected graph. Otherwise it is said to be weakly connected graph.
The number of edges incident on a vertex determines its degree. The degree of the vertex
V is written as degree (V). The in degree of the vertex V, is the number of edges entering into the
vertex V. Similarly the out degree of the vertex V is the number of edges exiting from that vertex
V.
A directed graph which has no cycles is referred to as acyclic graph. It is abbreviated as
DAG. DAG= Directed Acyclic graph.
11. Define graph traversals and mentions its types?
Traversing a graph means visiting all the vertices in the graph exactly once. For the sake of
simplicity, we will assume that the graph is connected. Several methods are known to traverse a
graph systematically, out of them two methods are accepted as standard and will be discussed in
detail in this section. These methods are called as (BFS) breadth first search and (DFS) depth
first search. With these traversals, starting from a given node we can visit all the nodes which are
reachable from that starting node.
12. What are the applications of graph structures?
Graph is a important data structure whose extensive applications are known in almost all areas.
Nowadays many applications related with computation can be managed with graph structures.
For example consider two simple problems where graph structure can be utilized.
Transportation problem
Map coloring
MVIT/Dept of IT/2016-2017/ ODD SEM

48

II Yr/III Sem

PART-A

The major graph theoretic problems are listed below.


Shortest path problems
Topological sorting of a graph
Spanning trees
Connectivity of a graph
Eulers path of Hamiltonian path
Binary decision diagram
13. What is Dijkstras algorithm?
The algorithm to find shortest paths was first proposed by E.W Dijikstra and is popularly known
as Dijikstras algorithm. In this problem, there is a distinct vertex and it requires finding the
shortest path from this source vertex to all other vertices.
14. Explain spanning trees?
The spanning tree of a graph G can be defined as a tree which includes all the vertices of G. the
DFS and BFS traversals on graph result into two trees: DFS-spanning tree and BFS-spanning
tree. There are several methods available for finding a minimum spanning tree of a graph. Out of
them, two methods are known to be very efficient:
a. Kruskals algorithm
b. Prims algorithm.

IT T34 OBJECT-ORIENTED PROGRAMMING


2 MARKS
UNIT I
1. List the features of Object oriented Programming.
Emphasis is on data rather than on procedure.
Programs are divided into objects.
Data is hidden and cannot be accessed by external functions.
Follows bottom -up approach in program design.
2. What are the basic concepts of OOPS?
Objects.
Classes.
Data abstraction and Encapsulation.
Inheritance.
Polymorphism.
Dynamic binding.
Message passing.
3. What is Data abstraction and Data encapsulation?
Data abstraction
The insulation of data from direct access by the program is called as data hiding
or information binding.
The data is not accessible to the outside world and only those functions, which are
wrapped in the class, can access it.
MVIT/Dept of IT/2016-2017/ ODD SEM

49

II Yr/III Sem

PART-A

Encapsulation
Wrapping up of data and function within the structure is called as encapsulation.
4. What are Class and Objects? Write its syntax.
Objects
Definition1:
In oop, a problem is considered as a collection of a number of entities called
objects objects are instances of classes.
Definition2:
Objects are basic run-time entities in an objected oriented system. Problem is
analyzed in terms of object.
Syntax:- classname objectname;
Example: Person, place, table of date etc.

Class
Definition:
The entire set of date and code of an objects made as a user-defined date type
with the help of a class . C++ enables to define a class that is similar to struct of C but
with addition of functions members. Thus a class is a collection of similar type.
Example: Fruit mango
Syntax:class class_name
{
access_specifier_1:
data member;
member function;
access_specifier_2:
data member;
member function;
...
};
5. What are the differences between a class and structure?
Class:
1. User defined data type which contains data and methods to manipulate that data; is
known as class.
2. It is the fundamental packaging unit of OO technology. An object is a variable of a
Class.
3. Each object is associated with the data of type class with which it is created. Thus we
can also say that class is a collection of objects of similar types. Eg.
class Student
{
int rollno;
MVIT/Dept of IT/2016-2017/ ODD SEM

50

II Yr/III Sem

PART-A

int marks1, marks2;


public:
void show(int r); // to print marks
void sum(int r); // to add the marks
};
We can create objects of class using:
class Student s1, s2;
Structure:
1. A structure is a collection of variables, referenced under one name, providing a
convenient means of keeping related information together.
2. Structure declaration forms a template which can be used to create structure objects.
3. The variables inside a structure are called members. Generally all the members of a
structure are logically related. Structure declaration precedes the keyword struct.
Consider following example:
struct address
{
char name[80];
char street[80];
char city[20];
char state[20];
};
We can create structure variables using:
struct address ad1, ad2;
ad1 and ad2 are two variables of the type struct address..
6. Define Polymorphism. Give its example.
Polymorphism is the ability to take more than one form. An operation may exhibit
different behaviors in different. The behavior depends upon the type of data used.
Polymorphism is of two types. They are

Function overloading
Operator overloading

7. Define dynamic binding with example.


Binding refers to the linking of a procedure to the code to be executed in response to the
call.
Dynamic binding means that the code associated with a given procedure call is not
known until the time of the call at the run-time.
8. List any four important differences between Procedure oriented and Object oriented
programming.
POP
1) Emphasis on non-real itrem
2) Programs are divided into functions
3) Data are sharable
4) Structured Programming
MVIT/Dept of IT/2016-2017/ ODD SEM

51

II Yr/III Sem

PART-A

5) Top-Down Approach
OOP
1) Emphasis on real item
2) Programs are divided into Objects
3) Data are not sharable
4) Object Oriented Programming
5) Bottam-Up Arpproach
9. What are data members and member functions?
Classes use the concept of abstraction and are defined as a list of abstract attributes such
as size, weight, and cost and uses functions to operate on these attributes.
The attributes are sometimes called as data members because they hold information.
The functions that operate on these data are called as methods or member functions.
Eg: int a,b;
// a,b are data members
Void getdata ( ) ; // member function
10. What are the operators available in C++?
All operators in C are also used in C++. In addition to insertion operator << and
extraction operator >> the other new operators in C++ are,
::
Scope resolution operator
::*
Pointer-to-member operator
->*
Pointer-to-member operator
.*
Pointer-to-member operator
delete Memory release operator
endl
Line feed operator
new
Memory allocation operator
setw
Field width operator
11. What is a scope resolution operator?
The global version of a variable cannot be accessed from within the inner block in C
program. C++ solves this problem by introducing new operator : : called scope resolution
operator.
This is used to un cover a hidden variable and takes the following form
:: variable -name
Example:
Class MyClass
{
int n1, n2;
public:
{
void func1();
---------Function Declaration
}
};
public void MyClass::func1() ---Use of Scope Resolution Operator to write
Function definition outside class definition
{
// Function Code
MVIT/Dept of IT/2016-2017/ ODD SEM

52

II Yr/III Sem

PART-A

12. What are reference variable?


A reference variable provides an alias(alternative name) for a previously defined variable.
Total, then sum and total can be used interchancheably to represent that variable.
Syntax:
Data-type &reference-name = variable-name
Example:
float total = 100;
float &sum = total;
Now: total=100 and sum= 100
13. What is a default argument?
Default arguments assign a default value to the parameter, which does not have matching
argument in the function call. Default values are specified when the function is declared.
Example:
float amount(float principle,int period,float rate=0.15)
Function call is
Value=amount(5000,7);
Here it takes principle=5000& period=7
And default value for rate=0.15
Value=amount(5000,7,0.34)
Passes an explicit value 0f 0.34 to rate
We must add default value from right to left
14. Define Friend functions and write its syntax and properties.
Friend functions are special functions. The class grants these functions a special privilege
to access private and protected variables of the class.
Even though it is declared inside the class definition, it is not considered as member of a
class.
A friend function begins with the keyword friend.
It is possible to call the friend function using an object name and a class member access
operator(dot or arrow).
Instead friend functions are called like regular functions
General form of friend function
friend return_type function_name(argument list)
{
statement ;
}
Properties of friend functions.
Friend function is not in the scope of the class to which it has been declared
MVIT/Dept of IT/2016-2017/ ODD SEM

53

II Yr/III Sem

PART-A

as friend. Hence it cannot be called using the object of that class.


Usually it has object as arguments.
It can be declared either in the public or private part of a class.
It cannot access member names directly. It has to use an object name and dot
membership operator with each member name. eg: ( A . x )
15. Define Nested classes and Local classes.
Nested classes
A nested class is declared within the scope of another class. The name of a nested
class is local to its enclosing class.
Member functions of a nested class follow regular access rules and have no
special access privileges to members of their enclosing classes.
Member functions of the enclosing class have no special access to members of a
nested class. The following example demonstrates this:
class A
{
int x;
class B
{ };
};
Local classes
Classes can be defined and used inside a function or a block. such classes are
called local classes. It can use global variables and static variables declared inside the
function but cannot use automatic local variables.
Example:
void test(int a)
{
.
class student
{

};
student s1(a);
}

UNIT II
1. Define constructor and write its types and its characteristics.
A constructor is a special member function whose task is to initialize the objects of its
class.
It is special because its name is same as class name. The constructor is invoked
whenever an object of its associated class is created.
It is called constructor because it constructs the values of data members of the class.
Eg:
class integer
MVIT/Dept of IT/2016-2017/ ODD SEM

54

II Yr/III Sem

PART-A

public:
integer( ); //constructor

}
Types:1. Default constructor
2. Parameterized constructor
3. Copy constructor
Characteristics: A constructor takes the same name as the class name.
The programmer cannot declare a constructor as virtual or static, nor can the
programmer declare a constructor as const, volatile, or const volatile.
No return type is specified for a constructor.
The constructor must be defined in the public. The constructor must be a public
member.
Overloading of constructors is possible.
2. Define default constructor and parameterized constructor.
Default constructor
The constructor with no arguments is called default constructor
Eg:
Class integer
{
int m,n;
Public:
Integer( );
.
};
integer::integer( )//default constructor
{
m=0;n=0;
}
the statement
integer a;
invokes the default constructor
Parameterized constructor
Constructor with arguments is called parameterized constructor
Eg;
Class integer
{
int m,n;
public:
integer(int x,int y)
{
m=x;n=y;
MVIT/Dept of IT/2016-2017/ ODD SEM

55

II Yr/III Sem

PART-A

}
};
To invoke parameterized constructor we must pass the initial values as arguments to the
constructor function when an object is declared. This is done in two ways
1.By calling the constructor explicitly
eg: integer int1=integer(10,10);
2.By calling the constructor implicitly
eg: Integer int1(10,10);
3. Define copy constructor and dynamic constructor.
Copy constructor
A copy constructor is used to declare and initialize an object from another object. It
takes a reference to an object of the same class as an argument
Eg: integer i2(i1);
would define the object i2 at the same time initialize it to the values of i1.
Another form of this statement is
Eg: integer i2=i1;
The process of initializing through a copy constructor is known as copy initialization .
Dynamic constructor
Allocation of memory to objects at time of their construction is known as dynamic
constructor. The memory is allocated with the help of the NEW operator
Eg:
Class string
{
char *name;
int length;
public:
string( )
{
length=0;
name=new char[ length +1];
}
void main( )
{
string name1(Louis),name3(Lagrange);
}
4. Define destructor with its syntax.
It is used to destroy the objects that have been created by constructor. Destructor name
is same as class name preceded by tilde symbol(~)
Eg;
~integer()
{
}
A destructor never takes any arguments nor it does it return any value. The compiler upon
exit from the program will invoke it.
Whenever operator is used to allocate memory in the constructor, we should use delete to
free that memory.
MVIT/Dept of IT/2016-2017/ ODD SEM

56

II Yr/III Sem

PART-A

5. Define default argument constructor.


The constructor with default arguments are called default argument constructor
Eg:
Complex(float real,float imag=0);
The default value of the argument imag is 0
The statement complex a(6.0)
assign real=6.0 and imag=0
the statement
complex a(2.3,9.0)
assign real=2.3 and imag=9.0
6. What is the ambiguity between default constructor and default argument constructor?
The default argument constructor can be called with either one argument or no
arguments. When called with no arguments, it becomes a default constructor. When both these
forms are used in a class, it cause ambiguity for a statement such as A a;
The ambiguity is whether to call A::A() or A::A(int i=0)
7. Constructors cannot be overloaded. Justify with an example.
No. Constructors can be overloaded just like overloading of member functions and
operators of a class, by having multiple declarations of a constructor in same scope, with
different number and type and sequence of arguments of constructor.
#include <iostream.h>
class Overclass
{
public:
int x;
int y;
Overclass()
{ x = y = 0; }
Overclass(int a)
{ x = y = a; }
Overclass(int a, int b)
{ x = a; y = b; }
};
int main()
{
Overclass A;
Overclass A1(4);
Overclass A2(8, 12);
cout << "Overclass A's x,y value:: " <<
A.x << " , "<< A.y << "\n";
cout << "Overclass A1's x,y value:: "<<
A1.x << " ,"<< A1.y << "\n";
cout << "Overclass A2's x,y value:; "<<
A2.x << " , "<< A2.y << "\n";
return 0;
}
Overclass A's x,y value:: 0 , 0
MVIT/Dept of IT/2016-2017/ ODD SEM

57

II Yr/III Sem

PART-A

Overclass A1's x,y value:: 4 ,4


Overclass A2's x,y value:; 8 , 12
8. Why cant you initialize the static member data in the constructors initialization list?
Static members are in class scope i.e they are class variable not instance variable.We
initialize instances by constructor. As static variable are not for the instance but for the entire
class so static variables are not initialized by constructor.
Static member variables are not associated with each object of the class. It is shared by
all objects. If you initialize in constructor then it means that you are trying to associate with a
particular instance of class. Since this is not possible, it is not allowed.
9. What is operator overloading? What is the purpose of using operator function?
C++ has the ability to provide the operators with a special meaning for a data type. This
mechanism of giving such special meanings to an operator is known as Operator overloading. It
provides a flexible option for the creation of new definitions for C++ operators.
Purpose of using operator function
To define an additional task to an operator, we must specify what it means in relation to
the class to which the operator is applied. This is done by Operator function , which describes
the task.
Operator functions are either member functions or friend functions. The general form is
return type classname :: operator (op-arglist )
{
function body
}
where return type is the type of value returned by specified operation.
Op- operator being overloaded. The op is preceded by a keyword operator. operator op is the
function name.
10. List out any four operators that cannot be overload.
Class member access operator (. , .*)
Scope resolution operator (::)
Size operator ( sizeof )
Conditional operator (?:)
11. How an overloaded operator can be invoked using member functions and friend
functions?
Overload Unary & Binary operator using member functions?
When unary operators are overloaded using member functions it takes no explicit
arguments and return no explicit values. When binary operators are overloaded using member
functions, it takes one explicit argument. Also the left hand side operand must be an object of
the relevant class.
In case of Unary operators, overloaded operator can be invoked as
op
object_name or object_name op Eg:- +s or s+
In case of binary operators, it would be invoked as Object.
operator op(y)
Eg:- a+b
where op is the overloaded operator and y is the argument.
Overload Unary and Binary operator using Friend functions?
When unary operators are overloaded using friend function, it takes one reference
MVIT/Dept of IT/2016-2017/ ODD SEM

58

II Yr/III Sem

PART-A

argument (object of the relevant class) When binary operators are overloaded using friend
function, it takes two explicit
arguments.
In case of unary operators, overloaded operator can be invoked as
Operator op (x);
In case of binary operators, overloaded operator can be invoked as Operator op (x , y)
12. List out the operators that cannot be overloaded using Friend function.
Assignment operator =
Function call operator ( )
Subscripting operator [ ]
Class member access operator
13. Explain basic to class type conversion with an example.
Conversion from basic data type to class type can be done in destination class.
Using constructors does it. Constructor takes a single argument whose type is to be converted.
Eg: Converting int type to class type
class time
{
int hrs,mins;
public:
.
Time ( int t) //constructor
{
hours= t/60 ; //t in minutes
mins =t % 60;
}
};
Constructor will be called automatically while creating objects so that this conversion is done
automatically.
14. Explain class to basic type conversion with an example.
Using Type Casting operator, conversion from class to basic type conversion can be
done. It is done in the source class itself.
Eg: vector : : operator double( )
{
double sum=0;
for(int I=0;I<size;I++)
sum=sum+v[ i ] *u[ i ] ;
return sqrt ( sum ) ;
}
This function converts a vector to the corresponding scalar magnitude.
15. What do you mean by explicit constructor?
Conversion from one class type to another is the combination of class to basic and basic
to class type conversion. Here constructor is used in destination class and casting operator
function is used in source class.
Eg: objX = objY
MVIT/Dept of IT/2016-2017/ ODD SEM

59

II Yr/III Sem

PART-A

objX is the object of class X and objY is an object of class Y. The class Y type data is
converted into class X type data and the converted value is assigned to the obj X. Here class Y is
the source class and class X is the destination class.

UNIT III
1. What do you mean by Template in C++?
C++ supports a mechanism known as templates to implement the concept of generic
programming. Template allows us to generate a family of classes or family of function to
handle different data type. Template classes and function illuminate code duplication for
different types and thus make program development easier and manageable.
Two specifications:
1. Class template
2. Function template
2. Define Function template with its syntax.
The generic function outlined by specification of a generic type using template
keyword. The actual function is defined later using the template.
Syntax:-

MVIT/Dept of IT/2016-2017/ ODD SEM

60

II Yr/III Sem

PART-A

template<class T>
return type function name (arguments of typeT)
{
//
//body of the function with type T
//wherever appropriate
};
Where template is a keyword , typename T is a template data type.
Need for Function Template:
Function Template is generic function which works for any data type that is passed to
them.
The data type need not to be specified while writing the function.
When using the template function, we can pass the data type and get the required
functionality.
Also it is possible that we may not specify the data type and the compiler deduces it for
us
3. Define Class template with its syntax.
Classes can also be declared to operate on different data types. Such classes are called
class templates. A class template specifies how individual classes can be constructed similar to
normal class specification
Syntax of class template
template <class T1,class T2,>
class classname
{
T1 data1;
.
//functions of template arguments T1,T2,.
void func1(T1 a,T2 &b);

T func2(T2 *x,T2 *y);


};
4. Write a template function that returns the average of all the elements of an array.
#include<iostream.h>
template<class T>
T average(T array,int size)
{
T i, avg, result=0;
for(i=o;i<size;i++)
{
result=result+array[i];
}
avg=result/size;
return avg;
}
MVIT/Dept of IT/2016-2017/ ODD SEM

61

II Yr/III Sem

PART-A

int main()
{
int s;
int a[]={1,2,3,4,5,6,7,8,9,10};
s=average(a,10);
cout<<"Average value of int is:"<<s<<endl;
return 0;
}
5. What is an Exception? List down the various types.
Errors which occur during the program execution, due to some fault in the input data is
called Exception.
Exception refers to unexpected condition in a program. The unusual conditions could be
faults, causing an error which in turn causes the program to fail. The error handling mechanism
of C++ is generally referred to as exception handling.
Two types of exceptions:Exceptions are classifieds into
a)Synchronous exception
The technique that is not suitable to handle the current class of data,
within the program are known as synchronous exception
b) Asynchronous exception
The exceptions caused by events or faults unrelated to the program and
beyond the control of program are called asynchronous exceptions
6. What is Exception handling? How its handled in C++?
The blocks related to exception handling constructs are
try
throw
catch
The keyword try is used to preface a block of statements which may generate
exceptions. This block of statements is known as try block.
When an exception is detected, it is thrown using throw statement in the try block.
A catch block catches the exception thrown by the throw statement in the try block and
handles it appropriately.
Syntax:
try
{

throw exception;
}
catch (type arg)
{
}
7. Draw the Exception handling model?
MVIT/Dept of IT/2016-2017/ ODD SEM

62

II Yr/III Sem

PART-A

Try block
Perform operation which may
throw or invoke external function
if needed

Throw block

Invoke function having throw block


exception

If(failure)
Throw object;

exception
Catch block
Catches all exceptions thrown from
within try block or by function
invoked within a try block

8. List out the tasks to be performed for error handling code.


1) Detect the problem causing exception (Hit the exception)
2) Inform that an error has occurred (Throw the exception)
3) Receive the error information (Catch the exception)
4) Take corrective actions (Handle the exceptions)

9. Write the functions to handle uncaught exceptions.


1)terminate()
2)set_terminate()
3)unexpected()
4)set_unexpected()
10. List out some of the error handling functions.
a)eof()-Returns true if end-of-file is encountered
b)fail()-Returns true when an input or output operation has failed
c)bad()-Returns true if invalid operation is attempted by or any uncoverable error has
occurred
d)good()-Returns true if no error has occurred
11. Write the syntax of try construct.
The try keyword defines a boundary within which an exception can occur.A block of
code in which an exception can occur must be prefixed by the keyword try.Following the try
keyword is a block of code enclosed by braces.This indicates that the program is prepared to
test for the existence of exceptions
MVIT/Dept of IT/2016-2017/ ODD SEM

63

II Yr/III Sem

PART-A

Keyword
try
{
//code raising exception or referring to a function raising exception
}
catch(type_id1)
{
//actions for handling an exception
}

catch(type_idn)
{
//actions for handling an exception
}
12. Write the syntax of catch construct.
The exception handler is indicated by the catch keyword. It must be used immediately
after the statements marked by the try keyword. The catch handler can also occur immediately
after another catch. Each handler will only evaluate an exception that matches, or can be
covered to the type specified in its argument list.
Keyword

object name or nameless object

Catch(T)
{
//

actions for handling an exception

}
13. Write the syntax of throw construct.
The keyword throw is used to raise an exception when an error is generated in the
computation. The throw expression initializes a temporary object of the type T (to match the
type of argument arg ) used in throw(T arg )
Named object, nameless object
Keyword
throw T;
14. Define terminate and unexpected functions.
terminate() is a library function which by default aborts the program
It is called whenever the exception handling mechanism cannot find a handler for a thrown
MVIT/Dept of IT/2016-2017/ ODD SEM

64

II Yr/III Sem

PART-A

exception.
Syntax of terminate:
void terminate( );
unexpected() is called when a function with an exception specification throws an
exception of a type that is not listed in the exception specification for the function.
A function declaration without a specification like throw(char*) may throw any type of
exception, and one with throw() is not allowed to throw exceptions at all.
By default unexpected() calls terminate().
Syntax of unexpected:
void unexpected( );
15. What you mean by uncaught exception?
uncaught_exception( ) function: It returns true when throw has happened for an
exception, but no catch statement is executed. Once catch is executed the function returns false.
Syntax:
bool uncaught_exception( );

UNIT IV
1. Define Inheritance and its types.
The mechanism of deriving a new class from an old one is called inheritance (or)
derivation.
The new class is referred as base class and new one is called derived or sub-class.
Different forms of Inheritance:
Single inheritance
Multiple inheritance
Hierarchical inheritance
Multilevel inheritance
Hybrid inheritance
2. List the rules for inheritance.
1) The default mode is private
2) Difficult to inherit the base class private members
3) The base class public and protected member functions are considered as public and
protected member functions in derived class, When those class is publicly inherited from base
class
4) The base class public and protected member functions are considered as private
member function in derived class, when those class is privately inherited from base class
3. Define single and multilevel inheritance with its syntax.
MVIT/Dept of IT/2016-2017/ ODD SEM

65

II Yr/III Sem

PART-A

Single inheritance
If a single class is derived from a single base class is called single inheritance.
Eg:
Base class
A
Derived class

Multilevel inheritance
If a class is derived from a class, which in turn is derived from another class, is
called multilevel inheritance. This process can be extended to any number of levels.
Eg:
Base class Grand father
Intermediate Base class Father
Derived class Child

4. Define multiple and hierarchical inheritance with its syntax.


Multiple inheritance
If a class is derived from more than one base class, it is called multiple inheritance.
Eg: Base classes
A

Derived class
C

Here class C is derived from two base classes A & B.


Hierarchical inheritance
If a number of classes are derived from a single base class then it is called
hierarchical inheritance.
A
Eg : Hierarchical classification of students in University
B

5. List the class members visibility.


There are three visibilities of class members. They are
i) Public visibility
The class members are visible to the base class, derived classes and
outside the class through the objects
ii) Private visibility
The class members are visible only to the base class itself but not to the
derived class
iii) Protected visibility
The class members are visible to the base and derived classes
MVIT/Dept of IT/2016-2017/ ODD SEM

66

II Yr/III Sem

PART-A

6. What is meant by Abstract base class?


1. A class without any object is called abstract class. An abstract class has atleast one pure
virtual member function. Instances of an abstract class cannot be created.
class File
//abstract class
{
public:
int virtual open( )=0;
//pure virtual
int virtual close( )=0;
//pure virtual
};
2. A class that serves only as a base class from which derived classes are derived. No
objects of an abstract base class are created. A base class that contains pure virtual function is an
abstract base class.
7. Write short notes on virtual base class.
A base class that is qualified as virtual in the inheritance definition. In case of multiple
inheritance, if the base class is not virtual the derived class will inherit more than one copy of
members of the base class. For a virtual base class only one copy of members will be inherited
regardless of number of inheritance paths between base class and derived class.
Eg: Processing of students results. Assume that class sports derive the roll
number from class student. Class test is derived from class Student. Class result is
derived from class Test and sports. As a virtual base class
8. What are virtual functions?
A function defined with virtual keyword in the base class is known as virtual function.
Compiler will decide the exact class pointed to, by the base class pointer and call the respective
function of that class if the function is defined as virtual.
9. Write some of the basic rules for virtual functions.
Virtual functions must be member of some class.
They cannot be static members and they are accessed by using object pointers
Virtual f unction in a base class must be defined.
Prototypes of base class version of a virtual function and all the derived class versions
must be identical.
If a virtual function is defined in the base class, it need not be redefined in the derived
class.
10. What are pure virtual functions? Write the syntax.
A pure virtual function is a function declared in a base class that has no definition
relative to the base class. In such cases, the compiler requires each derived class to either
define the function or redeclare it as a pure virtual function. A class containing pure virtual
functions cannot be used to declare any object of its own. It is also known as donothing
function.
The do-nothing function is defined as follows:
virtual void display ( ) =0;
MVIT/Dept of IT/2016-2017/ ODD SEM

67

II Yr/III Sem

PART-A

11. What is polymorphism? Write its types.


Polymorphism is the ability to take more than one form. An operation may
exhibit different behaviors in different. The behavior depends upon the type of data used.
Types of polymorphism
Basic Types
i)Runtime polymorphism
ii)Compile time polymorphism
Major Types
a.Run-time polymorphism
b.Compile time polymorphism
c.ad-hoc polymorphism
d.Parametric polymorphism
e.Virtual functions
f.Function name overloading
g.Operator overloading
12. What is RTTI? Write its parts.
Run-time type information (RTTI) is a mechanism that allows the type of an object to be
determined during program execution
Three parts of RTTI system
1) RTTI description of Base Types
2) Property Description of compound and container types
3) Property iterators
Other functions of RTTI
i) insert elements into the container
ii) delete elements of the container
iii) iterate through the elements of the container
13. Write the purpose of typeid operator.
The typeid operator provides a program with the ability to retrieve the actual derived type
of the object referred to by a pointer or a reference.This operator is used along with the
dynamic_cast operator
14. Define dynamic casting.
Dynamic cast allows us to downcast a data type from one to a more specific one in the
same hierarchy.
15. Define Down casting and Upcasting.
Downcasting
Downcasting is used to cast a pointer or reference to a base class to a derived
class. Downcasting is the opposite of the basic object-oriented rule, which states objects
of a derived class, can always be assigned to variables of a base class. Since base class
variables can only sometimes be assigned to variables of a derived class downcasting
doesnt always work
Upcasting
Upcasting means classes can easily converge to a general class
MVIT/Dept of IT/2016-2017/ ODD SEM

68

II Yr/III Sem

PART-A

UNIT V
1. What are streams?
A Stream is a sequence of bytes. It can either as a source from which the input data can
be obtained or as a destination to which the output data can be sent.
The stream source that provides data to the program is called the input stream and the
destination stream that receives output from the program is called output stream
Input Stream
Input Device

2. List
out some of the unformatted I/O operators.
Output
a) put()
Device
b) get()
Output Stream
c) getline()
d) write()
3. List any four I/O Manipulators supported by C++ stream.
a) setw(int width)
b) setprecision(int prec)
c) setfill(int fchar)
d) setbase(int base)
e) setiosflags(long flags)
f) resetioflags(long flags)

Extraction
from Input
Stream
Program
Insertion into
Output Stream

4. Draw the hierarchy of console stream classes.

MVIT/Dept of IT/2016-2017/ ODD SEM

69

II Yr/III Sem

PART-A
ios

istream

Streambuf
*bp=&strstreambase::
bug

streambuf
ostream
iostream

istream_withassi
gn

iostream_withassig
n

ostream_withass
ign

5. List out some of the formatted I/O operations and also list some of ios functions.
C++ supports a number of features that could be used for formatting the output.
These features include
a) ios stream class member functions and flags
b) Standard manipulators
c) User defined manipulators
Some of the ios functions
a) width()
b) precision()
c) fill()
d) setf()
e) unsetf()
6. Write the syntax of creating a custom or own manipulator.
The users can design their own manipulators to control the appearance of the output
Syntax of creating a custom manipulator
Ostream & manipulator(ostream & output, arguments_if_any)
{

(manipulator code)

Return output;
}
7. What are the flags that do not have bit fields?
a) ios::showbase

- Use base indicator on output

b) ios::showpos

- Print + before positive integers

c) ios::showpoint

- Show trailing decimal point and zeros

d) ios::uppercase

- Use uppercase letters for hex output

e) ios::unitbuf - Flush all streams after insertion


g) ios::stdio

- Flush stdout and stderr after insertion

MVIT/Dept of IT/2016-2017/ ODD SEM

70

II Yr/III Sem

PART-A

8. What is a file?
A file is a collection of related information defined by its creator. Files represent
programs (both source and object forms) and data. Data may be numeric, alphabetic, or
alphanumeric. Files may be free-form, such as text files, or may be rigidly formatted.
9. List some of the file modes.
1) ios::in
2) ios::out
3) ios::ate
4) ios::app
5) ios::trunk
6) ios::nocreate
7) ios::noreplace
8) ios::binary
10. What are the functions that the file stream class provides?
a) seekg()-Moves get pointer to a specified location
b) seekp()-Moves put pointer to a specified location
c) tellg()-Gives the current position of the get pointer
d) tellp()-Gives the current position of the put pointer
11. What is namespaces? Give an example.
ANSI C++ Standard has added a new keyword namespace to define a scope that could
hold global identifiers.The best example of namespace scope is the C++ Standard Library.All
classes,functions and templates are declared within the namespace named std.
Using namespace std;
The using namespace statement specifies that the members defined in std namespace
will be used frequently throughout the program
Syntax for defining a namespace
namespace namespace_name
{
//Declaration of
//variables,functions,classes,etc.
}
12. What are the member functions in String objects?
The member functions such as
MVIT/Dept of IT/2016-2017/ ODD SEM

71

II Yr/III Sem

1.
2.
3.
4.

PART-A

insert ()
replace ()
erase ()
append ().

13. What is Standard Template Library? List its components.


The collection of these generic classes and functions is called the Standard Template
Library.
Components of STL
The STL contains several components. They are
1)Containers
2)Algorithms
3)Iterators
14. Define Container, Algorithm and Iterator.
Container
A container is an object that actually stores data.It is a way data is organized in memory.
The STL containers are implemented by template classes and therefore can be easily
customized to hold different types of data
Algorithm
An algorithm is a procedure that is used to process the data contained in the containers.
The STL includes many different kinds of algorithms to provide support to tasks such as
initializing, searching, copying, and sorting and merging
Iterator
An iterator is an object that points to an element in a container. We can use iterators to
move through the contents of containers. Iterators are handled just like pointers
15. What are the three types of containers?
The STL contains three types of containers
1) Sequence containers
i) Vector
ii) list
iii) deque
2) Associative containers
i) Set
ii) Multiset
iii) Map
iv) Multimap
3) Derived containers
i)Stack
ii)Queue
iii)Priority_queue
MVIT/Dept of IT/2016-2017/ ODD SEM

72

II Yr/III Sem

PART-A

IT T35 DIGITAL SYSTEM DESIGN


2 MARKS
UNIT I
1. Define number system and its types?
A number system relates quantities and symbols. The base of a number system
represents the number of digits or basic symbols in that particular number system.
Types
o
o
o
o

Decimal number system(0-9)


Hexa decimal Number system(0-15)
Octal Number system(0-7)
Binary Number system(0,1)

2. How to convert a Decimal number into other number system?


Eg:Decimal to Binary:

3. How will you convert a other number into Decimal number?


Binary to Decimal:
Example:

MVIT/Dept of IT/2016-2017/ ODD SEM

73

II Yr/III Sem

PART-A

4. How will you convert a Binary number into Octal number?


ANS:

5. How will you convert a Binary number into Hexa Decimal number?
ANS:

6. How will you convert an Octal number into Binary number?


Ans:
7. How will you convert an Hexa number into Binary number?
Ans:

8. State the limitations of karnaugh map.


i)
Generally it is limited to six variable map (i.e) more then six variable involving
expression are not reduced.
ii)
ii) The map method is restricted in its capability since they are useful for
simplifying only Boolean expression represented in standard form.
9. What are the Basic logic gates and Universal Gates?
Basic Logical gate
AND gate()
OR gate ()
NOT gate ()
Universal Gates
NAND gate
NOR gate
10. What is the use of Karnauph Map method?
This method is used to simplify Boolean algebra expressions. It reduces the need for
extensive calculations by taking advantage of humans' pattern-recognition capability,
permitting the rapid identification and elimination of potential race conditions.
11. What is meant by dualality?
Duality property states that every algebraic expression deducible from the postulates Of
Boolean algebra remains valid if the operators and identity elements are interchanged. If
the dual of an algebraic expression is desired, we simply interchange OR and AND
operators and replace 1's by 0's and 0's by 1's
12. What is meant by Dont care conditions?
Functions that have unspecified output for some input combinations are called
incompletely specified functions. Unspecified minterms of a functions are called dont
MVIT/Dept of IT/2016-2017/ ODD SEM

74

II Yr/III Sem

PART-A

care conditions. We simply dont care whether the value of 0 or 1 is assigned to F for a
particular minterm. Dont care conditions are represented by X in the K-Map table.
13. What are the specialities of Tabulation Method?
It is more efficient for use in computer algorithms, and it also gives a deterministic way
to check that the minimal form of a Boolean function has been reached. It is sometimes
referred to as the tabulation method.
14. State De Morgan's theorem.
De Morgan suggested two theorems that form important part of Boolean algebra. They
are,
1) The complement of a product is equal to the sum of the complements. (AB)' = A' +
B'
2) The complement of a sum term is equal to the product of the complements. (A + B)'
= A'B'
15. Simplify the following expression Y = (A + B) (A + C) (B' + C)
Y = (A + B) (A + C) (B' + C)
= (AA' + AC +A'B +BC) (B' + C') [A.A' = 0]
= (AC + A'B + BC) (B' + C)
= AB'C + ACC' + A'BB' + A'BC' + BB'C + BCC'
Y= AB'C + A'BC'

MVIT/Dept of IT/2016-2017/ ODD SEM

75

II Yr/III Sem

PART-A

UNIT II
1. What are an Adder and its types?
An adder or summer is a digital circuit that performs addition of numbers.
Types:
a. Half-adder
b. Full-adder
2. Define ripple carry adder?
Create a logical circuit using multiple full adders to add N-bit numbers. Each full adder
inputs a Cin, which is the Cout of the previous adder. This kind of adder is a ripple carry
adder, since each carry bit "ripples" to the next full adder.
3. Define - Carry Look-ahead Adders?
It is used to reduce the computation time by creating P and G signal(p is sum output of
adder ,G is carry generator.
4. What is meant by a half subtractor and full subtractor?
Half subtractor: subtract two bit and produce their difference and borrow.
Full subtractor: It is subtract two bits and also taken into account borrow of the lower
significant stage.
5. Define code converters and write examples?
These are circuits that translate a code into another. Usually this converters are
programmed in logic arrays.
Eg:Binary to gray ,gray to binary.
6. How will you convert a Binary number into BCD?

Binary to BCD Converter

Shift and Add-3 Algorithm


1. Shift the binary number left one bit.
2. If 8 shifts have taken place, the BCD number is in the Hundreds, Tens, and Units
column.
3. If the binary value in any of the BCD columns is 5 or greater, add 3 to that value in
that BCD column. 4. Go to 1.

MVIT/Dept of IT/2016-2017/ ODD SEM

76

II Yr/III Sem

PART-A

7. Draw the diagram for Binary Parallel adder?

8.

Define Magnitude Comparator


A digital comparator or magnitude comparator is a hardware electronic device that
takes two numbers as input in binary form and determines whether one number is greater than,
less than or equal to the other number.

9.
Difference between Decoder and encoder?
Decoder
Encoder
n input, 2n output eg:2 input 4 output
2n input, n output eg:4input 2 output
input of the decoder is encode the n i/p
input of the decoder is encode the 2n i/p
and producing 2n o/p
and producing n o/p

10. Define Multiplexer (or) data selector?

MVIT/Dept of IT/2016-2017/ ODD SEM

77

II Yr/III Sem

PART-A

Multiplexer or mux is a device that selects one of several analog. multiplexer of 2n


inputs has n select lines, which are used to select which input line to send to the output.
Multiplexers are mainly used to increase the amount of data that can be sent over the
network within a certain amount of time and bandwidth.
11. Define Demultiplexer?

One i/p to many o/p.The selection of specific o/p line is controlled by the value of
selection lines.
12. List out the Features of Parity Generator?
1. Generates either odd or even parity for nine data lines
2. Inputs are buffered to lower the drive requirements
3. Can be used to upgrade existing systems using MSI parity circuits
4. Cascadable for N-bits
5. Advanced oxide-isolated, ion-implanted Schottky TTL process
13. What are the types of Parity bits?
Even Parity Bit
Odd parity Bit
14. Write the design procedure for combinational circuits.
a. The problem definition
b. Determine the number of available input variables & required O/P variables.
c. Assigning letter symbols to I/O variables
d. Obtain simplified Boolean expression for each O/P.
e. Obtain the logic diagram.
15. What is priority Encoder?
A priority encoder is an encoder circuit that includes the priority function. In priority
encoder, if 2 or more inputs are equal to 1 at the same time, the input having the highest
priority will take precedence.

MVIT/Dept of IT/2016-2017/ ODD SEM

78

II Yr/III Sem

PART-A

UNIT III
1.

Difference between Latches and flip-flop?


flip-flop
A flip-flop samples the inputs only at a
clock event (rising edge, etc.)

Latch
A Latch samples the inputs
continuously whenever it is enabled, that is,
only when the enable signal is on. (or
otherwise, it would be a wire, not a latch).

Flip-Flop are edge sensitive.


Flipflop is sensitive to signal change and
not on level. They can transfer data only
at the single instant and data cannot be
changed until next signal change.

Latches are level sensitive.


Latch is sensitive to duration of pulse and
can send or receive the data when the switch
is on.

A flip-flop continuously checks its inputs


and correspondingly changes its output
only at times determined by clocking
signal.

Latch is a device which continuously checks


all its input and correspondingly changes its
output, independent of the time determined
by clocking signal.

It work's on the basis of clock pulses.

It is based on enable function input

It is a edge trigerred , it mean that the


output and the next state input changes
when there is a change in clock pulse
whether it may a +ve or -ve clock pulse.

It is a level trigerred , it mean that the output


of present state and input of the next state
depends on the level that is binary input 1 or
0.

2. Write the truth table for SR Latchs?

MVIT/Dept of IT/2016-2017/ ODD SEM

79

II Yr/III Sem

PART-A

3. Draw the diagram for SR NAND latch?

4. What is meant by D-Flip-flop?


It is a delay flipflop. During the occurrence of clock pulse if D=1, the o/p s set and if
D=0 the o/p is reset.
5.

Define Master slave Flip-flop with logical diagram?


It consist of two flip flop where one is master another one is slave. The o/p of the master
flip flop is fed as an input to the slave flip flop. It triggered at the positive edge of the
clock and slave flip flop triggered at the negative edge of clock pulse

6. Define T flip-flop.
It is called as toggle flipflop. When T=0 No change in o/p.When T=1 the o/p switch to the
complement state(or)toggles
7. Define sequential circuit?
The circuit in which the o/p variable depend not only on the present state but they also
depend upon the past history of these i/p variable are known as sequential circuit .Eg: flip
flop, counter, register.
8. Define State Table and state table?
State diagram is the pictorial representation of behavior of sequential circuit the state is
represented by circle and transition between the state for different i/p condition is
represented by directed line connecting circle.
State table is the transition of state diagram into tabular form, It represent relationship
among i/p and o/p and flip flop.
9. Define race around condition.
In JK flip-flop output is fed back to the input. Therefore change in the output results
change in the input. Due to this in the positive half of the clock pulse if both J and K are
high then output toggles continuously. This condition is called race around condition.
10. Define state assignment?
It is an one step in the design of sequential circuit which assigns binary values to the states
in such a way that it reduces the cost of the combinational circuit that drives the flip flop.
11. Define Registers and its types?
In computer architecture, a processor register (or general purpose register) is a small
amount of storage available on the CPU whose contents can be accessed more quickly
MVIT/Dept of IT/2016-2017/ ODD SEM

80

II Yr/III Sem

PART-A

than storage available elsewhere. Typically, this specialized storage is not considered part
of the normal memory range for the machine.
12. Define Shift Register
A shift register is a cascade of flip flops, sharing the same clock, which has the output of
any one but the last flip-flop connected to the "data" input of the next one in the chain,
resulting in a circuit that shifts by one position the one-dimensional "bit array" stored in
it, shifting in the data present at its input and shifting out the last bit in the array, when
enabled to do so by a transition of the clock input.
13. Define Counters and its types?
In digital logic and computing, a counter is a device which stores (and sometimes
displays) the number of times a particular event or process has occurred, often in
relationship to a clock signal.
14. What are state reduction and the use?
It is the used to reduce the redundant state so, we can reduce the number of gates and flip
flop and also reducing cost.
15. What is ASM chart?
An ASM chart is a method of describing the sequential operations of a digital system.

MVIT/Dept of IT/2016-2017/ ODD SEM

81

II Yr/III Sem

PART-A

UNIT IV
1. What is a memory an its types of memory?
Memory is a storage device to store data, instructions and intermediate values.
There are 2 types of memory.
1. Main memory or Primary memory
2. Mass memory or Secondary memory
2. What are the type of RAM?
1. static RAM (SRAM)
2. dynamic RAM
3. Differentiate RAM with ROM.
S.NO

RAM

ROM

Random Access Memory or RAM is a


form of data storage that can be accessed
randomly at any time, in any order and
from any physical location. Allowing
quick access and manipulation.

Read-only memory or ROM is also a


form of data storage that cannot be
easily altered or reprogrammed. Stores
instructions that are not necessary for
re-booting up to make the computer
operate when it is switched off. They
are hardwired.

RAM allows the computer to read ROM stores the program required to
data quickly to run applications. It allows initially boot the computer. It only
reading and writing.
allows reading.

RAM is volatile i.e. its contents are lost


when the device is powered off.

ROM stores the program required to


initially boot the computer. It only
allows reading.

The two main types of RAM are static


RAM and dynamic RAM.

The types of ROM include PROM,


EPROM and EEPROM.

4. What is meant by RAM parity?


RAM parity determines whether a random access memory unit stores a parity bit for
error detection purposes. Non-parity RAM does not include a parity bit, and parity RAM
does. Parity RAM requires one additional bit to be stored with each byte of information,
requiring memory modules to store 9, rather than 8, bits for every byte.
5. What are the verities of PLDs?
MVIT/Dept of IT/2016-2017/ ODD SEM

82

II Yr/III Sem

PART-A

PLA (Programmable Logic Array)


PAL (Programmable Array Logic)
GAL (Gated Array Logic)

6. What is meant by ARQ?


If the channel capacity cannot be determined, or is highly varying, an error-detection
scheme may be combined with a system for retransmissions of erroneous data. This is
known as automatic repeat request (ARQ), and is most notably used in the Internet. An
alternate approach for error control is hybrid automatic repeat request (HARQ), which is a
combination of ARQ and error-correction coding.
7. What is the error Detection Methods?
o Parity bits
o Repetition codes
o Checksums
o Cyclic redundancy checks (CRCs)
8. What are the Error Correction Methods?
o Automatic repeat request
o Error-correcting code
o Hybrid schemes
9. What is CPLD?
A complex programmable logic device(CPLD) is a programmable logic device with
complexity between that of PALs and FPGAs, and architectural features of both. The
main building block of the CPLD is a macrocell, which contains logic implementing
disjunctive normal form expressions and more specialized logic operations.
10. What are the types of ROM?
Programmable read-only memory (PROM)
o Erasable programmable read-only memory (EPROM)
o Electrically erasable programmable read-only memory (EEPROM)
o Electrically alterable read-only memory (EAROM)
o flash EEPROM
11. Write about FPGA.
A Field-programmable Gate Array (FPGA) is an integrated circuit designed to be
configured by the customer or designer after manufacturing "field-programmable". The
FPGA configuration is generally specified using a hardware description language (HDL),
similar to that used for an application-specific integrated circuit (ASIC) (circuit diagrams
were previously used to specify the configuration, as they were for ASICs, but this is
increasingly rare). FPGAs can be used to implement any logical function that an ASIC
could perform.
12. What is meant by a Hazard and its types?
In digital logic, a hazard in a system is an undesirable effect caused by either a
deficiency in the system or external influences. Logic hazards are manifestations of a
problem in which changes in the input variables do not change the output correctly due to
MVIT/Dept of IT/2016-2017/ ODD SEM

83

II Yr/III Sem

PART-A

some form of delay caused by logic elements (NOT, AND, OR gates, etc.) This results in
the logic not performing its function properly. Types of Hazards
1. Static Hazard
2. Dynamic Hazards
13. What is meant by Static Hazard?
A static hazard is the situation where, when one input variable changes, the output
changes momentarily before stabilizing to the correct value. There are two types of static
hazards:

Static-1 Hazard: the output is currently 1 and after the inputs change, the output
momentarily changes to 0 before settling on 1
Static-0 Hazard: the output is currently 0 and after the inputs change, the output
momentarily changes to 1 before settling on 0

14. . What is meant by dynamic Hazard?


A dynamic hazard is the possibility of an output changing more than once as a result of
a single input change. Dynamic hazards often occur in larger logic circuits where there
are different routes to the output (from the input). If each route has a different delay, then
it quickly becomes clear that there is the potential for changing output values that differ
from the required / expected output. e.g. A logic circuit is meant to change output state
from 1 to 0, but instead changes from 1 to 0 then 1 and finally rests at the correct value 0.
This is a dynamic hazard.
15. How we can avoid the Hazards?
1. All adjacent input combinations, having same output occur within some sub cube of
the corresponding function.
2. Every pair of adjacent 1 cells and every pair of adjacent 0 cells in the K-map of a
switching function should be covered by at least one sub cube. The expression derived from
such a collection of sub cubes is called hazard free switching function and it leads to the
implementation of hazard free switching circuit.

MVIT/Dept of IT/2016-2017/ ODD SEM

84

II Yr/III Sem

PART-A

UNIT V
1.What is Verilog?
Verilog is a general purpose hardware descriptor language. It is similar in syntax to the C
programming language. It can be used to model a digital system at many levels of abstraction
anging from the algorithmic level to the switch level.
2. What are the various modeling used in Verilog?
1. Gate-level modeling 2. Data-flow modeling
3. Switch-level modeling 4. Behavioral modeling
3. What is the structural gate-level modeling?
Structural modeling describes a digital logic networks in terms of the components that wake
up the system. Gate-level modeling is based on using primitive logic gates and specifying how
they are wired together.
4. What is Switch-level modeling?
Verilog allows switch-level modeling that is based on the behavior of MOSFETs. Digital
circuits at the MOS-transistor level are described using the MOSFET switches.
5. What are identifiers?
Identifiers are names of modules, variables and other objects that we can reference in the
design. Identifiers consists of upper and lower case letters, digits 0 through 9, the underscore
character(_) and the dollar sign($). It must be a single group of characters. Examples: A014,
a, b, in_o, s_out
6. What are the value sets in Verilog?
Verilog supports four levels for the values needed to describe hardware referred to as value
sets.
Value levels Condition in hardware circuits
0 Logic zero, false condition
1 Logic one, true condition
X Unknown logic value
Z High impedance, floating state
7. What are the types of gate arrays in ASIC?
1) Channeled gate arrays 2) Channel less gate arrays 3) Structured gate arrays
8. Give the classifications of timing control
Methods of timing control:
1. Delay-based timing control
MVIT/Dept of IT/2016-2017/ ODD SEM

2.Event-based timing control


85

II Yr/III Sem

3. Level-sensitive timing control


Types of delay-based timing control:
1. Regular delay control
3. Zero delay control
Types of event-based timing control:
1. Regular event control
3. Event OR control

PART-A

2.Intra-assignment delay control

2.Named event control


4.Level-sensitive timing control

9 .Give the different arithmetic operators?


Operator symbol Operation performed Number of operands
* Multiply
Two / Divide
Two
+ Add Two
- Subtract Two
% Modulus
Two
* Power (exponent) Two
10. Give the different bitwise operators.
Operator symbol Operation performed Number of operands
~ Bitwise negation
One & Bitwise and
Two
| Bitwise or Two
^ Bitwise xor
Two
^~ or ~^ Bitwise xnor
Two ~& Bitwise nand
Two
~| Bitwise nor Two
11. What are gate primitives?
Verilog supports basic logic gates as predefined primitives. Primitive logic function keyword
provides the basics for structural modeling at gate level. These primitives are instantiated like
modules except that they are predefined in verilog and do not need a module definition. The
important operations are and, nand, or, xor, xnor, and buf(non-inverting drive buffer).
12. Give the two blocks in behavioral modeling.
1. An initial block executes once in the simulation and is used to set up initial
conditions and step-by-step data flow.
2. An always block executes in a loop and repeats during the simulation.
13. What are the types of conditional statements?
MVIT/Dept of IT/2016-2017/ ODD SEM

86

II Yr/III Sem

PART-A

1. No else statement
Syntax: if ([expression]) true statement; 2. One else
statement
Syntax: if ([expression]) true statement; else falsestatement;
3. Nested if-else-if
Syntax : if ( [expression1] ) true statement 1; else if
( [expression2] ) true-statement 2; else if ( [expression3]
) true-statement 3; else default-statement;

IT T 36 COMPUTER ORGAVIZATION
UNIT-I
1. What are the basic functional units of a computer?
MVIT/Dept of IT/2016-2017/ ODD SEM

87

II Yr/III Sem

PART-A

A computer consists of five functionally independent main parts namely


Input Unit
Memory Unit
Arithmetic and logic Unit
Output Unit
Control Unit
2. Define RAM.
Memory in which any location can be reached in a short and fixed amount of time after
specifying its address is called random access memory.
3. What is instruction register (IR) and program counter (PC) used for ?
The instruction register (IR) holds the instruction that is currently being executed .Its output is
available to the control circuits which generate the timing signals that control the various
processing elements.
The program counter PC is used to keep track of the execution of the program. It contains the
memory address of the next instruction to be fetched and executed.
4. What is an interrupt?
An interrupt is a request from an I/O device for service by the processor. The processor provides
the requested service by executing an appropriate interrupt service routine.
5. What do you mean by multiprogramming or multitasking?
The operating system manages the concurrent execution of several application programs to make
best possible use of computer resources. This pattern of concurrent execution is called
multiprogramming or multitasking.
6. What is pipelining.
Pipelining is the means of executing machine instructions concurrently.
It is the effective way of organizing concurrent activity in a computer system.
It is a process of substantial improvement in the performance by overlapping the execution of
successive instructions.
7. What are the different types of addressing modes available?
The different types of addressing modes available are:
Immediate addressing mode
Register addressing mode
Direct or absolute addressing mode
Indirect addressing mode
Indexed addressing mode
Relative addressing mode
Auto-increment
Auto-decrement
8. What is Stack?

MVIT/Dept of IT/2016-2017/ ODD SEM

88

II Yr/III Sem

PART-A

A stack is a list of data elements, usually words or bytes with the accessing restriction
that elements can be added or removed at one end of the list only. It follows last in first
out (LIFO) mechanism.
9. What is a queue?
Is a type of datastructure in which the data are stored in and retrieved on a First in first
out(FIFO) basis. It grows in the direction of increasing addresses in the memory. New
data are added at the back (High-address end) and retrieved from the front (low-address
end) of the queue.
10.What is the function of ALU?
Most of the computer operations (arithmetic and logic) are performed in ALU. The data
required for the operation is brought by the processor and the operation is performed by
the ALU.
11. What do you mean by assembler directives?
These are the instructions which direct the program to be executed. They have no binary
equivalent so they are called pseudo-opcodes. These instructions are used to define symbols,
allocate space for variable, generate fixed tables etc.
Examples: END, NAME
12. What are the registers generally contained in the processor?
MAR-Memory Address Register MDRMemory Data Register IR-Instruction
Register R0-Rn-General purpose
Registers PC-Program Counter
13. Compare single bus structure and multiple bus structure?
A system that contains only one bus(i.e only one transfer at a time) is called as a single bus
structure. A system is called as multiple bus structure if it contains multiple buses.
14. Explain about Bus.
Bus is a group of lines that serves as a connecting path for several devices. In addition to the
lines that carry the data, the bus must have the lines for address and control purposes.
15. What are the two techniques used to increase the clock rate R?
The two techniques used to increase the clock rate R are
1. The integrated circuit (IC) technology can be increased which reduces the time needed to
complete a basic step.
2. We can reduce the amount of processing done in one basic step.

UNIT-II
1. What is half adder? What is full adder?
A half adder is a logic circuit with two inputs and two outputs, which adds two bits at a time,
producing a sum and a carry.
MVIT/Dept of IT/2016-2017/ ODD SEM

89

II Yr/III Sem

PART-A

A full adder is logic circuit with three inputs and two outputs, which adds three bits at a time
giving a sum and a carry.
2. What is a carry look-ahead adder?
The input carry needed by a stage is directly computed from carry signals obtained from all the
preceding stages i-1,i-2,..0, rather than waiting for normal carries to supply slowly from stage
to stage. An adder that uses this principle is a called carry look-ahead adder.
3. What are the main features of Booths algorithm?
1) It handles both positive and negative multipliers uniformly.
2) It achieves some efficiency in the number of addition required when the multiplier has a few
large blocks of 1s.
4. What is bit pair recoding? Give an example.
Bit pair recoding halves the maximum number of summands. Group the Booth-recoded
multiplier bits in pairs and observe the following: The pair (+1 -1) is equivalent to to the pair (0
+1). That is instead of adding -1 times the multiplicand m at shift position i to +1 * M at position
i+1, the same result is obtained by adding +1 * M at position i. Eg: 11010 Bit Pair recoding
value is 0 -1 -2
5. What is the advantage of using Booth algorithm?
1) It handles both positive and negative multiplier uniformly.
2) It achieves efficiency in the number of additions required when the multiplier has a few large
blocks of 1s.
3) The speed gained by skipping 1s depends on the data.
6. Write the algorithm for restoring division.
Do the following for n times:
1) Shift A and Q left one binary position.
2) Subtract M and A and place the answer back in A.
3) If the sign of A is 1, set q0 to 0 and add M back to A.
Where A- Accumulator, M- Divisor, Q- Dividend.
Step 1: Do the following for n times:
1) If the sign of A is 0 , shift A and Q left one bit position and subtract M from A; otherwise ,
shift A and Q left and add M to A.
2) Now, if the sign of A is 0,set q0 to 1;otherwise , set q0 to0.
Step 2: if the sign of A is 1, add M to A.

7. Give the IEEE standard for floating point numbers for single precision number.

MVIT/Dept of IT/2016-2017/ ODD SEM

90

II Yr/III Sem

PART-A

8. Give the IEEE standard for floating point numbers for double precision number.

9. What is guard bit? What are the ways to truncate the guard bits?
Although the mantissa of initial operands are limited to 24 bits, it is important to retain extra
bits, called as guard bits.
There are several ways to truncate the guard bits:
1) Chooping
2) Von Neumann rounding
3) Rounding
10. In floating point numbers when so you say that an underflow or overflow has occurred?
In single precision numbers when an exponent is less than -126 then we say that an underflow
has occurred. In single precision numbers when an exponent is less than +127 then we say that
an overflow has occurred.
11. How CSA speeds up multiplication?
It reduces the time needed to add the summands. Instead of letting the carries ripple
along the rows, they can be saved and introduced into the next row, at the correct waited
position.

12. Write down the steps for restoring division and non-restoring division
MVIT/Dept of IT/2016-2017/ ODD SEM

91

II Yr/III Sem

PART-A

Non Restoring:
Step1: Do the following n times
1.If the sign of A is 0, shift A and Q left one bit position and subtract M
from A otherwise shift A and Q left and add M to A.
2.Now if the sign of A is 0, set Q0 to 1; otherwise set Q0 to 0
Step 2: If the sign of A is 1, add M to A
Restoring:

0
1

Shift A and Q left one binary position


Subtract M from A
If the sign of A is one , set Q0 to 0, add M back to A otherwise set Q0 to 1

13.What is the need for adding binary 8 value to the true exponential in floating point
numbers?
This solves the problem of negative exponent. Due to this the magnitude of the
numbers can be compared. The excess-x representation for exponents enables efficient
comparison of the relative sizes of the two floating point numbers.
14.What are the ways to truncate guard bits?
1.Chopping
2.Von Neumann rounding
3.Rounding procedure
15.What are the two attractive features of Booth algorithm
It handles both positive and negative multipliers uniformly

It achieves some efficiency in the number of additions required when the


multiplier has a few large blocks of ones

MVIT/Dept of IT/2016-2017/ ODD SEM

92

II Yr/III Sem

PART-A

UNIT-III
1. What are the basic steps required to execute an instruction by the processor?
The basic steps required to execute an instruction by the processor are:
1) Fetch the contents of the memory location pointed to by the PC. They are loaded into the IR.
IR[[PC]]
2) Assuming that the memory is byte addressable, increment the contents of the PC by 4, that is
PC [PC} + 4
3) Carry out the action specified by the instruction in the IR.
2. Write down the control sequence for Move (R1), R2.
The control sequence is :
R1out, MARin,Read
MDRoutE,WMFC
MDRout,R2in
3.What is the role of cache memory in pipeline?
The use of cache memory is to solve the memory access problem. When cache is included in the
processor the access time to the cache is usually the same time needed to perform other basic
operation inside the processor.
4.Name the methods for generating the control signals.
The methods for generating the control signals are:
1) Hardwired control
2) Microprogrammed control
Define hardwired control.
Hard-wired control can be defined as sequential logic circuit that generates specific sequences of
control signal in response to externally supplied instruction.
Define microprogrammed control.
A microprogrammed control unit is built around a storage unit is called a control store where all
the control signals are stored in a program like format. The control store stores a set of
microprograms designed to implement the behavior of the given instruction set.
5. Differentiate Microprogrammed control from hardwired control.
Microprogrammed Control
It is the microprogram in the control store that
generate control signals.
Speed of the operation is low,because it
involves memory access.
Change in control can be implemented easily
by modifying the microcontruction in the
contrl store.

Hardwired Control
It is the sequential circuit that generate control
signals.
Speed of operation is high.
Changes in control unit behaviour can be
implemented only by redesigning the entire
unit.

6. What are the types of microinstructions available?


1) Horizontal microinstruction
2) Vertical microinstruction
MVIT/Dept of IT/2016-2017/ ODD SEM

93

II Yr/III Sem

PART-A

HORIZONATAL
Long Formats
Ability to express a high degree of parallelism

VERTICAL
Short Formats
Limited ability to expressparallel micro
operation

Little encoding of control information

Considerable encoding of control information

7. What are the major characteristics of a pipeline?


The major characteristics of a pipeline are:
a) Pipelining cannot be implemented on a single task, as it works by splitting multiple tasks into
a number of subtasks and operating on them simultaneously.
b) The speedup or efficiency achieved by suing a pipeline depends on the number of pipe stages
and the number of available tasks that can be subdivided.
c) If the task that can be subdivided has uneven length of execution times, then the speedup of
the pipeline is reduced.
d) Though the pipeline architecture does not reduce the time of execution of a single task, it
reduces the overall time taken for the entire job to get completed.
8. What is branch folding?
When the instruction fetch unit executes the branch instruction concurrently with the execution
of the other instruction, then this technique is called branch folding.
9. What is a pipeline hazard?
Any condition that causes the pipeline to stall is called hazard. They are also called as stalls or
bubbles.
What are the types of pipeline hazards?
The various pipeline hazards are:
1. Data hazard
2. Structural Hazard
3. Control Hazard.
10. What is Instruction or control hazard?
The pipeline may be stalled because of a delay in the availability of an instruction. For example,
this may be a result of a miss in the cache, requiring the instruction to be fetched from the main
memory. Such hazards are often called control hazards or instruction hazard.
11. What do you mean by delayed branching?
Delayed branching is used to minimize the penalty incurred as a result of conditional branch
instruction. The location following the branch instruction is called delay slot. The instructions in
the delay slots are always fetched and they are arranged such that they are fully executed whether
or not branch is taken. That is branching takes place one instruction later than where the branch
instruction appears in the instruction sequence in the memory hence the name delayed branching.
What are the two types of branch prediction techniques available?
The two types of branch prediction techniques are 1) Static branch prediction 2) Dynamic branch
prediction
12. Describe the two control signals used for register transfer.

MVIT/Dept of IT/2016-2017/ ODD SEM

94

II Yr/III Sem

PART-A

For each register, two control signals are used to place the contents of that register on the bus or
to load data on the bus into the register. The input and output of register Ri are connected to the
bus via switches controlled by the signals Riin and Riout, respectively. When Riin is set to 1, the
data on the bus are loaded into Ri. Similarly, when Riout is set to 1, the contents of register Ri
are placed on the bus. While Riout is equal to 0, the bus can be used for transferring data from
other registers.
13. What is mean by branch instruction.
A branch instruction is an instruction which replaces the contentsof the PC with the branch target
address. This address is usually obtained by adding an offset X, which is given in the branch
instruction, to the updated value of the PC. The location following a branch instruction is called a
branch delay slot.
14. Define microroutine and microinstruction.
A sequence of control words corresponding to the control sequence
of a machine instruction constitutes the microroutine for that instruction, and the individual
control words in this microroutine are referred to as microinstructions
15. Compare vertical organization and horizontal organization.
Vertical organization

Horizontal organization

1. Highly encoded schemes


schemes

Minimally encoded

2. Specify only a small number of control signals.


controlled.

Many resources can be

3. Operating speed is high.

Operating speed is low.

MVIT/Dept of IT/2016-2017/ ODD SEM

95

II Yr/III Sem

PART-A

UNIT-IV
1. What is RAM?
This storage location can be accessed in any order and access time is independent of the location
being accessed
2. Explain virtual memory.
The data is to be stored in physical memory locations that have addresses different from those
specified by the program. The memory control circuitry translates the address specified by the
program into an address that can be used to access the physical memory.
3. Give the format for main memory address using direct mapping function for 4096 blocks
in main memory and 128 blocks in cache with 16 blocks per cache.

4. Give the format for main memory address using set associative mapping function for
4096 blocks in main memory and 128 blocks in cache with 16 blocks per cache.

5. Define Hit and Miss?


The performance of cache memory is frequently measured in terms of a quantity called hit ratio.
When the CPU refers to memory and finds the word in cache, it is said to produce a hit. If the
word is not found in cache, then it is in main memory and it counts as a miss.
6. Write the formula for the average access time experienced by the processor in a system
with two levels of caches.
The formula for the average access time experienced by the processor in a system with two
levels of caches is tave= h1C1+(1-h1)h2C2+(1-h1)(1-h2)M h1= hit rate in the L1 cache. h2= hit
rate in the L2 cache. C1=time to access information in the L1 cache. C2= time to access
information in the L1 cache. M= time to access information in the main memory.
7. What is RAID?
High performance devices tend to be expensive. So we can achieve very high performance at a
reasonable cost by using a number of low-cost devices oerating in parallel. This is called
RAID( Redundant array of Inexpensive Disks).
8. Define data stripping?
A single large file is stored in several separate disk units by breaking the file up into a number of
smaller pieces and storing these pieces on different disks. This is called data stripping.
9. Define latency time.
This is the amount of time that elapses after the head is positioned over the correct track until the
starting position of the addressed sector passes under the read/write head.
MVIT/Dept of IT/2016-2017/ ODD SEM

96

II Yr/III Sem

PART-A

10. What is an EEPROM? Mention its advantage &Disadvantage.


Erasable PROMs that can be both programmed and erased electrically. Such chips are called
Electrically Erasable PROM.
Advantages:
Need not be physically removed for erase the cell contents.
Cell contents can be selectively erased.
Disadvantage:
Different voltages are needed for erasing, reading, and writing the data.
11. What is locality of Reference?
Many instructions in the localized areas of the program are executed repeatedly during some
period, and the remainder of the program is accessed relatively infrequently. This is referred to as
locality of reference.
12. What is a replacement algorithm?
When the cache is full and the memory word is not in the cache is referenced the cache control
hardware must decide which block should be removed to create space for the new word block
that contains the referenced word. The collection of rules for making this decision constitutes the
replacement algorithm.
13. Briefly explain ECC?
ECC stands for Error Correcting Codes. Data bits are stored serially on each track and is
preceded by a sector header containing identification information and succeeded by a additional
bits that constitute an error correcting code.ECC bits are used to detect and correct errors that
may have occurred in writing or reading data bytes.
14. Define Cartridge tape system?
Tape systems have been developed for back up of on-line disk storage. One such system uses an
8 mm video format tape housed in a cassette. These tapes are called cartridge tapes.
15. What are the enhancements used in the memory management?
1) Write Buffer 2) Pre fetching 3) Look- up Cache.

MVIT/Dept of IT/2016-2017/ ODD SEM

97

II Yr/III Sem

PART-A

UNIT-V
1.Why IO devices cannot be directly be connected to the system bus?
The IO devices cannot be directly connected to the system bus because i. The data transfer
rate of IO devices is slower that of CPU. ii. The IO devices in computer system has different
data formats and work lengths that of CPU. So it is necessary to use a module between
system bus and IO device called IO module or IO system
2.What is an I/O Interface?
Input-output interface provides a method for transferring binary information between internal
storage, such as memory and CPU registers, and external I/O devices
Write the factors considered in designing an I/O subsystem?
1. Data Location: Device selection, address of data with in device( track, sector etc)
2. Data transfer: Amount, rate to or from device.
3. Synchronization: Output only when device is ready, input only when
4. Memory or between an I/O device and CPU.
3.Explain Direct Memory Access.
A modest increase in hardware enables an IO device to transfer a block of information to or
from memory without CPU intervention. This task requires the IO device to generate
memory addresses and transfer data through the bus using interface controllers.
4.What is polling?
Polling is a scheme or an algorithm to identify the devices interrupting the processor. Polling
is employed when multiple devices interrupt the processor through one interrupt pin of the
processor.
5.What is a Priority Interrupt?
A priority interrupt is an interrupt that establishes a priority over the various sources to
determine which condition is to be serviced first when two or more requests arrive
simultaneously.
6.Define synchronous bus.
Synchronous buses are the ones in which each item is transferred during a time slot(clock
cycle) known to both the source and destination units. Synchronization can be achieved by
connecting both units to a common clock source.
7.Define asynchronous bus.
Asynchronous buses are the ones in which each item being transferred is accompanied by a
control signal that indicates its presence to the destination unit. The destination can respond with
another control signal to acknowledge receipt of the items.
8.Define interrupt.
An interrupt is any exceptional event that causes a CPUU to temporarily transfer control
from its current program to another program , an interrupt handler that services the event in
question.
9.What are the different methods used for handling the situation when multiple interrupts
occurs?
1) Vectores interrupts2) Interrupt nesting 3) Simultaneous Requests
MVIT/Dept of IT/2016-2017/ ODD SEM

98

II Yr/III Sem

PART-A

10.What is a privileged instruction?


To protect the operating system of a computer from being corrupted by user programs,
certain instructions can be executed only while the processor is in the supervisor mode.
These are called privileged instruction.
11.What is bus arbitration?
It is process by which the next device to become the bus master is selected and bus
mastership is transferred to it. There are two ways for doing this: 1. Centralized arbitration 2.
Distributed arbitration.
12.What is port? What are the types of port available?
An I/O interface consists of circuitry required to connect an I/O device to computer bus. One
side consists of a data path with its associated controls to transfer data between the interface
and I/O device. This is called port. It is classified into: 1) Parallel port 2) Serial port.
13.What is SCSI?
It is the acronym for small computer system interface. It refers to a standard bus defined
ANSI. Devices such as disks are connected to a computer via 50-wire cable, which can be
upto 25 meters in length and can transfer data at rate up to 55 megabytes/s.
14.Define USB.
The Universal Serial Bus(USB) is an industry standard developed to provide two speed of
operation called low-speed and full-speed. They provide simple, low cost and easy to use
interconnection system.
15.What is known as cycle-stealing?
The processor originates most memory access cycles, the DMA controller can be said to
steal memory cycles from the processor. Hence, this interweaving technique is usually
called cycle stealing.

MVIT/Dept of IT/2016-2017/ ODD SEM

99

You might also like