Download as pdf or txt
Download as pdf or txt
You are on page 1of 20

PU-2 computer science

By VANITHA Page 1
PU-2 computer science

CHAPTER-1: TYPICAL CONFIGURATION OF COMPUTER


Five marks questions (or) two marks questions:
1. Explain any 5 components of motherboard.
Ans: The motherboard components are:
a. Processor (CPU): it is the main component on motherboard, it consist of ALU and
CU, it is responsible for processing the data and instructions. It is the brain of the
computer.
b. BIOS: small chip on motherboard that contains instructions to activate hardware
components like keyboards, monitors and disk drives. It checks whether hardware
devices are present and functioning properly or not that is it performs (Power on self
test). It also calls bootstrap loader to load OS into RAM.
c. CMOS: it is memory chip to store date, time and system setup parameters.
d. Slots: an opening in a computer into which a PCB (printed circuit board) is inserted,
also called as expansion slots.
Types of slots:
ISA (industry standard architecture) slot: for connecting modem and input devices.
PCI (peripheral component interconnect) slot: used to connect video cards, sound
cards, network cards.
AGP (accelerated graphics card) slot: for connecting video cards to view 3D videos/
computer graphics.
RAM slot: allows RAM to be inserted into the computer.
PC card slot: it is used in portable devices like laptop/ notebook computers for
inserting wi-fi card.
e. Disk controllers: it is a circuit that connects CPU to HDD and FDD
Hard disk controller (HDC): is the interface that enables to read and write the
information to hard drive. Types of HDC are:
IDE (integrated development environment) or ATA (advanced technology
attachment)
EDIE (Enhanced integrated development environment)
SATA (serial advanced technology attachment)
Floppy disk controller (FDC): is the interface that controls and directs reading and
writing to the floppy disk.
f. I/O Ports and Interfaces: they are used to connect external devices like printers,
scanners, keyboards to computer are found on the rear side of computer. There are
different types of ports such as serial, parallel, USB, AGP etc.
g. Bus: it is a set of parallel wires and each wire can carry a bit of data.
Bus width is determined by number of wires, more the number of wires more is the width of
the bus.
Bus is categorized into 2:
• Internal bus (system bus): connects major internal components upon motherboard
such as processor, memory and I/O.

By VANITHA Page 2
PU-2 computer science

• External bus (Expansion bus): connects different external devices to computer


thereby expanding the functionality of computer.
System bus: is an internal bus that connects, it consists of 3 major components, they are:
Data bus (bidirectional): it transfers data b/w CPU and memory, it consists of 32, 64, 128
lines of wire. The number of wires contributes to the speed of data bus.
Control bus (unidirectional): carries control and clock signals from processor to other
components.
Address bus (unidirectional): carries memory addresses from the processor to other
components such as RAM and I/O devices.

2. Explain characteristics of mother board.


Ans: Motherboard is the main circuit board of computer system. It is a large circuit board. All
the major components are connected to it.
Characteristics of motherboard:
Form factor: It refers to the dimensions, arrangement and electrical requirement of the
motherboard. ATX is the most common design of motherboard for desktop computer.
Chipset: It is a collection of microchips (such as CPU, BIOS, memory, mass storage, interfaces,
controllers and I/O devices) that control the flow of data and instructions b/w the CPU and
external devices. A chipset has 2 sections: Southbridge and Northbridge
North bridge chipset: is responsible for controlling high speed components (CPU, RAM, video
card)
South bridge chipset: is responsible for controlling slow speed components (Sound card, BIOS)
Processor socket: it is a rectangular or square connector into which the processor is mounted
vertically. There are different types of processor sockets. CPU socket is specifically designed
for a particular CPU and is usually not interchangeable with other types of processors.

3. What is a port? Explain serial port. (or) explain parallel port.


Ans: ports are used to connect external devices like printers, keyboards or scanners and
interface with the computer. Ports are usually found on the rear side of computer.
• Serial ports also called as COM port[component object model port]
• It is used for connecting communication devices like modem or mouse
• Serial port can transmit data 1-bit at a time (Hence it takes 8 times to transfer 1 byte)
• Data transfer is very slow
• There are 2 types of serial ports they are 9 –pin and 25- pin ports.
• In serial port less number of wires is used compared to parallel port.
• Serial port delivers single stream of data.
(or)
• Parallel ports: are used to connect external input / output devices like printers or
scanners.
• This port facilitates the parallel transfer of data i.e., 1 byte (8 bits) / 2 bytes (16 bits) / 4
bytes (32 bits) at a time.
• Parallel ports are in the form of 25 pin connector
• Parallel ports transfer data faster than serial ports.

By VANITHA Page 3
PU-2 computer science

• In parallel port more number of wires is used compared to serial port to transfer multiple
streams of data

4. Explain types of motherboard.


Ans:
AT (Advanced Baby AT ATX (Advanced XT motherboard
Technology) motherboard Technology Extended) (Extended technology
motherboard: motherboard: motherboard)

It has 20pin power It has 12 and 20 pin It has 20 and 24 pin It has 12 pin power
connector power connector power connector connector
and ports

It contains PGA (Pin It is a combination It has MPGA (Mini It has old model
Grid Array) sockets, of XT and AT Pin Grid Array) processor sockets LIF
motherboard with sockets (low insertion force)
PGA sockets sockets

It has SDRAM slots, It has PCI and ISA It is latest ISA (Industry
PCI slots, ISA slots. slots, SDRAM slots motherboard , with standard architecture)
and DDRRAM DDRRAM slots, slots and DIMM (dual
slots. AGP and PCI slots inline memory
module) RAM slots

5. What is a cache memory? Mention the types of cache memory.


Ans:
• Cache memory: it is a small, fast memory between RAM and the CPU.
• Cache memory capacity is less than RAM.
• It is costlier than RAM.
• It is faster than RAM.
• It stores instructions and data which are to be immediately executed by CPU.
• It enhances the speed of instruction execution by CPU by storing the frequently
accessed instructions.

There are 3 types of cache memory i.e. L1, L2, L3


• L1 cache is located in CPU
• L2 cache is located between RAM and CPU.
• L3 cache is located on motherboard.

6. Mention types of UPS. Explain the purpose of UPS

By VANITHA Page 4
PU-2 computer science

Ans: Purpose of UPS (uninterrupted power supply): it is a battery used to maintain power
supply to computer during power failure. It keeps computer running for several minutes to
few hours after power failure so that the system user can save his work and gracefully
shutdown the computer.
Types of UPS:
Offline UPS: this type of UPS have module. When main power source is off then the module
will switch from main power source to the battery source in less than 4ms delay time and
supply power to the computer.
Online UPS: this type of UPS is better than Offline UPS because no matter main power
source is on or off this online UPS always outputs power from battery, so Online UPS doesn’t
have delay time. Online UPS is expensive than Offline UPS.

7. Explain Power supply and its types.


Ans: Continuous power supply is essential for computer to prevent them from failures,
breakdown or shutdown
There are 2 types of power supply:
• SMPS: It converts AC power from electrical outlet to DC power needed by computer
system components.
• It is a metal box in the rear end of the system that is attached to computer chassis and
to motherboard.
UPS (Uninterruptible Power Supply): it supplies power during the failure of power to the
computer.
• Online UPS:
Avoids momentary power lapses by continuously providing power from its inverter even
when the power line is functioning properly.
• Offline UPS (Standby UPS): monitors the power line and switches to battery power as
soon as it detects a problem. The switch over to battery however can require several
milliseconds, during which time computer is not receiving any power.

8. What is USB port? Explain its features.


Ans: USB stands for UNIVERSAL SERIAL BUS
• It is a plug and play interface port b/w computer and add-on devices.
• It is easy to connect different peripherals (keyboard, mouse, external hard disk etc.)
• It supports data speed of 12mega bits per second
• It supports up to 127 devices.
• It has successfully replaced serial and parallel port because of its fast transmission
speed.
• It is flexible and convenient for use.

By VANITHA Page 5
PU-2 computer science

CHAPTER-6 OOPS (object oriented programming system)


Five marks / Three marks questions:

1. Mention any five advantages of OOP’s.


Ans:
• Reduces code duplication.
• Code re-usability is allowed avoids re-writing of code
• Provides Data security.
• Creation and implementation of OOP’s code is easy
• Reduce software development time.

2. Give the difference between Procedural programming and Object Oriented Programming.
Ans:
Procedure Oriented Programming Object Oriented Programming
1. program is divided into small parts called 1. program is divided into small parts called
function objects
2. Top down approach 2. Bottom up approach
3. Does not have any access specifier 3. Has access specifiers named public, private
and protected
4. Overloading is not possible 4. Overloading is possible.
5. It is not easy to add new data and function 5. It is easy to add new data and function
6. It has less security. 6. It has more security.

3. Explain the characteristics of OOP’s.


Ans: Class: it is a template of representing a group of similar objects that have similar
properties, common behavior and common relationship.
For ex: planets mars, Jupiter, Venus are the members of class SOLAR SYSTEM.
Object: an object is particular instance of class.
Abstraction: it refers to the representation of essential features of an object without background
details.
Encapsulation: it is way of combining data and functions into a single unit.
Inheritance: deriving new class from the existing class.
Polymorphism: ability to take many forms.
Message passing: sending messages to objects.
Dynamic binding: Code associated with a procedure call is known at the run time.

4. Write the applications of OOP’s


Ans:
• Computer Graphics application
• Object Oriented Database.
• Real Time systems.
• CAD/ CAM software.
• Simulation and modeling

By VANITHA Page 6
PU-2 computer science

• Artificial Intelligence & Expert systems

5. Write the limitations (disadvantages) of Object Oriented Programming.


Ans:
• It is not suitable for all types of problems.
• Classes are overly generalized.
• OOP’s required a lot of work to create.
• OOP program design is tricky, needs proper planning and design skills.
• OOP’s are much longer size than other programs.

By VANITHA Page 7
PU-2 computer science

CHAPTER-2 : BOOLEAN ALGEBRA

Five marks questions:


1. F(A,B,C,D)= ∑ (1,2,3,5,7,8,9,11,13,15)

By VANITHA Page 8
PU-2 computer science

2. F(A,B,C,D)=∑(0,2,4,5,6,7,8,10,12,13,14,15)

PRACTISE THE FOLLOWING K-MAP’S

3. F(A,B,C,D)=∑( 0, 1, 2, 3,4, 6,8,10,12,14)


4. F(A,B,C,D)=∑(0, 2, 5, 7, 8, 10, 13, 15)
5. F(A,B,C,D)=∑(0, 4, 6, 7, 8, 12, 14, 15)
6. F(A,B,C,D)=∑(1, 3,4,5,6,7,9,11,12,13,14,15)
7. F(A,B,C,D)=∑(1,5,9,10,11,12,13,14)
8. F(A,B,C,D)= m1+m2+m4+m5+m9+m11+m12+m13
9. F(A,B,C,D)=∑(0,2,4,5,6,7,8,10,12)
10. F(A,B,C,D)=∑(0, 1, 2, 3, 5,6, 9,10,13,14)

By VANITHA Page 9
PU-2 computer science

Chapter-10 : Inheritance
Five marks questions:

1. What are the advantages of inheritance?


Ans:
• Reusability: inheritance helps the code to be reused in many situations.
• Saves time and effort: since the main code written can be reused in various
situations as needed.
• Efficient memory utilization.
• Easy to maintain
• Easy to extend

2. Write the types of inheritance. Explain any two


Ans: The types of inheritance are:
a) Single level inheritance
b) Multi level inheritance
c) Multiple inheritance
d) Hierarchical inheritance
e) Hybrid inheritance
Single level inheritance: A derived class with only one base class is called single level inheritance.

Multi level inheritance: a class can be derived from another derived class which is known as
multilevel inheritance.

Multiple inheritance : if a class is derived from more than one base class. It is known as multiple
inheritance.

By VANITHA Page 10
PU-2 computer science

Hierarchical inheritance: more than one class derived from a single base class.

Hybrid inheritance: it is combination of hierarchical and multilevel inheritance.

3. Explain single level inheritance with a programming example. [july-2018]


Ans: #include<iostream.h>
#include<conio.h>
class student
{
private:
long rollnumber;
char name[25];
public:
void readdata()
{
cout<<”enter student name \n”;
cin.getline(name,25);
cout<<”enter student roll number \n”;
cin>> rollnumber;
}

By VANITHA Page 11
PU-2 computer science

void display()
{
cout<<”\n roll number=”<< rollnumber;
cout<<”\n student name=”<<name;
}
};
class report: public student
{
private:
int marks1, marks2, total;
public:
void readmarks()
{
cout<<”enter 2 subject marks”<<endl;
cin>>marks1>>marks2;
}
void compute()
{
total= marks1+marks2;
cout<<”\n total marks=”<<total;
}
};
void main()
{
report r;
clrscr();
r. readdata();
r.display();
r.readmarks();
r.compute();
getch();
}

CHAPTER-3: LOGIC GATES

Five marks questions:

1. Realize NOT, OR, AND using NAND gate


Ans: NOT using NAND

AND using NAND

By VANITHA Page 12
PU-2 computer science

OR using NAND

2. Realize NOT, OR, AND using NOR gate


Ans:
NOT using NOR

OR using NOR

AND using NOR

3. What are universal gates? Why are they called so?

By VANITHA Page 13
PU-2 computer science

Ans:
• Universal gates are NAND and NOR
• They are less expensive (economical)
• Universal gate can implement any Boolean function without using other gate.
• They are popular.
• They can be used to construct logic gate diagrams in easier way.
• They can be used to design all BASIC gates (AND, OR, and NOT) individually. Hence
they are called as universal gates.

CHAPTER-11:

Three marks questions

1. What is array of pointers? Give an example.


Ans: Array of pointers means collection of addresses.
Example:
int *p[5];
int i=10, j=20, k=30, l= 40, m=50;
p[0]= &i; *p[0]= 10;
p[1]=&j; *p[1]=20;
p[2]=&k; *p[2]=30;
p[3]=&l; *p[3]=40;
p[4]=&m; *p[4]=50;

2. Give the advantages of pointer


Ans:
• Pointers save memory space.
• Execution time with a pointer is faster
• Easy to deal with hardware components.
• It is possible to write efficient programs.
• It supports dynamic allocation and de allocation of memory

3. Explain the operations performed on pointers.


Ans:
• We can add an integer value to a pointer.
• We can subtract an integer value from a pointer.
• We can subtract one pointer from another pointer if both point to the same array.
• We can compare two pointers, if they point to elements of same array.
• We can assign one pointer to another pointer provided both are of same type

4. Define the terms:


Ans: Pointer : is a variable which holds the address of another variable.

Static allocation of memory:

By VANITHA Page 14
PU-2 computer science

The amount of memory to be allocated is pre-known. It is allocated during the compilation


time.
Dynamic allocation of memory:
The amount of memory to be allocated is not known. It is allocated during run-time and
when its required

5. Explain the use of new and delete operators in pointers.


Ans: The new operator in C++ is used for dynamic storage allocation.
Syntax:
Pointer variable= new datatype;
Example:
int *a= new int;
The delete operator in C++ is used for releasing memory space when object is no longer needed
Syntax:
delete pointer_variable;
Example:
delete ptr;

In above example, delete is a keyword and the pointer variable ptr is the pointer that points to
the objects already created in the new operator.

CHAPTER-12:

Two/ Three marks questions

1. Give the functions of the following:


write, read, put, get, getline.
Ans:
write (): used to write binary data to a file .
Syntax: ofstream_obj.write(&variable, sizeof(variable));

read(): used to read binary data from a file .


Syntax: ifstream_obj.read(&variable, sizeof(variable));

put(): writes a single character to a file


Syntax: ofstream_obj.put(ch);

get(): reads a single character from a file


Syntax: ifstream_obj.get(ch);

getline(): reads a whole line of text from a file.


Syntax: fin.getline(buffer,size);

2. Discuss any 3 file mode parameters in C++.


Ans: ios:: app append to the end of the file.
ios:: ate move file pointer to the end of file.

By VANITHA Page 15
PU-2 computer science

ios :: trunc delete the contents of file.


ios :: in open file for reading only
ios :: out open file for writing only
ios:: binary open a binary file.
ios:: noreplace if file already exists, doesn’t open the file
ios:: nocreate if file does not exist, file is not opened.

3. What is a data file? Differentiate between text file and binary file in C++
(or)
Mention the types of data files. Explain
Ans: Text file:
▪ it is file in which information is stored in ASCII format.
▪ in text file each line is terminated by EOL (End of Line) character.
▪ translations needed
Binary file:
▪ it is a file stores information in binary format.
▪ translations not needed.
▪ delimiters not used

4. Difference between ifstream and ofstream


Ans: Stream: flow of data. Thera are 2 streams in c++ : ifstream and ofstream
ifstream ofstream
Stream class to read from files Stream class to write from files
Provides input operations Provides output operations
Member functions are get(), getline(), read(), Member functions are put(), write(), seekp()
seekg() and tellg() and tellp()

CHAPTER-13
Five marks questions
1. Write any 2 differences between manual and computerized (electronic) data
processing.
[March-2018, June 2018, March 2016]

Ans:
Manual data processing Computerized data processing
• It requires large quantity of • It requires less quantity of
paper paper
• Labour cost is high • Labour cost is less
• Limited speed and accuracy • Fast speed and accuracy
• Storage medium is paper • Storage medium is secondary
memory
• It processes less amount of • It processes large amount of
data data

By VANITHA Page 16
PU-2 computer science

2. Explain the features (advantages) of DBMS. [March 2018, March 2019,


March 2020]

Ans: Advantages of DBMS are:

Centralized database: is a database that is located, stored, and maintained in a


single location. It is usually accessed using an internet connection (LAN/WAN).

Multiple user interfaces:


GUI interface includes menu and form driven:
• Menu based interfaces for web clients, it contains list of options (called
menus), no need to remember commands.
• Form based interfaces: a form is displayed to user; user can fill the form by
entries.
Interface using query language, application programs.

Data integrity: all information in database is accessible by several users but only
one user can change the same piece of information at a time. This makes
database free from corruptions and failure. Data integrity refers to accuracy and
consistency.

Minimized redundancy: data in DBMS appears only once. There is no need to


repeat the same data again and again.

Data security: DBMS does not allow to breach. DBMS provides appropriate
security levels that restrict access to tables, schema and other database objects
with tools like user id’s and password.

Backup and recovery: in case if original is corrupted or lost because of any


reason, using backup the database can be recovered as it was before failure.
Backup means that a duplicate of DB information and data is created and stored
in backup server just to be on safe side.

Data sharing: the ability to share the same data resource with multiple
applications or users.

3. Explain the data processing cycle. [June 2018, March 2017]


Ans: The data processing cycle consists of five steps:
a) Input: any kind of data letters, numbers, symbols, shapes, images or
whatever raw material put in to the computer system through keyboard, mouse
or scanner..etc.

By VANITHA Page 17
PU-2 computer science

b) Processing: it is a series of actions or operations performed on the input data


to generate outputs. (Operations such as calculation, sorting, indexing,
accessing…etc is done by CPU)
Ex: 2*8=16
c) Storage: information which is not currently used must be stored so that it can
be accessed later. There are 2 types of storage:
Primary and secondary:
Primary memory is temporary storage and volatile.
Secondary memory is meant to store data permanently and it is non- volatile.
d) Output: the information obtained after processing the data is displayed to user
in user understandable form through output devices like monitor, printer,
projector,….etc.
e) Communication: information can be transferred from one place to another
place using wired or wireless technology such as Wi-Fi, hotspot, e-mail, or by
using modem.
CHAPTER -15

Five Marks Questions:

1. What is topology? Explain in detail.


Ans: The geometric appearance of computers in a network is called topology.

Bus topology: It consists of a single common data path connecting to all nodes
(workstations). All the data propagates through single cable, can be received by
any node.

Star topology: this topology consists of a central node to which all other nodes are
connected by a single path.

Ring topology: in this topology, each node connects to only 2 neighboring nodes.
The data travels in one direction from one node to another around the ring.

By VANITHA Page 18
PU-2 computer science

Tree topology: this topology, the shape of the network is an inverted tree. It is a
hybrid topology because it is a combination of bus and star topologies.

Mesh topology: in this topology, each node is connected to more than one node to
provide an alternative root in case if host is busy.

(or)

In this topology, each node is connected to every other node

2. Explain any 5 network devices.


Ans: Router: are the network devices that decides the best route for transforming
data to the destination.

Bridge: it is a device that links 2 networks together, bridges are smart enough to
know which computers are on which side of the bridge. So, they allow only those
messages that need to get on other side of the bridge.

Modem: the modem modulates the signal at the sending end, demodulates at the
receiving end. It is used to provide internet access to computer system via
telephone lines.

Repeater: When signal loses strength while transmitted long distance, then
repeaters are used to boost the signal strength.

By VANITHA Page 19
PU-2 computer science

Switch: establishes a temporary connection between the source and destination


and then terminates the connection once the conversation is done.

Two marks question

1. List the goals of networking and explain.


Ans: Resource sharing: the data and peripherals (files, printers, scanner, fax
machines…. etc.) can be shared by all the users in the network

Reliability: a file and its copies are stored in different machines, so that if one copy
is lost other copy is restored.

Cost factor: personal computers are better in price and performance than
microcomputers.

Communication medium: changes made at one end of network are noticed


immediately at another end.

Coverage of this 5 marks 3 marks 2 marks total


material.
Chapter-1 1 question 1 question 7 marks
Chapter-2 1 question 5 marks
Chapter-3 1 question 5 marks
Chapter-6 1 question 1 question 8 marks
Chapter-10 1 question 5 marks
Chapter-11 1 question 3 marks
Chapter-12 1 question 1 question 5 marks
Chapter-13 1-question 5 marks
Chapter-15 1-question 1-question 7 marks
Weightage of this material 50 marks

********************

By VANITHA Page 20

You might also like