PG TRB Computer Teachers Care Academy

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

www.kalviexpress.in www.kalviexpress.

in

.in
ss
re
xp
ie
a lv
.k
w
w
w

Send Your Material &Question Answer Our Email ID [email protected]


www.kalviexpress.in www.kalviexpress.in

CONTENTS
__________________________________

PG TRB SYLLABUS…………………………………………. 1

PREVOIUS YEAR QUESTIONS AND ANSWERS - I …… 2

in
PREVOIUS YEAR QUESTIONS AND ANSWERS – II …. 6

s s.
1. THE COMPUTER SYSTEM

ARCHITECTURE OF COMPUTER ………………………………….…


p re 10
ex

1.1 SYSTEM BUSES………………………………………………. 18


vi

1.1.1 Computer Components …………………………………. 20


al

1.1.2 Computer function………………………………………. 22


.k

1.1.3 Interconnection Structures …………………………..…. 23


w

1.2 INTERNAL MEMORY………………………………………. 25


w

1.2.1 Computer Memory System Overview………………… 30


w

1.2.2 Cache Memory………………………………………… 34

1.3 INPUT/ OUTPUT……………………………………………… 40

1.3.1 External Devices…………………………………………… 52

1.3.2 Direct Memory Access.…………………………………… 58

1.3.3 The External Interface……………………………………… 66

OPERATING SYSTEM OVERVIEW …………………………… 86

Send Your Material &Question Answer Our Email ID [email protected]


www.kalviexpress.in www.kalviexpress.in

CONTENTS
__________________________________

2. THE CENTRAL PROCESSING UNIT

2.1 COMPUTER

in
ARITHMETIC…………………………………………………………… 109

s.
2.1.1 The Arithmetic and Logic Unit (ALU)……… …………… 109

s
2.2
2.1.2

INSTRUCTION SETS……………………………………………
p re
Floating-Point Arithmetic…………………………………… 117

120
ex

2.2.1 Types of Operands………………………………………… 133

2.2.2 Types of Operation………………………………………… 135


vi

2.2.3 Register Organization……………………………………… 144


al

2.2.4 The Instruction Cycle……………………………………… 148


.k

POSSIBLE PROBLEMS………………………………………… 154


w
w

COMPUTER ABBREVATIONS ………………………………… 168


w

SAMPLE SCHOOL BOOK QUESTIONS ……………………… 198

PRACTICE QUESTIONS………………………………………… 200

Send Your Material &Question Answer Our Email ID [email protected]


www.kalviexpress.in www.kalviexpress.in

TEACHER’S CARE ACADEMY, KANCHIPURAM


TNPSC-TRB- COMPUTER SCIENCE -TET COACHING CENTER
HEAD OFFICE: NO. 38/23, VAIGUNDA PERUMAL KOIL,
SANNATHI STREET, KANCHIPURAM – 1. CELL: 9566535080
B.Off 2: 65C, Thillai Ngr(West), 4th Cross St, Trichy – 620018
B.Off 3: Vijiyaraghavachariar Memorial Hall(Opp to Sundar Lodge), Salem

Trichy : 76399 67359 Salem : 93602 68118

PG TRB COMPUTER SCIENCE 2020 - 21

UNIT I - COMPUTER SYSTEM ARCHITECTURE

in
s.
SYLLABUS

s
UNIT- I
p re
ex

THE COMPUTER SYSTEM- System buses - Computer


vi

components - Computer functions - Interconnection structures -


al

Internal memory - Computer memory system overview- Cache


.k

memory - Input/ Output - External devices - Direct Memory


w

Access-The external interface.


w

OPERATING SYSTEM OVERVIEW.


w

THE CENTRAL PROCESSING UNIT- Computer Arithmetic -

The Arithmetic and Logic Unit (ALU) - Floating-point arithmetic –

Instruction sets- Types of operands- Register organization- The

instruction cycle.

Send Your Material &Question Answer Our Email ID [email protected]


www.kalviexpress.in www.kalviexpress.in
10

THE COMPUTER SYSTEM


ARCHITECTURE OF COMPUTER

TEACHER'S CARE ACADEMY


in
s s.
p re
ex
vi
al
.k

INTRODUCTION TO COMPUTER:
w

❖ Computer system = Hard ware+ software + user


w

❖ Computer is an electronic machine.


w

❖ The term computer is derived from the Latin term -‘computare’,


❖ Meaning - calculate or programmable machine.
❖ Charles Babbage is called the “Father" of the computer.
❖ It can process both numerical and non-numerical (arithmetic and logical) calculations.
❖ Computer is an advanced electronic device that takes raw data as input from the user and
processes these data under the control of set of instructions (called program) and gives the
result (output) and saves output
❖ It represents the decimal numbers through binary digits.(0,1)

www.tcaexamguide.com (95665 35080; 9786269980; 76399 67359; 93602 68118 )


Send Your Material &Question Answer Our Email ID [email protected]
www.kalviexpress.in www.kalviexpress.in
11

UNITS OF MEMORY:

❖ The smallest unit is a bit. Which means either 0 or 1

❖ 1 bit 0 or 1

❖ 4 bit = 1nibble

❖ 8 bit = 1 byte
TEACHER'S CARE ACADEMY

❖ 1024 byte = 1KILO byte=210 byte

❖ 1024 KB =1 MEGA byte = 210 KB

❖ 1024MB = 1GIGA byte = 210 MB

in
❖ 1024 GB= 1 TERA byte = 210 GB

s.
❖ 1024 TB = 1PETA byte = 210 TB

s
❖ 1024 PB = 1EXA byte = 210 PB

❖ 1024 EB = 1 ZETTA byte = 210 EB

❖ 1024 ZB = 1 YOTTA byte = 210 ZB


p re
ex

❖ 1024 YB = 1 BRONTO (or) HELLA byte = 210 YB


vi
al

EVOLUTION OF COMPUTER
.k
w

QUIPA (15TH & 16 TH CENTURY)


w

❖ A Tree Branches with a Thread knocked and made a additions and subtractions.
w

www.tcaexamguide.com (95665 35080; 9786269980; 76399 67359; 93602 68118 )


Send Your Material &Question Answer Our Email ID [email protected]
www.kalviexpress.in www.kalviexpress.in
12

ABACUS (600 B.C)

❖ Invented by Babylonians at china


❖ Works By monitoring beads according the rules. The user can done addition, subtraction,
multiplication, division.
❖ It was used by the Chinese and Egyptians

TEACHER'S CARE ACADEMY


in
s s.
re
JOHN NAPIER'S BONE CARDBOARD MULTIPLICATION CALCULATOR (17TH
p
CENTURY)
ex

❖ A complete set of Napier bone’s Consists of rods, one for each of the digit 0 to 9 Called
vi

bones, with number carried on them.


❖ It was first Appeared in print in 1614.
al
.k
w
w
w

BLAISE PASCAL (1642)

❖ Blaise Pascal developed another mechanical adding machine Called pascaline, which
could add and subtract numbers.
❖ first digital computer

www.tcaexamguide.com (95665 35080; 9786269980; 76399 67359; 93602 68118 )


Send Your Material &Question Answer Our Email ID [email protected]
www.kalviexpress.in www.kalviexpress.in
200

PRACTICE QUESTIONS:

1. Floating point representation is used to store


A) Boolean values C) Real integers
B) Whole numbers D) Integers

TEACHER'S CARE ACADEMY


2. Suppose that a bus has 16 data lines and requires 4 cycles of 250 nsecs each to transfer data
The bandwidth of this bus would be 2 Megabytes/sec If the cycle time of the bus was
reduced to 125nsecs and the number of cycles required for transfer stayed the same what
would the bandwidth of the bus?

in
A) 1 Megabyte/sec C) 8 Megabytes/sec
B) 4 Megabytes/sec D) 2 Megabytes/sec

s s.
3. Assembly language

B) is the easiest language to write programs


p re
A) Uses alphabetic codes in place of binary numbers used in machine language

C) need not be translated into machine language


ex

D) None of these
vi

4. A three input NOR gate gives logic high output only when
al

A) One input is high C) Two input are low


.k

B) One input is low D) All input are high


w

5. n bits in operation code imply that there are ___________ possible distinct operators
w

A) 2n C) n/2
B) 2n D) N2
w

6. _________ register keeps tracks of the instructions stored in program stored in memory.
A) AR (Address Register) C) PC (Program Counter)
B) XR (Index Register) D) AC (Accumulator)

7. Memory unit accessed by content is called


A) Read only memory C) Virtual Memory
B) Programmable Memory D) Associative Memory

www.tcaexamguide.com (95665 35080; 9786269980; 76399 67359; 93602 68118 )


Send Your Material &Question Answer Our Email ID [email protected]
www.kalviexpress.in www.kalviexpress.in

in
s s.
p re
ex
vi
al
.k
w
w
w

Send Your Material &Question Answer Our Email ID [email protected]


www.kalviexpress.in www.kalviexpress.in

INDEX:
Syllabus …………………………………………………… 1

Previous Year Questions with explanation –I …………… 2

Previous Year Questions with explanation –II …………... 4

1. Introduction: ……………………………………………………………. 8

1.1 System Software ………………………………………… 8

Questions………………………………………….. 9

in
1.2 OS Strategies …………………………………………………. 11

s.
1.2.1 Batch Processing …………………………………… 11

s
1.2.2 Multi Tasking ……………………………………… 11
p re
1.2.3 Multiprogramming ………………………………… 12

1.3 History Of OS ………………………………………………..


ex
13

Questions ………………………………………… 16
vi

2. Operating System Organization: ……………………………………… 19


al

2.1 Basic OS Function ……………………………………… 19


.k

2.2 Computer Hardware Review ………………………… 19


w

2.2.1 Processor …………………………………………… 20


w

2.2.2 Memory ……………………………………………. 21


w

2.2.3 I/O devices …………………………………………. 24

2.2.4 Device driver ………………………………………. 25

2.2.5 Buses ………………………………………………. 25

2.3 Different Kinds Of OS ………………………………………. 26

2.4 Operating System Concepts …………………………………. 28

2.4.1 Kernels …………………………………………….. 32

Send Your Material &Question Answer Our Email ID [email protected]


www.kalviexpress.in www.kalviexpress.in

2.5 System Calls …………………………………………………. 33

2.6 Operating System Structures …………………………… 37

Questions ………………………………………… 40

3. Device Management: ………………………………………………….. 42


TEACHER'S CARE ACADEMY

3.1 Device Management Functions ……………………………… 42

3.2 Device Characteristics ……………………………………….. 42

3.3 Direct Memory Access ………………………………………. 45

in
3.4 Disk Space Management …………………………………….. 46

3.4.1 Buffering ……………………………………………

s.
47

Questions ………………………………………...

s
48
p re
4. Process Management: …………………………………………………. 50

4.1 Resource Abstraction ………………………………………… 50


ex

4.2 The Process Model …………………………………………… 50

4.3 Process Creation ……………………………………………… 50


vi

4.4 Process Termination …………………………………………. 51


al

4.5 Process Hierarchy ……………………………………………. 52


.k

4.6 Process States ………………………………………………… 52


w

4.7 Implementation Of Process ………………………………….. 53


w

4.8 Threads ………………………………………………………. 54


w

Questions ………………………………………… 58

5. Scheduling: ……………………………………………………………. 60

5.1 UniProcessor Scheduling ……………………………………. 60

5.1.1 Types Of Processor Scheduling ……………………. 60

5.1.2 Scheduling Algorithm ……………………………… 62

5.1.3 Short Term Scheduling Criteria ……………………. 67

www.tcaexamguide.com (9566535080; 9786269980; 76399 67359; 93602 68118 )


Send Your Material &Question Answer Our Email ID [email protected]
www.kalviexpress.in www.kalviexpress.in

5.1.4 Alternative scheduling Policies ……………………. 68

5.2 MultiProcessor Scheduling ………………………………….. 70

Questions ………………………………………… 74

6. Synchronization Principles: …………………………………………… 76

TEACHER'S CARE ACADEMY


6.1 Inter – Process Communication ……………………………… 76

6.1.1 Race Conditions ……………………………………. 77

6.1.2 Critical Regions ……………………………………. 78

in
6.1.3 Mutual Exclusion With Busy Waiting …………….. 79

6.1.4 Sleep and Wakeup ………………………………….

s.
81

6.1.5 Semaphores …………………………………………

s
81

6.1.6 Mutexes …………………………………………….

6.1.7 Monitors
p re
…………………………………………. 82
82
ex

6.1.8 Message Passing …………………………………… 84

6.1.9 Barriers ……………………………………………..


vi

85

7. Dead Lock …………………………………………………………….. 86


al

7.1 Preemptable and Non Preemptable Resources ………………. 86


.k

7.2 Resource Acquisition ………………………………………… 88


w

7.3 Deadlock Detection and Recovery ………………………….. 90


w

7.4 Deadlock Avoidance ………………………………………… 95


w

7.4.1 The Banker’s Algorithm For Single Resource …….. 97

7.4.2 The Banker’s Algorithm For Multiple Resource ……98

7.5 Deadlock Prevention …………………………………………. 99

Questions ………………………………………… 101

8. Memory Management: ………………………………………………… 107

8.1 Basic Memory Management …………………………………. 107

www.tcaexamguide.com (95665 35080; 9786269980; 76399 67359; 93602 68118 )


Send Your Material &Question Answer Our Email ID [email protected]
www.kalviexpress.in www.kalviexpress.in

8.1.1 Memory Management Techniques ………………… 108

8.1.1.1 Fixed Partition …………………………. 108

8.1.1.2 Variable Partition ………………………… 110

8.1.2 Relocation and Protection …………………………. 112


TEACHER'S CARE ACADEMY

8.2 Virtual Memory ……………………………………………… 114

8.2.1 Translation Lookaside Buffer ……………………… 117

8.2.2 Inverted Page Table ………………………………... 118

in
8.2.3 Page Replacement Algorithm ……………………… 119

s.
…………………………………………. 125

s
8.3 Input and Output:
p re
8.3.1 Principles of I/O Hardware ……………………….. 125

8.3.2 Principles of I/O Software …………………………. 129


ex

8.4 File System …………………………………………………... 131

8.5 Multiprocessor Systems ……………………………………… 144


vi

8.5.1 Multiprocessor Hardware ………………………….. 144


al

8.5.2 Multiprocessor OS Types …………………………. 147


.k

8.5.3 Multiprocessor Synchronization …………………… 149


w

8.5.4 Multi Computers ……………………………………. 150


w

Questions …………………………………………. 162


w

9. Protection and Security: ……………………………………………… 164

9.1 Internal Access Authorization ……………………………… 165

9.2 Network Services and Protocols ……………………………. 166

Questions ………………………………………… 168

Practice Questions ………………………………. 170

www.tcaexamguide.com (9566535080; 9786269980; 76399 67359; 93602 68118 )


Send Your Material &Question Answer Our Email ID [email protected]
www.kalviexpress.in www.kalviexpress.in

TEACHER’S CARE ACADEMY, KANCHIPURAM


TNPSC-TRB- COMPUTER SCIENCE -TET COACHING CENTER
HEAD OFFICE: NO. 38/23, VAIGUNDA PERUMAL KOIL,
SANNATHI STREET, KANCHIPURAM – 1. CELL: 9566535080
B.Off 2: 65C, Thillai Ngr(West), 4th Cross St, Trichy – 620018
B.Off 3: Vijiyaraghavachariar Memorial Hall(Opp to Sundar Lodge), Salem

Trichy : 76399 67359 Salem : 93602 68118

PG TRB COMPUTER SCIENCE 2020 - 21

UNIT II – OPERATING SYSTEM

in
s s.
SYLLABUS (Mark – 10)
p re
Introduction: System software, OS strategies; multiprogramming, batch.
ex

Operating System Organization: basic OS function, kernels, device drivers.


vi

Device management: buffering


al
.k

Process Management: resource abstraction, process hierarchy.


w

Scheduling: Strategy selection.


w

Synchronization Principles: deadlock, semaphores, multiprocessors.


w

Deadlocks: hold and wait, Banker’s Algorithm, consumable resources.

Memory Management: memory allocation strategies, variable partition.

Protection and Security: internal access authorization

Send Your Material &Question Answer Our Email ID [email protected]


www.kalviexpress.in www.kalviexpress.in

OPERATING SYSTEMS

INTRODUCTION

SYSTEM SOFTWARE
• System software is a type of computer program that is designed to run a computer's hardware
and application programs.
• It is the interface between the hardware and user applications. The operating system is the
best-known example of system software. The OS manages all the other programs in a
computer.

in
• System software is used to manage the computer itself.

s.
• It runs in the background, maintaining the computer's basic functions so users can run higher-
level application software to perform certain tasks.

s
• Essentially, system software provides a platform for application software to be run on top.
Important features of system software
p re
• Computer manufacturers usually develop the system software as an integral part of the
ex

computer.
• The primary responsibility of this software is to create an interface between the computer
vi

hardware they manufacture and the end user.


• It generally includes the following features:
al

1. High speed: To provide an effective platform for higher-level software in the computer
.k

system.
w

2. Hard to manipulate: It often requires the use of a programming language, which is more
difficult to use than a more intuitive user interface (UI).
w

3. Written in a low-level computer language: Written in a computer language the central


w

processing unit (CPU) and other computer hardware can read.


4. Close to the system: It connects directly to the hardware that enables the computer to run.
5. Versatile: Communicate with both the specialized hardware it runs on and the higher-level
application software that is usually hardware-agnostic and often has no direct connection to
the hardware it runs on. System software also must support other programs that depend on
it as they evolve and change.

OS Definition:
• An operating system is an intermediary between users and computer hardware
• It acts as an interface and controls the execution of all kinds of programs.

Send Your Material &Question Answer Our Email ID [email protected]


www.kalviexpress.in www.kalviexpress.in

OPERATING SYSTEM STRATEGIES

Batch processing
• Batch processing is a technique in which an Operating System collects the programs and data
together in a batch before processing starts.
• An operating system does the following activities related to batch processing.
✓ The OS defines a job which has predefined sequence of commands, programs and data
as a single unit.
✓ The OS keeps a number a jobs in memory and executes them without any manual
information.
✓ Jobs are processed in the order of submission, i.e., first come first served fashion.

in
✓ When a job completes its execution, its memory is released and the output for the job
gets copied into an output spool for later printing or processing.

s s.
p re
ex
vi
al
.k

Advantages
w

• Batch processing takes much of the work of the operator to the computer.
w

• Increased performance as a new job get started as soon as the previous job is finished,
without any manual intervention.
w

Disadvantages
• Difficult to debug program.
• A job could enter an infinite loop.
• Due to lack of protection scheme, one batch job can affect pending jobs.
Multitasking
• Multitasking is when multiple jobs are executed by the CPU simultaneously by switching
between them.
• Switches occur so frequently that the users may interact with each program while it is
running.

Send Your Material &Question Answer Our Email ID [email protected]


www.kalviexpress.in www.kalviexpress.in

• An OS does the following activities in multitasking


✓ The user gives instructions to the operating system or to a program directly, and receives
an immediate response.
✓ The OS handles multitasking in the way that it can handle multiple operations/executes
multiple programs at a time.
✓ Multitasking Operating Systems are also known as Time-sharing systems.
✓ These Operating Systems were developed to provide interactive use of a computer
system at a reasonable cost.
✓ A time-shared operating system uses the concept of CPU scheduling and
multiprogramming to provide each user with a small portion of a time-shared CPU.
✓ Each user has at least one separate program in memory.

in
s s.
p re
ex
vi
al

✓ A program that is loaded into memory and is executing is commonly referred to as


.k

a process.
w

✓ When a process executes, it typically executes for only a very short time before it either
finishes or needs to perform I/O.
w

✓ Since interactive I/O typically runs at slower speeds, it may take a long time to
w

complete. During this time, a CPU can be utilized by another process.


✓ The operating system allows the users to share the computer simultaneously. Since each
action or command in a time-shared system tends to be short, only a little CPU time is
needed for each user.
✓ As the system switches CPU rapidly from one user/program to the next, each user is
given the impression that he/she has his/her own CPU, whereas actually one CPU is
being shared among many users.
Multiprogramming
• Sharing the processor, when two or more programs reside in memory at the same time, is
referred as multiprogramming.

Send Your Material &Question Answer Our Email ID [email protected]


www.kalviexpress.in www.kalviexpress.in

PG TRB COMPUTER SCIENCE 2020 - 21

PRACTICE QUESTIONS:

1. Which one of the following is not a real time operating system?


A) VxWorks B) Windows CE
C) RTLinux D) Palm OS

2. What is the main function of the command interpreter?


A) to get and execute the next user-specified command
B) to provide the interface between the API and application program

in
C) to handle the files in operating system

s.
D) none of the mentioned

s
3. Which of the following is NOT a valid deadlock prevention scheme?
A) Release all resources before requesting a new resource
p re
B) Number the resources uniquely and never request a lower numbered resource than the last
ex

one requested.
C) Never request a resource after releasing any resource
vi

D) Request and all required resources be allocated before execution.


al

4. Which of the following is major part of time taken when accessing data on the disk?
.k

A) Settle time B) Rotational latency


C) Seek time D) Waiting time
w
w

5. A virtual memory system uses First in First out (FIFO) page replacement policy and allocates
w

a fixed number of frames to a process. Consider the following statements:

P: Increasing the number of page frames allocated to a process sometimes increases the page fault
rate.
Q: Some programs do not exhibit locality of reference.

Which one of the following is TRUE?


A) Both P and Q are true, and Q is the reason for P
B) Both P and Q are true, but Q is not the reason for P
C) P is false, but Q is true
D) Both P and Q are false

Send Your Material &Question Answer Our Email ID [email protected]


www.kalviexpress.in www.kalviexpress.in

in
s s.
p re
ex
vi
al
.k
w
w
w

Send Your Material &Question Answer Our Email ID [email protected]


www.kalviexpress.in www.kalviexpress.in
INDEX

PAGE
TOPICS
NUMBER
SYLLABUS 1

PREVIOUS YEAR QUESTIONS & ANSWERS 2

1. Introduction 16

2. Logic gates 21

2.1 NOT, AND, OR Gates 22

2.2 Universal Gates 24

in
3. Number systems 30

s.
1.1 Decimal, Binary, Octal, Hexadecimal Number system 31

s
1.2 Conversions 36

4. Codes
p re
4.1 BCD, ASCII, EBCIDIC, Gray Code, Excess-3 code
46
ex

5. Signed and Unsigned Binary Number code 54

5.1 1’s Complement, 2’s Complement 56


vi

5.2 9’s complement, 10’s complement 63


al

6. Boolean Algebra 68
.k

6.1 Laws of Boolean Algebra 71


w

6.2 Reduction of Boolean Expression 78


w

6.3 Different forms of Boolean Algebra: SOP, POS 83


w

7. Karnaugh Map 92

7.1 2 variable Kmap, 3 Variable Map , 4 variable Kmap, 5 variable 94


Kmap
109
7.2 Variable Entered Map

8. Multiplexer 116

8.1 2x1 Multiplexer, 4x1 Multiplexer, 8 x1Multiplexer 117

9. Demultiplexer 123

8.1 1x4 DeMultiplexer, 1x8 DeMultiplexer 123

Send Your Material &Question Answer Our Email ID [email protected]


www.kalviexpress.in www.kalviexpress.in
10. Encoder 126

11. Decoder 129

12. Combinational Circuit 134

12.1 Half adder 135

12.2 Full Adder 138

12.3 Half Subtractor 141

12.4 Full Subtractor 144

13. FLIP FLOPS 150

13.1 SR flip flop 151

in
13.2 D flip flop 158

s.
13.3 JK Flip flop 160

s
13.4 T Flip flop 164

13.5 Master slave flip flop

13.6 Conversion of flip flop


p re 167

173
ex

14. Model Questions 181


vi
al
.k
w
w
w

Send Your Material &Question Answer Our Email ID [email protected]


www.kalviexpress.in www.kalviexpress.in

TEACHER’S CARE ACADEMY, KANCHIPURAM


TNPSC-TRB- COMPUTER SCIENCE -TET COACHING CENTER
HEAD OFFICE: NO. 38/23, VAIGUNDA PERUMAL KOIL,
SANNATHI STREET, KANCHIPURAM – 1. CELL: 9566535080
B.Off 2: 65C, Thillai Ngr(West), 4th Cross St, Trichy – 620018
B.Off 3: Vijiyaraghavachariar Memorial Hall(Opp to Sundar Lodge), Salem

Trichy : 76399 67359 Salem : 93602 68118

TEACHER'S CARE ACADEMY


PG TRB COMPUTER SCIENCE 2020 - 21

UNIT III – DIGITAL ELECTRONICS

in
s.
SYLLABUS (Marks -10)

s
re
Fundamental concepts: NAND, NOR, Exclusive OR operations,
Boolean Algebra: Number systems and codes: Primary, Octal,
p
ex

Hexadecimal, Signed numbers codes.


vi

Combinational Logic Design: K-Map representation of logical function


and simplification using K-map of 4 and 5 variables.
al
.k

Multiplexers, Decoders
w

Flip flop: Edge triggered Flip flop.


w
w

Text Books:
1. Digital Fundamentals by Floyd.

2. Digital Design by Morris Mano.

Reference Books:
1. Digital Circuits and Microprocessors by Herbart Taub.

2. Digital Electronics by S.Salivahan

www.tcaexamguide.com (95665 35080; 9786269980; 76399 67359; 93602 68118 )


Send Your Material &Question Answer Our Email ID [email protected]
www.kalviexpress.in www.kalviexpress.in
16

INTRODUCTION:

Electronic systems usually deal with information. Representation of information is


called a signal. Signal in electronics is generally in form of voltage or current. Value of
a signal is proportional to some physical quantity and it gives information about it. For
example, temperature represented in terms of voltage signal.
TEACHER'S CARE ACADEMY

There are two types of signals which are different in terms of their characteristics with
respect to time and value.
1. Analog Signals
2. Digital Signals

in
A signal whose value is defined at all instances of time is called continuous time signal.
On the other hand signal whose values are defined only at discrete instances of time is

s.
called discrete time signal. Most of the signals that occur in nature are analog in form.

s
A discrete time signal can be obtained from continuous time signal by process called
sampling. This has been illustrated in Fig. 1.1.
p re
ex
vi
al

Fig. 1.1: (a) Continuous time signal x(t) sampled at every T interval, (b) Resulting
.k

discrete time signal x(n)


w

Similarly if a signal can take any value in a given range between some minimum and
maximum value then the signal is called continuous value signal. On the other hand
w

if a signal takes only certain fixed values in a given range then it is called discrete
w

value signal. The process of converting a continuous value signal to a discrete value
signal is called quantization. This is illustrated in Fig. 1.2.

Fig. 1.2: Continuous value signal (solid line) and discrete value signal (dotted line)

www.tcaexamguide.com (95665 35080; 9786269980; 76399 67359; 93602 68118 )


Send Your Material &Question Answer Our Email ID [email protected]
www.kalviexpress.in www.kalviexpress.in
17

Analog signal: Signals that are continuous in time and continuous in value are called
analog signal.

Digital signal: Signals that are discrete in time and discrete in values are called digital
signals. Digital signals are generally processed by digital systems like computers and
hence their values are represented in terms of binary as shown in Fig. 1.2.

TEACHER'S CARE ACADEMY


Analog signal being continuous in time will have infinite values in any given period
of time. Practically a digital system like computer cannot handle infinite values due
to limited physical resources and processing power. This is the reason why a
continuous time signal has to be sampled and converted to discrete time signal.

in
s.
Again Analog signals are continuous in value and hence can take any value in a
given range. Now ideally number of values in any given range will be infinite which

s
re
cannot be represented by finite number of bits on a computer. For example, as shown
in Fig. 1.2, with three bits used for representing values only eight different values can
p
be represented. Thus a continuous value signal has to be quantized and converted to
ex

discrete value signal.


1.1.1 Levels of Integration
vi
al

Digital electronic circuits have become increasingly popular and successful due to
integrated circuit (IC) technology. Advancement in IC technology has made it
.k

possible to construct large number of devices (eg. transistor, diode, resistors,


w

capacitors, etc) on a very small chip. Classification of IC technology based on


number of components per chip is as follows.
w
w

1. Small-scale integration (SSI), containing fewer than 100 components


2. Medium-scale integration (MSI), containing 100 to 1000 components
3. Large-scale integration (LSI), containing 1000 to 10,000 components
4. Very large-scale integration (VLSI), containing more than 10,000 components

www.tcaexamguide.com (95665 35080; 9786269980; 76399 67359; 93602 68118 )


Send Your Material &Question Answer Our Email ID [email protected]
www.kalviexpress.in www.kalviexpress.in
18

1.1.2 Comparison of Analog and Digital Systems

Analog Systems Digital Systems


1 Analog systems operate on Digital systems operate on discrete time and discrete
continuous time and continuous value signals generally represented in binary.
value signals.
TEACHER'S CARE ACADEMY

2 Analog systems are difficult to Digital systems are easy to design as most of the
design. components are in form of
Integrated circuits (IC).
3 Analog systems are mostly custom Digital systems have high degree of flexibility.

in
made and lack flexibility.
4 Less efficient in storage of More efficient in storage of information.

s.
information.

s
5 Analog signal processed by these Digital signal are more noise-immune compared to
systems are affected by noise very
easily.
analog signals.
p re
6 Relatively costly compared to Low cost due to mass production of
ex

digital system components.


7 Analog systems are more sensitive Digital systems are less sensitive to
vi

to parameter variation. parameter variation


al

8 No conversion of input signals are Input signals are converted from analog
required before processing to digital form before it is processed
.k

9 As no conversion of input signal is Due to process of sampling and of


w

required there is no loss of quantization there is loss


w

information. information.
10 Analog systems are more efficient Digital systems may offer limitations for
w

for real time processing real time processing

1.2 Introduction to Digital System:

A digital system uses a building blocks approach. Many small operational units are
interconnected to make up the overall system.
The most basic logical unit system is gate circuit. There are several different types of
gates with each perform differently from other logic gates.
Digital signal consist of only two values, ‘0’ and ‘1’. These two values have logical

www.tcaexamguide.com (95665 35080; 9786269980; 76399 67359; 93602 68118 )


Send Your Material &Question Answer Our Email ID [email protected]
www.kalviexpress.in www.kalviexpress.in

PG TRB COMPUTER SCIENCE 2020 - 21

DIGITAL ELECTRONICS MODEL QUESTIONS:

1. The voltages corresponding to LOW and HIGH levels respectively are given below.
Identify the voltages which correspond to the negative logic system.

A) 0 V and 5 V B) –1.5 V and – 0.5 V


C) 5 V and 0 V D) 1 V and 5 V

2. Which of the following is the most widely used alphanumeric code for computer input

in
and output?
A) Gray B) ASCII

s.
C) PARITY D) EBCDIC

s
3. The given hexadecimal number (1E.53)16 is equivalent to ____________ .

A) (35.684)8
C) (34.340)8
p re
B) (36.246)8
D) (35.599)8
ex

4. Convert 59.7210 to BCD.


vi

A) 111011 B) 01011001.01110010
C) 1110.11 D) 0101100101110010
al
.k

5. The ASCII code is basically


A) 5 bit B) 6 bit
w

C) 7 bit D) 4 bit
w
w

6. Decode the following ASCII message.


10100111010100101010110001001011001
01000001001000100000110100101000100
A) STUDYHARD B) STUDY HARD
C) stydyhard D) stydy hard

7. Using 4-bit numbers (n = 4) if k = (0011)2 how is k expressed in 2's complement.


A) (1011)2 B) (1101)2
C) (1100)2 D) (0101)2

Send Your Material &Question Answer Our Email ID [email protected]


www.kalviexpress.in www.kalviexpress.in

in
s s.
p re
ex
vi
al
.k
w
w
w

Send Your Material &Question Answer Our Email ID [email protected]


www.kalviexpress.in www.kalviexpress.in

CONTENTS
PG TRP SYLLABUS………………………………………………………. 1
PREVOIUS YEAR QUESTIONS AND ANSWERS - I ………………… 2
PREVOIUS YEAR QUESTIONS AND ANSWERS – II ……………… 9
1. DATA STRUCTURE
1.1. INTRODUCTION…………………………………………………………………….. 18

in
2. ARRAY
2.1. ARRAYS TERMINOLOGY…………….………………………………………… 19

s.
2.2. OPERATIONS ON ARRAY……………………………..………………………… 20

s
2.3. TYPES OF ARRAYS………………………………………………………………. 26

3. STACK
p re
3.1. INTRODUCTION ………………………………………………….……… 29
ex

3.2. OPERATIONS ON STACKS ……………………………………………… 30


3.3. APPLICATIONS OF STACK…………………………………………….….31
vi

4. QUEUE
al

4.1. INTRODUCTION…………………..………………………………………...36
4.2. BASIC FEATURES OF QUEUE……………………………....……………..37
.k

4.3. APPLICATIONS OF QUEUE……………………………….……………….37


w

4.4. VARIOUS QUEUE STRUCTURE………………….………………………..39


w

5. LINKED LISTS
w

5.1. INTRODUCTION………………………………………………….………….42
5.2. TYPES OF LINKED LISTS………………………………………………..….42
5.2.1. SINGLY LINKED LIST………………………………………....….43
5.2.2. DOUBLY LINKED LIST……………………………………...…...51
5.2.3. CIRCULAR LINKED LIST…………………………………...…...52
5.2.4. DOUBLY CIRCULAR LINKED LIST…………………………..…52

Send Your Material &Question Answer Our Email ID [email protected]


www.kalviexpress.in www.kalviexpress.in

6. TREES
6.1. INTRODUCTION……………………………………………………………….....54
6.2. BASIC TERMINOLOGY…………………………………………………………...55
6.3. TYPES OF BINARY TREE……………………………………….…………….......56
6.4. TRAVERSAL OF A BINARY TREE…………………………………….......58
6.5. THREADED BINARY TREES………………………………………………….......59

7. BALANCED BINARY TREE


7.1. AVL TREE……………………………………………………………….……….…64
7.2. SPLAY TREE…………………………………………………………….………….69
7.3. RED-BLACK TREE…………………………………………………………….…...76

in
7.4. B TREE…………………………………………………………………..….............80

s.
7.5. HEAP TREES………………………………………………………..……………...84

s
8. GRAPH p re
8.1. INTRODUCTION…………………………………………………….…..……….. 88
8.2. GRAPH TERMINOLOGY…………………………………………….......................89
ex

8.3. GRAPH TRAVERSAL………………………………………………….…................93


8.3.1. BFS (Breadth First Search)……………………………..…..……………93
vi

8.3.2. DFS (Depth First Search)……………………………………...................97


8.4. MINIMUM SPANNING TREE…………………………………………………......104
al

8.4.1. KRUSKAL’S ALGORITHM…………………………….…...……………105


.k

8.4.2. PRIM’S ALGORITHM…………………………………………………..108


8.5. SHORTEST PATH ALGORTHIMS………………………………..……………….112
w

8.5.1. DIJKSTRA ALGORITHM………………………………….....................112


w

8.5.2. FLOYD WARSHALL ALGORITHM……………………..……………...113


w

9. ALGORITHMS FOR SEARCHING AND SORTING


9.1. SEARCHING………………………………………..……………………….……..120
9.1.1. LINEAR OR SEQUENTIAL SEARCH………………………….….……..121
9.1.2. BINARY SEARCH………………………………………………….……..122
9.1.3. BINARY TREE SEARCH………………………………………………….123
9.2. SORTING………………………………………………………………..………....125
9.2.1. INTERNAL SORTING………………………………………….………....125
9.2.1.1. BUBBLE SORT…………………………………………………...126
9.2.1.2. SELECTION SORT…………………………………….............…129
9.2.1.3. QUICK SORT………………………………………………….....132

Send Your Material &Question Answer Our Email ID [email protected]


www.kalviexpress.in www.kalviexpress.in
9.2.1.4. MERGE SORT……………………………………....................….136
9.2.1.5. RADIX SORT………………………………………………….......139
9.2.1.6. INSERTION SORT………………………………………………..141
9.2.1.7. HEAP SORT………………………………………………..……..143
9.2.1.8. SHELL SORT………………………………..........................……148
9.2.2. EXTERNAL SORTING……………………………………………………125
9.3. COMPLEXITY…………………………………………………………….…...150
9.3.1. TIME COMPLEXITY…………………………………..............................150
9.3.2. SPACE COMPLEXITY…………………………….…………………..…151
10. ABSTRACT DATA TYPES & OBJECTS
10.1. INTRODUCTION…………………………………………..……………………...153

in
10.2. DATA TYPE……………………………………………………..............................153
11. LANGUAGE SUPPORT AND OOP…………………………..…………..155

s.
12. INHERITANCE…………………………………………………................158

s
13. CLASSES & SUB CLASSES………………………………………………165
14. HEADER FILES………………………………………………………..….168
p
15. OVERLOADING…………………………………………….……………..171
re
ex

16. GRAPHICAL USER INTERFACE (GUI)……………….……………..…173


17. OPEN OFFICE……………………………………………..…………..….182
vi

PRACTICE QUESTIONS…………………………………..…………………….…136
al
.k
w
w
w

Send Your Material &Question Answer Our Email ID [email protected]


www.kalviexpress.in www.kalviexpress.in
1

TEACHER’S CARE ACADEMY, KANCHIPURAM


TNPSC-TRB- COMPUTER SCIENCE -TET COACHING CENTER
HEAD OFFICE: NO. 38/23, VAIGUNDA PERUMAL KOIL,
SANNATHI STREET, KANCHIPURAM – 1. CELL: 9566535080
B.Off 2: 65C, Thillai Ngr(West), 4th Cross St, Trichy – 620018
B.Off 3: Vijiyaraghavachariar Memorial Hall(Opp to Sundar Lodge), Salem

Trichy : 76399 67359 Salem : 93602 68118

UNIT IV: DATA STRUCTURES

in
SYLLABUS

s.
Abstract data types and objects, Graphical User

s
re
Interface; Language Support and OOP: Inheritance,
Classes and sub classes, header files, overloading
p
Programming with Data Structures: Stacks, Queues,
ex

Lists, Trees and Balanced Binary Trees, Algorithms for


vi

Searching and Sorting and Open Office


al
.k

BOOKS TO STUDY:
w
w

1. Classic Data Structures - D.Samanta


w

2. Data Structures made simple - Sathish Jain, Shashi Singh.

3. Data Types and structures - Gotlieb, C.C. and L.R.Gotlieb.

4. Fundamentals of Data Structures - Horowitz, Ellis, and Sartaj


Sahni.

5. An introduction to Data Structures with applications - Trembly,


Jean Paul, and Paul G. Sorenson

www.tcaexamguide.com (9566535080; 9786269980; 76399 67359; 93602 68118)

Send Your Material &Question Answer Our Email ID [email protected]


www.kalviexpress.in www.kalviexpress.in
18

UNIT IV - DATA STRUCTURES


1.1 INTRODUCTION
WHAT IS MEANT BY A DATA?
 Data is a Single (or) a set of values. (Or) Facts and statistics collected together for
reference or analysis
WHAT IS MEANT BY DATA STRUCTURE?
• It is a logical or mathematical model of a particular organization of data.
(Or)

TEACHER'S CARE ACADEMY


• Data Structure is a specialized format for organizing and storing data so that it can be
accessed and worked with in appropriate ways to make a program efficient.

in
• Data Structure = Organized Data + Allowed Operations.
APPLICATIONS OF DATA STRUCTURE

s s.
p re
ex
vi

Categories of data structures:


al

• Two types:
1) Linear data structure  Single generic type
.k

2) Non-linear data structure  Multiple Individual type


w
w
w

www.tcaexamguide.com (95665 35080; 9786269980; 76399 67359; 93602 68118)


Send Your Material &Question Answer Our Email ID [email protected]
www.kalviexpress.in www.kalviexpress.in
19

2. ARRAY

• An array is a collection of items stored at contiguous memory locations.


• The idea is to store multiple items of the same type together.

• This makes it easier to calculate the position of each element by simply adding an offset

TEACHER'S CARE ACADEMY


to a base value, i.e., the memory location of the first element of the array (generally
denoted by the name of the array).

in
2.1.ARRAYS TERMINOLOGY:

s.
Size:
 Number of elements in an array is called the size of the array. Also called as length or

s
dimension.
Type: re
 Type of an away represents the kind of data type. Ex: int, string
p
ex
Base:
 Base of an array is address of memory location where the first element in the array is
vi

located.
Range of index:
al

 Indices of array elements any charge can be referenced by subscript like Ai or A[i], this
.k

subscript is known as index. Index is always as integer value. Every element is


identified by a subscripted or indexed variable
w

 Ex:
w

 Int A[100]; The range of index is from 0 to 9


w

 A:Array[-5….19] of integer: The Points of the rage is -5,-4,-3,….18,19.


 Here L is the Lower Bound.
 If the range of index varies from L…U then the size of the away can be calculated as
Size(A)=U-L+1.
Word:
 It denotes the size of an element. In memory location computer can store an element of
word size w. This word size varies from machine to machine such as 1 byte to 8 bytes.

www.tcaexamguide.com (95665 35080; 9786269980; 76399 67359; 93602 68118)


Send Your Material &Question Answer Our Email ID [email protected]
www.kalviexpress.in www.kalviexpress.in
20

2.2. OPERATIONS ON ARRAY


 The common operations can be performed on an array are
 Traversing-processing each element in the array.
 Sorting -Organizing the elements in some order.
 Searching -Finding the location of an element with a given value.
 Insertion - Adding a new element.
 Deletion -Removing an element.
 Merging -Combining two arrays into a single array.
 Although searching, and traversal of an array is an easy job, insertion and deletion is

TEACHER'S CARE ACADEMY


time consuming. The elements need to be shifted down before insertion and shifted up
after deletion.

in
1. Traversing:

s.
This operation is used visiting all elements in an array.
Example: Array ‘a’ contains the following elements:

s
5 3 4 8 7
p re
The result of traversing is:
ex

5
3
vi

4
al

8
.k

7
The algorithm for traversing is as follows:
w

1) Read the Array elements.


w

2) Display the elements of the array.


w

Algorithms: Traverse-array ( )
Input: An array A with elements
Output: According to process ( )

Steps:
1. i=L // start from first location L
2. while i<=U do // U upper bound
1. Process (A[i])
2. i=i+1 // move to next position
3. End while
4. Stop
Here process ( ) is an procedure which when called for an element can perform an action

www.tcaexamguide.com (95665 35080; 9786269980; 76399 67359; 93602 68118)


Send Your Material &Question Answer Our Email ID [email protected]
www.kalviexpress.in www.kalviexpress.in
200

TEACHER’S CARE ACADEMY, KANCHIPURAM


TNPSC-TRB- COMPUTER SCIENCE -TET COACHING CENTER
HEAD OFFICE: NO. 38/23, VAIGUNDA PERUMAL KOIL,
SANNATHI STREET, KANCHIPURAM – 1. CELL: 9566535080
B.Off 2: 65C, Thillai Ngr(West), 4th Cross St, Trichy – 620018
B.Off 3: Vijiyaraghavachariar Memorial Hall(Opp to Sundar Lodge), Salem

Trichy: 76399 67359 Salem: 93602 68118

TEACHER'S CARE ACADEMY


Date: Time: 3 Hours Total Marks: 150

in
PGTRB – COMPUTER INSTRUCTOR GRADE I -2021
UNIT IV – DATA structures

s s.
Model examinations
re
1) A tool for specifying logical properties of data types is__________
p
a) Abstract Data Type c) Non Abstract Data Type
ex

b) Logical Data Type d) Linear Data Type


vi

2) What data structure can be used to check if syntax has balanced parenthesis?
a) Queue c) List
al

b) Tree d) Stack
.k

3) In an array range specifies__________


a) Scope of the Array c) The Group of the Array
w

b) Number of the Elements in the Array d) Size-1 of the array


w

4) Which of the following data structures are indexed structures


w

a) Linear arrays c) Both (A) & (B)


b) Linked lists d) None of above
5) The ‘*’ is known as
a) Referencing Operator c) Memory Allocation Operator
b) Dereferencing Operator d) Memory freeing Operator

www.tcaexamguide.com (9566535080; 9786269980; 76399 67359; 93602 68118)

Send Your Material &Question Answer Our Email ID [email protected]


www.kalviexpress.in www.kalviexpress.in

in
s s.
p re
ex
vi
al
.k
w
w
w

Send Your Material &Question Answer Our Email ID [email protected]


www.kalviexpress.in www.kalviexpress.in

Programming in C+++

Page
S.No Contents
No
Syllabus 1
Solved Question and Answer 2

1. Object Oriented Programming 12


1.1 Introduction 12
1.2 Procedure Oriented Programming 12

in
1.3 Object Oriented Programming Paradigm 13

s.
1.4 Basic Concepts Of Object-Oriented Programming 15
1.4.1 Object 15

s
1.4.2 Class 15
1.4.3
1.4.4
Data Hiding and Encapsulation
Encapsulation
p re 17
18
ex
1.4.5 Abstraction 19
1.4.6 Abstract and Concrete Class 21
vi

1.4.7 Polymorphism 22
1.4.8 Implementation of Polymorphism using Function Overloading 22
al

1.4.9 Inheritance 23
.k

1.4.10 Message Passing 24


1.4.11 Advantages of Object Oriented Programming over earlier 24
w

Programming methodologies
w

1.4.12 Exercise 25
w

2. Implementation of Object Oriented Programming Concept in C++ 29


2.1 Member of a class: Data Members and Member functions(methods) 29
2.2 Data Members 29
2.3 Member functions 30
2.4 Inside class definition and outside the class definition using scope 30
resolution operator(::)
Nesting of Member functions 32
2.5 Exercise 34

Send Your Material &Question Answer Our Email ID [email protected]


www.kalviexpress.in www.kalviexpress.in

3. Control structure 37
3.1 Introduction 37
3.2 Condition 38
3.2.1 The if statement 38
3.2.2 Simple if statement 39
3.2.3 If else statement 39
3.2.4 Nested if 40
3.2.5 The else if Ladder 41
3.2.6 The switch statement 41
3.2.7 Goto statement 42
3.3 Exercise 43

in
4. Looping Structure 46

s.
4.1 Introduction 46

s
4.2 While loop 46
4.3 For statement
4.4 The do-while statement
p re 47
48
4.5 Jumps is Loop 49
ex

4.6 Exercise 49
5. Functions 50
vi

5.1 Introduction 50
al

5.2 The main function 50


5.3 Function prototyping 51
.k

5.4 Call by reference 51


w

5.5 Return by reference 52


w

5.6 Objects As Function Arguments pass by value/pass by reference 52


5.7 Difference between call by value and call by reference 54
w

5.8 Exercise 54
6. Constructors and Destructors 56
6.1 Introduction to Constructors 56
6.2 Types of Constructors 57
6.3 Default Constructor 57
6.4 Parameterized Constructors 58
6.5 Multiple Constructors in a class 59
6.6 Constructor with Default Arguments 59
6.7 Dynamic Initialization of Objects 59

Send Your Material &Question Answer Our Email ID [email protected]


www.kalviexpress.in www.kalviexpress.in

6.8 Copy constructors 60


6.9 Destructors 62
6.10 Exercise 63
7. Inheritance: Extending Classes 66
7.1 Introduction 66
7.2 Derived classes 66
7.3 Single Inheritance 68
7.4 Multilevel Inheritance 70
7.5 Multiple Inheritance 71
7.6 Exercise 73

in
8. Data File Handling 77
8.1 Introduction 77

s.
8.2 Input and Output Operation 78

s
8.3 Error Handling Function 78
8.4 File Pointers and Their Manipulation
re
8.5 Reading and Manipulation of Text from an existing test file
p 79
79
8.5.1 Program to write in a text file 80
ex

8.5.2 Program to read from text file and display it 80


8.5.3 Program to count number of characters 80
vi

8.5.4 Program to count number of lines 81


al

8.5.5 Program to copy contents of file to another file 82


8.6 Exercise 82
.k

9. Pointer 84
w

9.1 Introduction 84
w

9.2 Declaration and Initialization of Pointers 85


9.3 Dynamic Memory Allocation 87
w

9.4 new and delete Operators 87


9.5 Dynamic Memory Allocation for Arrays 89
9.6 Pointers and Arrays 90
9.7 Arrays of Pointers 93
9.8 Function Returning the pointer 94
9.9 Dereference operator(*) 95
9.10 Self Referential Structures 97
9.11 Types of self referential structures 97
9.12 Exercise 98

Send Your Material &Question Answer Our Email ID [email protected]


www.kalviexpress.in www.kalviexpress.in

10. Python 102


10.1 How to get started with python? 102
10.2 Your first Python Program 105
10.3 Python Keywords and Identifiers 105
10.4 Python Statement, Indentation and Comments 106
10.5 Docstrings in Python 108
10.6 Python Variables, Constants and Literals 109
10.7 Python Data types 115
10.8 Python Operators 126
10.9 PythonNamespace and Scope 132
10.10 Python flow Control 136

in
10.11 Python for Loop 140

s.
10.12 Python functions 148

s
10.13 Python Package 154
10.15 File Handling in Python
10.16 Python Object Oriented Programming
p
10.17 Python objects and classes
re 156
159
165
ex

Python Operator Overloading 166


10.18 Exercise 169
vi
al

11. PHP 171


11.1 What is PHP 171
.k

11.2 How to Download & Install XAMP on Windows 175


w

11.3PHP Data Types, Variables, Constant, Operators 177


11.4PHP Operators 180
w

11.5 PHP Control Structures: If else, Switch Case 182


w

11.6 PHP Loop: For, ForEach, While, Do While 185


11.7 PHP Form using GET, POST Methods with Example 191
11.8 Exercise 195
12. Sample Questions (more than 100 Questions) 196

Send Your Material &Question Answer Our Email ID [email protected]


www.kalviexpress.in www.kalviexpress.in

TEACHER’S CARE ACADEMY, KANCHIPURAM


TNPSC-TRB- COMPUTER SCIENCE -TET COACHING CENTER
HEAD OFFICE: NO. 38/23, VAIGUNDA PERUMAL KOIL,
SANNATHI STREET, KANCHIPURAM – 1. CELL: 9566535080
B.Off 2: 65C, Thillai Ngr(West), 4th Cross St, Trichy – 620018
B.Off 3: Vijiyaraghavachariar Memorial Hall(Opp to Sundar Lodge), Salem

Trichy : 76399 67359 Salem : 93602 68118

PG TRB COMPUTER SCIENCE 2020 - 21

UNIT V – PROGRAMMING in C++

in
SYLLABUS (Mark – 20)

s.
1. OBJECT ORIENTED PROGRAMMING: Data hiding, data

s
encapsulation, Class and Object, Abstract Class and Concrete class,

re
Polymorphism (Implementation of polymorphism using Function
overloading as an example in C++); Inheritance, Advantages of Object
p
oriented Programming over earlier programming methodologies.
ex

2. IMPLEMENTATION OF OBJECT ORIENT PROGRAMMING


vi

CONCEPTS IN C++:
al

Members Functions (methods), inside class definition and outside class


definition using scope resolution operator (::) Objects as function
.k

arguments pass by value and pass by reference ;


w

CONSTRUCTOR AND DESTRUCTOR:


w

CONSTRUCTOR: Declaration and Definition of a constructor;


w

DESTRUCTOR: (Extending Class): Concepts of inheritance, Base Class,


Derived Class, Defining Derived Class, Multillevel Inheritance and
Multiple Inheritance

Data File Handling: Reading and Manipulation of text from an already


existing text file (Accessing Sequentially);

3. POINTERS: Declaration and Initialization of Pointers: Dynamic


memory allocation/deallocation Operators: New, delete; Pointers and
Arrays: Array od Pointers, Function Returning a Pointer. Deference
Operator: Self referential Structures, Python, PHP.

Send Your Material &Question Answer Our Email ID [email protected]


www.kalviexpress.in www.kalviexpress.in
12

1. OBJECT-ORIENTED PROGRAMMING

OOPS: Object Oriented Programming. It is a programming paradigm in its own right and it is
a set of software engineering tools which can be used to build more reliable and reusable system.

1.1 Introduction
TEACHER'S CARE ACADEMY

Definition: OOP is a method of implementation in which programs are organized as cooperative


collection of objects each of which represents an instance of some class and whose classes are all
members of a hierarchy of classes united through the property called inheritance.

in
Software Crisis
The major issues in software are

s.
1. How to represent real life entities of problem in system design?

s
2. How to design systems with open interfaces?
3. How to ensure reusability?
4. How to develop modules?
p re
5. How to improve quality and productivity of software?
ex

Software Evolution
vi

Some of the programming approaches: Layers of computer software.


al

▪ Modular programming

.k

Top-down programming
▪ Bottom-up programming
w

▪ Structured programming
w
w

1.2 Procedure Oriented Programming


Important features:
1. Programs are organized in the form of subroutines and all data items are global.

www.tcaexamguide.com (95665 35080; 9786269980; 76399 67359; 93602 68118 )


Send Your Material &Question Answer Our Email ID [email protected]
www.kalviexpress.in www.kalviexpress.in
13

2. Program controls are though jumps and call to subroutine.


3. Subroutines are abstracted to avoid repetitions.
4. Suitable for medium sized software applications.
5. Difficult to maintain and enhance the program code.

Structure of procedure oriented program

TEACHER'S CARE ACADEMY


COBOL, FORTRAN and C are commonly known as Procedure oriented programming
(POP).

Global Data Global Data

in
s.
Function-1 Function-2 Function-3

s
Local Data Local Data Local Data

Disadvantages:
p re
ex

1. No security of data.
2. No better memory management.
vi

3. No code reusability
al

4. Slow performance as length of the program increase.


5. Code maintenance and enhancement are difficult.
.k
w

Characteristics of procedure oriented programming


1. Emphasis is on doing things (algorithms)
w

2. Large program are divided into smaller programs known as functions.


w

3. Most of the functions share global data.


4. Data move openly around the system from function to function.
5. Functions transform data from one form to another.
6. Employs top-down approach in program design.

1.3 Object Oriented Programming Paradigm


Development of a software system is through the use of data abstraction. It is classified
into two categories.
1. Object based programming language.
2. Object oriented programming language.
www.tcaexamguide.com (95665 35080; 9786269980; 76399 67359; 93602 68118 )
Send Your Material &Question Answer Our Email ID [email protected]
www.kalviexpress.in www.kalviexpress.in
14

Object Based Programming Language:


It supports encapsulation and object identity without supporting important features like
polymorphism, inheritance and message based communication.

Object Oriented Programming Language:


Incorporate all the features of object based along with inheritance and polymorphism.
TEACHER'S CARE ACADEMY

OOP=Object based Language +inheritance+ polymorphism.

Module
The modules represent the physical building blocks. It is a collection of classes and objects.
OOP is a methodology that allows the association of data structure with operations.

in
s s.
p re
ex
vi
al
.k
w

Features of OOP as follows,


w

1. Improvement over the structure programming


w

2. Emphasis is on data rather than procedure.


3. Data abstraction is introduced in addition to procedural abstraction.
4. Data and associated operations are unifies into a single unit, thus the objects are grouped with
common attributes, operations and semantics.
5. Programs are designed around the data being operation rather than operations themselves.
6. Relationships can be created between similar yet distinct data types. EX: C++, Samll talk,
Eiffel, Java, etc.
7. Follow bottom-up approach in program design.

www.tcaexamguide.com (95665 35080; 9786269980; 76399 67359; 93602 68118 )


Send Your Material &Question Answer Our Email ID [email protected]
www.kalviexpress.in www.kalviexpress.in

PG TRB COMPUTER SCIENCE 2020 - 21


Programming in C++

1. Classes and object

1) Correct way of creating an object of a class called Car is


A. Car obj;
B. Car *obj = new Car();
C. Only B
D. A & B both

in
2) In C++, Class object created statically(e.g. Car obj; and dynamically (Car *obj = new Car() ; )

s.
are stored in memory
A. Stack, heap

s
B. Heap, heap
C. Heap, stack
D. Stack, stack
p re
ex

3) True statement about Class and structure in C++ is


vi

A. Default access specifier is private in class and public in structure


B. Way of creating objects of class and structure are different
al

C. Way of inheriting class and structure are different


.k

D. None
w

4) In C++ programming, cout is a/an


w

A. Function
w

B. Operator
C. Object
D. macro

5) Which is Abstract Data Type in C++


A. Class
B. Int
C. Float
D. array

Send Your Material &Question Answer Our Email ID [email protected]


www.kalviexpress.in www.kalviexpress.in

in
s s.
p re
ex
vi
al
.k
w
w
w

Send Your Material &Question Answer Our Email ID [email protected]


www.kalviexpress.in www.kalviexpress.in

Table of Content

Chapter Chapter Name Page


No No
Syllabus 1
Previous Year Question Paper – SET 1 3
Previous Year Question Paper – SET 2 6

1 Database Management System 9

1.1.Introduction to Database Concepts 9

in
1.1.1.Basic Terminologies of DBMS 9

s.
1.1.2.Purpose of Database System 10
1.2. DBMS 13

s
1.3. Characteristics of the Database Approach 17
1.4. Data Model
re
1.5. The Three Schema Architecture (Data Abstraction)
p 20
21
1.6. Database Languages and Interfaces 23
ex

1.7. Database Users 24


vi

2 Keys in Database System 27


al

2.1. Introduction 27
.k

2.2.Super Key 28
2.3. Candidate Key 28
w

2.4. Primary Key 29


w

2.5. Alternate Key 30


2.6. Foreign Key 30
w

2.7.Compound Key 31
2.8. Composite Key 32
2.9. Surrogate Key 32
2.10. Differences between Primary Key & Foreign Key 33
2.11. Entity Relationship (ER) Model 34
2.12. Main Phases of Database Design 34
2.13. Entity Types, Entity Sets, Attributes and Keys 36
2.14.Relationship Types, Relationship Sets, Roles and Structural 40
Constraints

Send Your Material &Question Answer Our Email ID [email protected]


www.kalviexpress.in www.kalviexpress.in

3 Data Normalization 45

3.1. Introduction 45
3.2. First Normal Form 46
3.3. Second Normal Form 46
3.4. Third Normal Form 48
3.5. Boyce-Codd Normal Form 49

4 Back-End and Front-End Tools 53

4.1.Examples of Commercially available Database Management 53


System’s (Back-End)- MYSQL

in
4.2. Examples of Front End Software’s Visual C++ 59

s.
5 RDBMS Tools 62

s
5.1. Classification of SQL Statements
5.1.1.Data Manipulation Language
p re 62
63
5.1.1.1. SELECT Statement 63
ex

5.1.1.2. INSERT Statement 63


5.1.1.3. UPDATE Statement 64
vi

5.1.1.4. DELETE Statement 64


al

5.2. SQL SELECT Statements 65


5.2.1. Selecting ALL Columns 65
.k

5.2.2. Selecting Specific Columns 65


w

5.3. Column Heading Default 65


5.4. Limiting Rows during Selection ( using WHERE Clause) 67
w

5.5. Pattern Matching 67


w

5.6. TOP, LIMIT Clause 68

6 SQL Operators 73

6.1. Arithmetic Operators 73


6.2. Comparison ( Relational) Operators 73
6.2.1. Use of Comparison Operators 73
6.3. Logical Operators 74
6.3.1. Use of Logical Operators 74
6.3.2. Logical Operator Precedence 75

Send Your Material &Question Answer Our Email ID [email protected]


www.kalviexpress.in www.kalviexpress.in

6.4. Order By Clause 75


6.4.1. Sorting Records in Ascending Order 76
6.4.2. Sorting Records in Descending Order 76
7 Functions 79

7.1. Introduction 79
7.2. Types of Functions 80
7.3. Single Row Functions 80
7.3.1. Numerical Functions 80
7.3.2. Character Functions 81
7.3.3. Date Functions 81
7.3.4. Implicit and Explicit Conversion 82

in
8 Grouping Records 89

s.
8.1. Types of Group Functions 89

s
8.1.1. MAX() 91
8.1.2. MIN()
8.1.3. COUNT()
p re 91
91
8.1.4. SUM() 91
ex

8.1.5. AVG() 92
8.1.6. Using AVG() and SUM() Functions 92
vi

8.2. Group By Clause 92


al

8.3. Grouping By More than One Columns 93


8.4. Having Clause 94
.k

9 Sub Queries 100


w

9.1. Guidelines for using Sub-Queries 100


w

9.2. Types of Sub-Queries 103


9.2.1. Single Row Sub-Queries 103
w

9.2.2. Multiple Row Sub-Queries 104


9.2.2.1. ANY, ALL, IN, NOT IN Operators and Examples 105
10 Database Objects 109

10.1. Data Types 109


10.2. Data Definition Language (DML) 110
10.2.1. Create Table Command 110
10.2.2. Describe Table Command 110
10.2.3. Alter Table Command 110
10.2.4. Drop Table Command 111

Send Your Material &Question Answer Our Email ID [email protected]


www.kalviexpress.in www.kalviexpress.in

10.3. Synonyms 111


10.4. View 113

11 Integrity Constraints 116

11.1. Introduction 116


11.2. Types of Integrity Constraints 116
11.2.1. Domain Integrity Constraints 116
11.2.2. Entity Integrity Constraints 116
11.2.3. Referential Integrity Constraints 117
11.3. Index 119

in
12 Creation of Table/Relation and Managing Existing Tables 122

s s.
12.1. CREATE TABLE Command 122
12.2. Creating a Table by using a Sub-Query

12.3. The ALTER TABLE Statement


p re
Managing Existing Tables and Other Database Objects
122
122
122
ex

12.3.1. Adding a New Column in a Table 122


12.3.2. Modifying a Column in a Table 122
vi

12.3.3. Renaming a New Column in a Table 122


12.3.4. Dropping a Column in a Table 122
al

12.4. Dropping Tables 122


.k

13 Relational Algebra and Relational Calculus 124


w
w

13.1.Introduction 124
13.2.Relational Algebra 124
w

13.3. Relational Calculus 139


13.3.1. Tuple Relational Calculus 139
13.3.2. Domain Relational Calculus 141

PG-TRB 2020-21 Question Bank 144

Send Your Material &Question Answer Our Email ID [email protected]


www.kalviexpress.in www.kalviexpress.in

TEACHER’S CARE ACADEMY, KANCHIPURAM


TNPSC-TRB- COMPUTER SCIENCE -TET COACHING CENTER
HEAD OFFICE: NO. 38/23, VAIGUNDA PERUMAL KOIL,
SANNATHI STREET, KANCHIPURAM – 1. CELL: 9566535080
B.Off 2: 65C, Thillai Ngr(West), 4th Cross St, Trichy – 620018
B.Off 3: Vijiyaraghavachariar Memorial Hall(Opp to Sundar Lodge), Salem

Trichy : 76399 67359 Salem : 93602 68118

PG TRB COMPUTER SCIENCE 2020 - 21

Unit – VI -RELATIONAL DATABASE MANAGEMENT SYSTEM

in
SYLLABUS

s s.
Chapter 1: Database Management System
re
Introduction to database concepts: Relation/Table, Data, Concept of
p
ex
String Candidate Key, Alternate Key, Primary Key, Foreign Key, Data
Normalization – First, Second, Third, BCNF Normal Forms
vi

Examples of Commercially available Database Management System’s


al

(Back-End) – MySQL
.k

Examples of Front End Software’s Visual C++


w

Chapter 2: RDBMS Tools: Oracle


w

Classification of SQL Statements: DML (SELECT, INSERT, UPDATE,


w

DELETE)

SQL SELECT Statement: SQL SELECT statement, selecting all the


columns, selecting specific column, column heading default

SELECT statement continued: Limiting Rows during selection (using


WHERE clause), Logical operators, use of Logical operators
( AND/OR/NOT Operators), Logical Operator Precedence, ORDER BY
Clause, Sorting in Ascending/Descending order

Send Your Material &Question Answer Our Email ID [email protected]


www.kalviexpress.in www.kalviexpress.in
2

Functions:

SQL Functions, Types of SQL Function (Single Row/ Multiple Row),


Character Functions: UPPER(), TRIM(), SUBSTR(), ROUND(),
TRUNC(), MOD(), Working with Dates : LAST_DAY(),
MONTHS_BETWEEN(), ROUND(), Implicit and Explicit conversion
TEACHER'S CARE ACADEMY

Grouping Records:

Types of Group Functions: MAX(), MIN(),COUNT(), SUM(), AVG(),


Using AVG() and SUM() functions, Group By clause, Grouping By more

in
than one columns, Having clause

s.
Sub Queries:

s
Guidelines for using sub queries, types of sub queries (Single row and
Multiple row)
p re
Database Objects: DDL (Data Definition Language), Creating
ex

Synonyms, querying a view, modifying a view,


vi

Including constraints: UNIQUE KEY, PRIMARY KEY, FOREIGN


al

KEY
.k

Creation of Table/Relation: CREATE TABLE Statement, creating a


w

table by using a sub-query


w

Managing Existing Tables and other Database objects: The ALTER


w

TABLE Statement, adding a new column in a table, Dropping tables

www.tcaexamguide.com (95665 35080; 9786269980; 76399 67359; 93602 68118 )


Send Your Material &Question Answer Our Email ID [email protected]
www.kalviexpress.in www.kalviexpress.in
9

Chapter 1 :Database Management System


1.1.Introduction to Database Concepts

1.1.1.Basic Terminologies of DBMS

• Data : collection of raw facts or materials


• Information : Processed data or meaningful data. After data getting processed, it will have

TEACHER'S CARE ACADEMY


some meaning.
• Data item : Field Name or Column Name or Attribute Name or Domain Name. Ex: Name,
DoB, Address
• Record : Collection of data items. Example : Bio-Data

in
• File : Collection of records. Example : Bio-Data File, Payroll File
• Database: Collection of inter-related data items with less redundancy to server multiple

s.
applications. Example: Student database, Employee Database

s
• Redundancy : Repeated data or Unwanted data or Duplicate Data

re
DBMS : Applications programs or software used to provide interface between users and
databases.
p
• Table : It is a interaction of rows and columns. It is also called as Relation
ex

• Row : It is a record which contains a entire information about an entity. It is also known as
Tuple
vi

• Entity : It may be a thing or a place or a person.


al

• Column : Field Name where a single piece information has been pasted. It is also known as
.k

Domain
• Degree : The number of attributes in a relation determines the degree of relation.
w

• Cardinality: The number of tuples or rows in a relation is termed as Cardinality


w

• Simple Attribute : It can not be further sub-divided. Example : Rollno


w

• Composite Attribute: It can be further sub-divided. Example: Date. It has Day, Month and
Year
• Single Valued Attribute : It can take only one value for each entity. Example:
Account_Number
• Multivalued Attribute: It can take more one value. Example: Color
• Derived Attribute: It can be derived from another attribute. Example: Age which can be
derived from DoB
• Key Attribute : It is unique identification of a record. Ex: Primary key – Rollno, Exam-No,
Account-No

www.tcaexamguide.com (95665 35080; 9786269980; 76399 67359; 93602 68118 )


Send Your Material &Question Answer Our Email ID [email protected]
www.kalviexpress.in www.kalviexpress.in
10

1.1.2. Purpose of Database Systems

Database systems came to existence in response to early methods of computerized management


of commercial data. As an example of such methods, during 1960s, consider part of a university
organization that, among other data, keeps information about all instructors, students,
departments, and course offerings. Information was stored in operating system files. The users
TEACHER'S CARE ACADEMY

were able to manipulate the information through number of application programs which include
the following programs.

• Add new students, instructors, and courses


• Register students for courses and generate class rosters

in
• Assign grades to students, compute grade point averages (GPA), and generate transcripts

s.
System programmers wrote these application programs to meet the needs of the university. New

s
application programs are added to the system as the need arises. For example, suppose that a
p re
university decides to create a new major (say, computer science).As a result, the university creates
a new department and creates new permanent files (or adds information to existing files) to record
ex
information about all the instructors in the department, students in that major, course offerings,
degree requirements, etc. The university may have to write new application programs
vi

to deal with rules specific to the new major. New application programs may also have to be written
to handle new rules in the university. Thus, as time goes by, the system acquires more files and
al

more application programs.


.k

This typical file-processing system is supported by a conventional operating system. The system
w

stores permanent records in various files, and it needs different application programs to fetch
w

records from, and add records to, the appropriate files. Before database management systems
w

(DBMSs) came to existence, organizations usually stored information in such systems. Keeping
organizational information in a file-processing system has a number of major disadvantages:

• Data redundancy and Inconsistency

Since different programmers create the files and application programs over a long period, the
various files are likely to have different structures and the programs may be written in several
programming languages. Moreover, the same information may be duplicated in several places
(files). For example, if a student has a double major (say, music and mathematics) the address and

www.tcaexamguide.com (95665 35080; 9786269980; 76399 67359; 93602 68118 )


Send Your Material &Question Answer Our Email ID [email protected]
www.kalviexpress.in www.kalviexpress.in
11

telephone number of that student may appear in a file that consists of student records of students
in the Music department and in a file that consists of student records of students in the
Mathematics department. This redundancy leads to higher storage and access cost. In addition, it
may lead to data inconsistency; that is, the various copies of the same data may no longer agree.

For example, a changed student address may be reflected in the Music department records but not

TEACHER'S CARE ACADEMY


elsewhere in the system.

• Difficulty in Accessing Data

Suppose that one of the university clerks needs to find out the names of all students who live
within a particular postal-code area. The clerk asks the data-processing department to generate

in
such a list. Because the designers of the original system did not anticipate this request, there is no

s.
application program on hand to meet it. There is, however, an application program to generate the
list of all students. The university clerk has now two choices: either obtain the list of all students

s
and extract the needed information manually or ask a programmer to write the necessary
re
application program. Both alternatives are obviously unsatisfactory.
p
ex

Suppose that such a program is written, and that, several days later, the same clerk needs to trim
that list to include only those students who have taken at least 60 credit hours. As expected, a
vi

program to generate such a list does not exist. Again, the clerk has the preceding two options,
neither of which is satisfactory.
al
.k

The point here is that conventional file-processing environments do not allow needed data to be
retrieved in a convenient and efficient manner. More responsive data-retrieval systems are
w

required for general use.


w
w

• Data Isolation

Because data are scattered in various files, and files may be in different formats, writing new
application programs to retrieve the appropriate data is difficult.

• Integrity Problems

The data values stored in the database must satisfy certain types of consistency constraints.
Suppose the university maintains an account for each department, and records the balance amount
in each account. Suppose also that the university requires that the account balance of a department
may never fall below zero. Developers enforce these constraints in the system by adding

www.tcaexamguide.com (95665 35080; 9786269980; 76399 67359; 93602 68118 )


Send Your Material &Question Answer Our Email ID [email protected]
www.kalviexpress.in www.kalviexpress.in
144

PG-TRB 2020-21 Question Bank

Objective Question
1. Data and its relationships are represented in rows and columns, that is table which is called
____________ data model
A) Hierarchical B) Relational
TEACHER'S CARE ACADEMY

C) Network D) Object
2. The database should be in consistent state before and after the transaction which has been
made against the database. This is called __________
A) Atomicity B) Durable

in
C) Isolation D) Consistent
3. ______________ data model has tree structure for representing data and its relationships

s.
A) Hierarchical B) Logical

s
C) Network D) ER

been described ____________


p re
4. In which layer of the database abstraction, How data is going to be stored in the database has

A) Logical B) View
ex

C) Physical D) Conceptual
5. The highest level of data abstraction is _____________
vi

A) View Level B) Physical Level


al

C) Logical Level D) None of these


6. In which layer of the database abstraction, conceptual schema will be obtained ___________
.k

A) Logical level B) Physical level


w

C) Sub Schema D) View level


w

7. The technical term for the row of the table or record of the relation is __________
A) Row B) Column
w

C) Table D) Tuple
8. ______________ is the application programs or software used to provide interface between
databases and the users
A) DBMS B) DBA
C) Database D) Table
9. _______________ attribute can be further subdivided.
A) Single B) Multi-value
C) Composite D) Stored

www.tcaexamguide.com (95665 35080; 9786269980; 76399 67359; 93602 68118 )


Send Your Material &Question Answer Our Email ID [email protected]
www.kalviexpress.in www.kalviexpress.in

in
s s.
p re
ex
vi
al
.k
w
w
w

Send Your Material &Question Answer Our Email ID [email protected]


www.kalviexpress.in www.kalviexpress.in

S.No Contents Page No

Previous Year Questions & answers with Explanation i - xiv


1. Integration of User Interface and Database 2
1.1 User Interface 2
1.2 Types of User Interface 2
1.3 DBMS: Basic Concepts 3
1.3.1 Introduction 3
1.3.2 What is data? 4
1.3.3 Information 4
1.3.4 File 4
1.3.5 Database 5

in
1.3.6 Why Database 5

s.
1.3.7 Database Management System(DBMS) 6
1.3.8 Function of DBMS 6

s
1.3.9 Advantages of DBMS and disadvantage of DBMS 6
1.3.10 Database Basics
re
1.3.11 Three level architecture of DBMS
p 7
8
1.3.12 Database users 9
ex

1.3.13 Database language 9


1.3.14 Data Dictionary 10
vi

1.3.15 Database structure 10


al

1.3.16 What are Keys in DBMS? 11


1.4 Normalization 16
.k

1.5 User Interface and Database 24


w

1.6 Exercise 25
w

2. More Application Areas of Databases 32


2.1 Inventory Control 32
w

2.2 Financial Accounting 34


2.3 Fees Management System 36
2.4 Result Analysis System 38
2.5 Admission Management System 39
2.6 Income Tax Management System 41
2.7 Exercise 42
3. Advanced Program Development Methodology 43
3.1 System Development 43
3.1.1 What is Software Development Life Cycle? 43
3.1.2 Why is it important in SDLC? 43

Send Your Material &Question Answer Our Email ID [email protected]


www.kalviexpress.in www.kalviexpress.in

3.2 Life Cycle 44


3.2.1 The 7 stages of the SDLC 44
3.2.1.1 Requirement collection and Analysis 44
3.2.1.2 Feasibility Study 44
3.2.1.3 Design 44
3.2.1.4 Coding 44
TEACHER'S CARE ACADEMY

3.2.1.5 Testing 44
3.2.1.6 Installation/Deployment 46
3.2.1.7 Maintenance 46
3.3 The 5 best Software Development Processes (and how to pick 46
the right one for you)

in
3.3.1 Waterfall 46

s.
3.3.2 Agile and Scrum 47
3.3.3 Incremental and Iterative 48

s
3.3.4 V-Shaped 49
3.3.5
3.4 Testing
Spiral
p re 50
51
ex

3.4.1 Introduction 51
3.4.2 Principles of Testing 51
vi

3.4.3 Types of Testing 51


3.4.3.1 Unit Testing 51
al

3.4.3.2 Integration Testing 52


.k

3.4.3.2.1 Verification 52
w

3.4.3.2.2 Validation 52
3.4.3.2.3 Black Box Testing 53
w

3.4.3.2.4 While Box Testing 53


w

3.4.3.3 Regression Testing 53


3.4.3.4 Smoke Testing 53
3.4.3.5 Alpha Testing 54
3.4.3.6 Beta Testing 54
3.4.3.7 System Testing 54
3.4.3.8 Stress Testing 54
3.4.3.9 Performance Testing 54
3.4.3.10 Object Oriented Testing 55
3.5 Exercise

www.tcaexamguide.com (95665 35080; 9786269980; 76399 67359; 93602 68118 )


Send Your Material &Question Answer Our Email ID [email protected]
www.kalviexpress.in www.kalviexpress.in

4. Data Model 60
60
4.1 ER Model 60
4.1.1 Types of data model 60
4.1.2 What is ER Diagram 61
4.1.3 What is ER Model 61

TEACHER'S CARE ACADEMY


4.1.4 History of ER models 61
4.1.5 Why use ER Diagrams? 62
4.1.6 ER Diagrams Symbols & Notations 62
4.1.7 Components of the ER Diagram 63
4.1.8 What Is Entity? 65

in
4.2 Attributes 66

s.
4.2.1 Types of Attributes 66
4.3 Relationship 67

s
4.3.1 One to One 67
4.3.2
4.3.3
One to Many
Many to One
p re 68
68
ex
4.3.4 Many to Many 70
4.4 Summary 71
vi

4.5 Exercise
al

5. SQL Statement 74
.k

5.1 What is SQL 74


5.2 Why Use SQL? 74
w

5.3 Types of SQL 74


w

5.4 What is DDL? 74


w

5.5 What is DML? 76


5.6 What is DCL? 77
5.7 What is TCL? 78
5.8 What is DQL? 78
5.9 MySQL Aggregate Functions Tutorial: SUM, AVG, MAX,
MIN, COUNT, DISTINCT 79
SQL Join 82
5.10 Summary 88
5.11 Exercise 89

www.tcaexamguide.com (95665 35080; 9786269980; 76399 67359; 93602 68118 )


Send Your Material &Question Answer Our Email ID [email protected]
www.kalviexpress.in www.kalviexpress.in

6. Data Dictionary 93
6.1 Definition 93
6.2 Active and passive data dictionary 93
6.3 Elements of Data Dictionary 94
6.4 Extended data dictionary 95
6.5 Functions of Data Dictionary 95
TEACHER'S CARE ACADEMY

6.6 Forms of Data Dictionary 96


6.7 Summary 98
6.8 Exercise 98
7. Data Warehouse 99
7.1 Introduction 99

in
7.2 Data Warehouse Models 101

s.
7.3 OLAP Analytical Operations 101
7.4 Types of OLAP 104

s
7.5 Exercise 105
8. Data Mining
p
8.1 Fundamentals of data mining
re 106
106
ex

8.2 The Data Mining Process 107


8.3 Data Mining Applications 108
vi

8.4 Data Mining Techniques 108


al

8.5 Data pre-processing 109


8.6 Support and confidence 111
.k

8.7 Task and A Naïve Algorithm 112


w

8.8 Association Rules Mining: Apriori Algorithm 115


8.9 Classification 118
w

8.10 Decision Tree 120


w

8.11 Naïve Bayes Method 121


8.12 Cluster Analysis 125
8.13 Types of Data 127
8.14 Computing Distance 127
8.15 Types of Cluster Analysis 128
8.16 K means Method 133
8.17 Exercise 137
9. Practice Questions 139

www.tcaexamguide.com (95665 35080; 9786269980; 76399 67359; 93602 68118 )


Send Your Material &Question Answer Our Email ID [email protected]
www.kalviexpress.in www.kalviexpress.in

TEACHER’S CARE ACADEMY, KANCHIPURAM


TNPSC-TRB- COMPUTER SCIENCE -TET COACHING CENTER
HEAD OFFICE: NO. 38/23, VAIGUNDA PERUMAL KOIL,
SANNATHI STREET, KANCHIPURAM – 1. CELL: 9566535080
B.Off 2: 65C, Thillai Ngr(West), 4th Cross St, Trichy – 620018
B.Off 3: Vijiyaraghavachariar Memorial Hall(Opp to Sundar Lodge), Salem

Trichy : 76399 67359 Salem : 93602 68118

PG TRB COMPUTER SCIENCE 2020 - 21

UNIT – VII

in
BUSINESS COMPUTING

s s.
SYLLABUS

Integration of User Interface and Database;


p re
ex

More application areas of Databases;


vi

Inventory control, Financial Accounting, Fees


al

Management System, Result Analysis System, Admission


Management System, Income Tax Management System;
.k
w

Advance Program Development Methodology: System


w

Development
w

Life cycle, Data Models (Entity Relationship Model),


Attributes (single, Composite and Multi – valued),
Relationship (One-to-One, One-to-Many and Many-to-
Many SQL Statements

Data Dictionary, Data Warehousing, Data Mining.

www.tcaexamguide.com (95665 35080; 9786269980; 76399 67359; 93602 68118 )


Send Your Material &Question Answer Our Email ID [email protected]
www.kalviexpress.in www.kalviexpress.in
2

1.Integration of User Interface and Database


1.1 User Interface
The user interface (UI) is the point of human-computer interaction and communication in
a device. This can include display screens, keyboards, a mouse and the appearance of a desktop.
It is also the way through which a user interacts with an application or a website.
1.2 Types of User Interface:
TEACHER'S CARE ACADEMY

• Command Line Interface: Allows the user to interact with the computer by typing in
commands. The computer displays a prompt, the user keys in the command and presses
enter or return.

in
s.
• Form-based user interface: Used to enter data into a program or application by offering

s
re
a limited selection of choices. For example, a settings menu on a device is form-based.
p
ex
vi
al
.k
w

• Graphical user interface:A GUI (graphical user interface) is a system of interactive


w

visual components for computer software. A GUI displays objects that convey
w

information, and represent actions that can be taken by the user. The objects change color,
size, or visibility when the user interacts with them.

www.tcaexamguide.com (95665 35080; 9786269980; 76399 67359; 93602 68118 )


Send Your Material &Question Answer Our Email ID [email protected]
www.kalviexpress.in www.kalviexpress.in
3

• Menu-driven user interface: A UI that uses a list of choices to navigate within a program
or website. For example, ATMs use menu-driven UIs and are easy for anyone to use.

TEACHER'S CARE ACADEMY


in
• Touch user interface: User interface through haptics or touch. Most smart phones, tablets
and any device that operates using a touch screen use haptic input.

s s.
p re
ex
vi
al

• Voice user interface: Interactions between humans and machines using auditory
commands. Examples include virtual assistant devices, talk-to-text, GPS and much more.
.k
w
w
w

1.3 DBMS: Basic Concepts


1.3.1 Introduction:
In computerized information system data is the basic resource of the organization.
So, proper organization and management for data is required for organization to run
smoothly.

www.tcaexamguide.com (95665 35080; 9786269980; 76399 67359; 93602 68118 )


Send Your Material &Question Answer Our Email ID [email protected]
www.kalviexpress.in www.kalviexpress.in
4

Database management system deals the knowledge of how data stored and
managed on a computerized information system.
In any organization, it requires accurate and reliable data for better decision
making, ensuring privacy of data and controlling data efficiently.
Examples:
1. Deposit and/or Withdrawal from a bank
TEACHER'S CARE ACADEMY

2. Hotel, Airline or Railway reservation


3. Purchase items from supermarkets in all cases, a database is accessed.

1.3.2 What is data?


• Data is the known facts or figures that have implicit meaning.

in
• Unprocessed value or raw fact is known as Data.

s.
Data can be represented:

s
1. Alphabets: (A-Z,a-z)
2. Digits (0-9) and
3. Special characters(+,-.#,$,etc)
e.g : 25, “raj”etc.
p re
ex

1.3.3 Information:
vi

Information is the processed data on which decisions and actions are based. Information
al

can be defined as the organized and classified data to provide meaningful values.
Eg: “The age of Ravi is 25”
.k
w

1.3.4File:
File is a collection of related data stored in secondary memory.
w
w

File Oriented approach:


The traditional file oriented approach to information processing has for each application
a separate master file and its own set of personal file. In file oriented approach the program
dependent on the files and files become dependent on the files and files become
dependents upon the programs
Disadvantages of file oriented approach:
1. Data redundancy and inconsistency: The same information may be written in several
files.
2. Difficulty in accessing data: The conventional file processing system do not allow
data to retrieved in a convenient and efficient manner according to user choice.
www.tcaexamguide.com (95665 35080; 9786269980; 76399 67359; 93602 68118 )
Send Your Material &Question Answer Our Email ID [email protected]
www.kalviexpress.in www.kalviexpress.in
139

BUSINESS COMPUTING

Data Mining and warehousing


1: Which of the following applied on warehouse?
A) write only B) read only
C) both A & B D) none of these

TEACHER'S CARE ACADEMY


2: Data can be store , retrive and updated in …
A) SMTOP B) OLTP
C) FTP D) OLAP
3: Which of the following is a good alternative to the star schema?

in
A) snow flake schema B) star schema
C) star snow flake schema D) fact constellation

s.
4: Patterns that can be discovered from a given database are which type…

s
A) More than one type B) Multiple type always
C) One type only
5: Background knowledge is…
A) It is a form of automatic learning.
p re
D) No specific type
ex

B) A neural network that makes use of a hidden layer


C) The additional acquaintance used by a learning algorithm to facilitate the learning
vi

process
al

D) None of these
6: Which of the following is true for Classification?
.k

A) A subdivision of a set
w

B) A measure of the accuracy


C) The task of assigning a classification
w

D) All of these
w

7: Data mining is?


A) time variant non-volatile collection of data
B) The actual discovery phase of a knowledge
C) The stage of selecting the right data
D) None of these
8: ——- is not a data mining functionality?
A) Clustering and Analysis
B) Selection and interpretation
C) Classification and regression
D) Characterization and Discrimination
www.tcaexamguide.com (95665 35080; 9786269980; 76399 67359; 93602 68118 )
Send Your Material &Question Answer Our Email ID [email protected]
www.kalviexpress.in www.kalviexpress.in

in
s s.
p re
ex
vi
al
.k
w
w
w

Send Your Material &Question Answer Our Email ID [email protected]


www.kalviexpress.in www.kalviexpress.in

CONTENTS

SYLLABUS 1
PREVIOUS QUESTIONS – SET-I 2
PREVIOUS QUESTIONS – SET-II 4
CHAPTER-I HTML/DHTML
1.1 Introduction 6
1.2 Objectives 7

in
1.3 Introduction to Universal Resource Identifier (URI) 8
1.4 Basic Tags of HTML 10

s.
1.4.1 HTML 11

s
1.4.2 HEAD 11
1.4.3 TITLE
1.4.4 BODY
p re 11
12
ex

1.4.5 Commonly Used Tags 13


1.4.6 Header Section 17
vi

1.4.7 Colorful Webpage 18


al

1.4.8 Comment Lines 18


1.4.9 Text Formatting 19
.k

1.4.10 Emphasizing material in a Webpage 22


w

1.4.11 Text Styles 22


w

Possible Questions 25
w

CHAPTER – II LISTS
2.1 Ordered List OL (L1, Type-1, I, A, a: START, VALUE) 28
2.2 Unordered List-UL (Bullet Type-Disc, Circle, Square) 30
2.5 Description List or Definition List(DL, DT, DD) 31
2.4 Nested List 32
2.5 Web Page Authorizing Using HTML 33
Possible Questions 36

Send Your Material &Question Answer Our Email ID [email protected]


www.kalviexpress.in www.kalviexpress.in

CHAPTER – III TABLES AND FRAMES


3.1 Creating Tables 39
3.1.1 Border 40
3.1.2 WIDTH 40
3.1.3 CAPTION 42
3.1.4 ALIGN 43
3.1.5 Cell Spanning 44
3.1.6 Coloring cells 46

in
3.1.7 Column specification 47

s.
3.2 Frames 50
3.2.1 Frameset 50

s
3.2.2 Frame tag
3.2.3 Height and Width
p re 51
51
3.2.4 Frameborder 52
ex

3.2.5 Frames inside other Frame 54


vi

3.2.6 Noframes tag 55


al

Possible Questions 57
.k

CHAPTER- IV FORMS
4.1 Definition 61
w

4.2 MS-Access 62
w

4.3 ORACLE 64
w

4.3.1 Oracle Database Features 66


4.3.2 Oracle Database Editions 67
4.4 Form Tags 67
4.4.1 METHOD Attribute 68
4.5 Document Object Model 79
Possible Questions 83

Send Your Material &Question Answer Our Email ID [email protected]


www.kalviexpress.in www.kalviexpress.in

CHAPTER – V ACTIVE SERVER PAGES (ASP)


5.1 Concept of ASP 86
5.1.1 How does it work? 87
5.1.2 ASP Objects 88
5.2 Features of ASP 88
5.3 Your first ASP page 89
5.4 Variables 92
5.4.1 Declaring Variables 93

in
5.4.2 Naming Variables 93

s.
5.4.3 Assigning values to variables 94
5.4.4 Declaring variables using Option Explicit 95

s
Possible Questions
CHAPTER – VI FUNCTIONS
p re 96

6.1 String Manipulation Functions 98


ex

6.1.1 InStr() 98
vi

6.1.2 Left() 98
al

6.1.3 Right() 99
.k

6.1.4 Mid() 99
6.1.5 Trim, LTrim() and RTrim() 99
w

6.1.6 LCase() and UCase() 100


w

6.1.7 Len() 100


w

6.1.8 String() 101


6.2 Time & Date Functions 101
Possible Questions 103
CHAPTER – VII ARRAYS AND POCEDURES
7.1 Arrays 104
7.2 Array declaration – Static array 105

Send Your Material &Question Answer Our Email ID [email protected]


www.kalviexpress.in www.kalviexpress.in

7.2.1 Dynamic arrays 106


7.3 1-Dimensional array 106
7.4 2-Dimensional arrays 109
7.5 Procedures and Functions 110
7.6 Functions 111
7.6.1 Parameters 112
Possible Questions 123
CHAPTER – VIII DATABASE CONNECTION

in
8.1 Connecting with Database 124
8.2 Creation of DSN 126

s.
8.3 OLEDB Connection 134

s
Possible Questions 135
Glossaries for HTML
p re 137
Glossaries for ASP 142
ex

PRACTICE QUESTIONS 168


vi
al
.k
w
w
w

Send Your Material &Question Answer Our Email ID [email protected]


www.kalviexpress.in www.kalviexpress.in

TEACHER’S CARE ACADEMY, KANCHIPURAM


TNPSC-TRB- COMPUTER SCIENCE -TET COACHING CENTER
HEAD OFFICE: NO. 38/23, VAIGUNDA PERUMAL KOIL,
SANNATHI STREET, KANCHIPURAM – 1. CELL: 9566535080
B.Off 2: 65C, Thillai Ngr(West), 4th Cross St, Trichy – 620018
B.Off 3: Vijiyaraghavachariar Memorial Hall(Opp to Sundar Lodge), Salem

Trichy : 76399 67359 Salem : 93602 68118

PG TRB COMPUTER SCIENCE 2020 - 21


UNIT VIII – WEB DEVELOPMENT

in
SYLLABUS (Marks -10)

s.
WEB DEVEOLOPMENT

s
HTML/DHTML

re
Introduction, Objectives, Introduction to Universal Resource Identifier (URI)
Basic Tags of HTML; HTML, HEAD, TITLE, BODY, Ordered List- OL
p
(L1, Type-1, l, A, a: START VALUE), Unordered List-UL (Bullet Type – Disc,
ex

Circle, Square, DL, DT, DD), Web Page Authoring Using HTML
Tables: Creating Tables, Border, WIDTH, CAPTION, ALIGN
vi

Frames: Frameborder, height and width


al

Forms: Definition, MS-Access or Oracle


.k

Form Tags: FORM, METHOD, Document Object Model


Active Server Pages (ASP)
w

Active Server Pages (ASP): Concept of ASP, features of ASP,


w

Variables: Explicit and Implicit Declaration:


w

Functions:
String Manipulation Functions: Ucase (), Lcase (), Len (), Left (), Right (), Mid
(), Ltrim (), InStr ()
Time & Date Functions: Date (), Day (), Hour (), Left (), Len (), Minute (),
Month (), Monthname (), Now (),
Arrays: Declaration and use of 1 dimensional and 2 dimensional arrays;
Procedures and Functions, Passing parameters/ arguments;
Connecting with Databases: Creation of DSN, using OLEDB

Send Your Material &Question Answer Our Email ID [email protected]


www.kalviexpress.in www.kalviexpress.in
6

CHAPTER - 1
INTRODUCTION AND BASIC TAGS OF HTML
1.1 INTRODUCTION
HTML stands for HyperText Markup Language. HTML provides a way of displaying
Web pages with text and images or multimedia content.
HTML is not a programming language, but a markup language. An HTML file is a text
TEACHER'S CARE ACADEMY

file containing small markup tags. The markup tags tell the Web browser, such as
Internet Explorer or Netscape Navigator, how to display the page.
An HTML file must have an .htm or .html file extension. These files are stored on the
web server. So if you want to see the web page of a company, you should enter the URL
(Uniform Resource Locator), which is the web site address of the company in the address

in
bar of the browser. This sends a request to the web server, which in turn responds by

s.
returning the desired web page. The browser then renders the web page and you see it on
your computer.

s
re
HTML allows Web page publishers to create complex pages of text and images that can
be viewed by anyone on the Web, regardless of what kind of computer or browser is
p
being used. Despite what you might have heard, you don’t need any special software to
ex

create an HTML page; all you need is a word processor (such as Microsoft Word) and a
working knowledge of HTML.
vi

Fortunately, the basics of HTML are easy to master. However, you can greatly relieve
al

tedium and improve your productivity by using a good tool. A simple tool is Microsoft
FrontPage that reduces the need to remember and type in HTML tags. Still, there can
.k

always be situations where you are forced to handcode certain parts of the web page.
w

HTML is just a series of tags that are integrated into a document that can have text,
images or multimedia content.
w

HTML tags are usually English words (such as blockquote) or abbreviations (such as p
w

for paragraph), but they are distinguished from the regular text because they are placed in
small angle brackets.
So the paragraph tag is <p>, and the blockquote tag is <blockquote>. Some tags dictate
how the page will be formatted (for instance, <p> begins a new paragraph), and others
dictate how the words appear (<b> makes text bold).
Still others provide information - such as the title - that doesn’t appear on the page itself.
The first thing to remember about tags is that they travel in pairs. Most of the time that
you use a tag - say <blockquote> - you must also close it with another tag - in this case,
</blockquote>. Note the slash - / - before the word “blockquote”; that is what
distinguishes a closing tag from an opening tag.
www.tcaexamguide.com (9566535080; 9786269980; 76399 67359; 93602 68118 )
Send Your Material &Question Answer Our Email ID [email protected]
www.kalviexpress.in www.kalviexpress.in
7

The basic HTML page begins with the tag <html> and ends with </html>. In between,
the file has two sections - the header and the body.
The header - enclosed by the <head> and </head> tags - contains information about a
page that will not appear on the page itself, such as the title. The body - enclosed by
<body> and </body> - is where the action is. Everything that appears on the page is
contained within these tags.

TEACHER'S CARE ACADEMY


HTML pages are of two types:
1. Static
2. Dynamic
Static Pages
Static pages, as the name indicates, comprise static content (text or images). So you can

in
only see the contents of a web page without being able to have any interaction with it.

s.
Dynamic Pages
Dynamic pages are those where the content of the web page depend on user input. So

s
re
interaction with the user is required in order to display the web page.
For example, consider a web page which requires a number to be entered from the user
p
in order to find out if it is even or odd. When the user enters the number and clicks on the
ex

appropriate button, the number is sent to the web server, which in turn returns the result
to the user in an HTML page.
vi
al

1.2 OBJECTIVES OF HTML


Recognize the components of an HTML file and create such a file
.k

Link to local files and Web pages from their Web pages.
w

Add graphics and sound to their Web pages using HTML.


Create different kinds of lists to their Web page using HTML.
w

Create a multi-column and multi-row tables using HTML.


w

Set background colors and graphics for Web pages.


Evaluate Web page design and consider design issues that affect web pages.
Add links to sites from their Web pages.
Tailor web design and development to Interlink Environment.

HTML is the lingua franca of the Internet. Publishing HTML-formatted documents on


the Internet via the World Wide Web proved to be the answer to these needs.

HTML is a subset of the Standard Generalized Markup Language (SGML). SGML is an


international standard (ISO 8879) published in 1986 as a format for structuring and
marking up documents.

www.tcaexamguide.com (95665 35080; 9786269980; 76399 67359; 93602 68118 )


Send Your Material &Question Answer Our Email ID [email protected]
www.kalviexpress.in www.kalviexpress.in
8

HTML adopts a simplified set of SGML's structural, semantic, and formatting tags,
keeping the emphasis on the content rather than on the document itself. An important
addition to HTML was the inclusion of support for hypertext, which enabled authors to
define a semantic network of linked information.

FEATURES OF HTML
1) It is a very easy and simple language. It can be easily understood and modified.
TEACHER'S CARE ACADEMY

2) It is very easy to make an effective presentation with HTML because it has a lot of
formatting tags.
3) It is a markup language, so it provides a flexible way to design web pages along with the
text.
4) It facilitates programmers to add a link on the web pages (by html anchor tag), so it

in
enhances the interest of browsing of the user.

s.
5) It is platform-independent because it can be displayed on any platform like Windows,

s
Linux, and Macintosh, etc.

which makes it more attractive and interactive.


p re
6) It facilitates the programmer to add Graphics, Videos, and Sound to the web pages

7) HTML is a case-insensitive language, which means we can use tags either in lower-case
ex

or upper-case.
vi

1.3 INTRODUCTION TO UNIVERSAL RESOURCE IDENTIFIER (URI)


al

A URI (Uniform Resource Identifier) is a sequence of characters that identifies a logical


or physical resource. Universal Resource Identifiers are specified in the Internet
.k

Engineering Task Force (IETF) Request for Comments (RFC) 3986 and are summarized
w

and extended in documentation for the W3C’s Web Architecture, Architecture of the
World Wide Web, Volume 1. According to the specifications, resources do not have to
w

be accessible on the Internet.


w

Examples of resources include electronic documents, elevator door sensors, XML


namespaces, web pages and ID microchips for pets.
There are two types of URIs, Uniform Resource Locators (URLs) and Uniform Resource
Names (URNs).
1. Uniform Resource Locator (URL) – this type of URI begins by stating which protocol
should be used to locate and access the physical or logical resource on a network. If the
resource is a web page, for example, the URI will begin with the protocol HTTP. If the
resource is a file, the URI will begin with the protocol FTP or if the resource is an email
address, the URI will begin with the protocol mailto. It is important to remember that

www.tcaexamguide.com (9566535080; 9786269980; 76399 67359; 93602 68118 )


Send Your Material &Question Answer Our Email ID [email protected]
www.kalviexpress.in www.kalviexpress.in
168

PG TRB COMPUTER SCIENCE 2020 - 21


PRACTICE QUESTIONS

1. Which tag tells the browser where the page starts and stops?
A) <html> B) <body>
C) <head> D) <title>
TEACHER'S CARE ACADEMY

2. All HTML documents will be basically


A) Graphs B) Text
C) Pictures D) None of the above

in
3. Which one of the following is always used to enclosed HTML tags?

s.
A) {} B) []

s
C) < > D) ()

re
4. Which one of the following is used to represent a closing tag or end tag?
p
A) / B) \
ex

C) & D) #
vi

5. Which one of the following is ignored by the browses?


al

A) Tags B) Attributes
C) Comments D) Head section
.k
w

6. Which o the following tag is used to provide a name to a web document?


w

A) <html> B) <body>
C) <head> D) <title>
w

7. Which one of the following tag is not visible in the browser?


A) <html> B) <body>
C) <meta> D) <title>

8. Which section is used for text and tags that are shown directly on your web page?
A) Head B) Meta
C) Body D) title

www.tcaexamguide.com (9566535080; 9786269980; 76399 67359; 93602 68118 )


Send Your Material &Question Answer Our Email ID [email protected]
www.kalviexpress.in www.kalviexpress.in

in
s s.
p re
ex
vi
al
.k
w
w
w

Send Your Material &Question Answer Our Email ID [email protected]


www.kalviexpress.in www.kalviexpress.in

Index
CONTENTS Page No.

Syllabus 1
Previous Year Questions with Explanation 2
1. Java Script 7
1.1 Introduction 7
1.2 What is JavaScript 7
1.3 Features of JavaScript 7
1.4 History of JavaScript 8
1.5 Application of JavaScript 8
1.6 JavaScript Comment 8

in
1.7 JavaScript Variable 10

s.
1.8 Javascript Data Types 12
1.9 JavaScript Operators 15

s
1.9.1JavaScript Arithmetic Operators 15
1.9.2 JavaScript Comparison Operators
p
1.9.3 JavaScript Bitwise Operators
re 15
16
ex
1.9.4 JavaScript Logical Operators 16
1.9.5 JavaScript Assignment Operators 16
vi

1.9.6 JavaScript Special Operators 16


1.10 JavaScript If-else 19
al

1.10.1 JavaScript If statement 19


.k

1.10.2 JavaScript If...else Statement 20


1.10.3 JavaScript If...else if statement 20
w

1.11 JavaScript Switch 21


w

1.12 JavaScript Loops 25


1.12.1 JavaScript For loop 25
w

1.12.2 JavaScript while loop 25


1.12.3 JavaScript do while loop 26
1.13 JavaScript Functions 27
1.14 JavaScript Events 30
1.15 JavaScript addEventListener() 33
1.16 JavaScript onclick event 35
1.17 JavaScript dblclick event 36
1.18 JavaScript onload 37
1.19 JavaScript onresize event 39
1.20 External JavaScript file 40

Send Your Material &Question Answer Our Email ID [email protected]


www.kalviexpress.in www.kalviexpress.in

CONTENTS Page No.

2. MULTIMEDIA AND AUTHORING TOOLS 44


2.1 Definition of Multimedia 44
2.2 Components of Multimedia 45
2.3 Applications of Multimedia 46
2.4 Features of Authoring Tools 49
2.5 Authoring Tools Classification 50
2.5.1 Card or Page based authoring tools 50
2.5.2 Icon based or Event driven authoring tools 51

in
2.5.3 Time based authoring tools 2
2.5.4 Object-Oriented authoring tools: 53

s.
3. Image formats 55
4. Image scanning with the help of scanner 59

s
5. Animation, Morphing and Applications 68

6.1 Image Handling


p re
6. Graphic Tools: Image Editing Software (Photoshop / CorelDraw) 68
68
ex

6.2 To resize an image in Photoshop 70


7. Concepts of Multimedia: 83
vi

7.1 Types of Multimedia 84


7.2 Multimedia Software Development Tools 84
al

8. RECORDING SOUND USING SOUND RECORDER (CAPTURE) 85


.k

8.1 Voice Recognition Software Philips/Dragon 86


8.2 MIDI (Musical Instrument Digital Interface) 88
w

9. Movie File Formats: AVI, MPEG 89


w

9.1 Movie Frames: Concepts of Frame, Frame Buffer 92


10. Multimedia Authoring using Macromedia Flash 96
w

10.1 Making of simple Flash movie 100


Practice Test Questions 108

Send Your Material &Question Answer Our Email ID [email protected]


www.kalviexpress.in www.kalviexpress.in

TEACHER’S CARE ACADEMY, KANCHIPURAM


TNPSC-TRB- COMPUTER SCIENCE -TET COACHING CENTER
HEAD OFFICE: NO. 38/23, VAIGUNDA PERUMAL KOIL,
SANNATHI STREET, KANCHIPURAM – 1. CELL: 9566535080
B.Off 2: 65C, Thillai Ngr(West), 4th Cross St, Trichy – 620018
B.Off 3: Vijiyaraghavachariar Memorial Hall(Opp to Sundar Lodge), Salem

Trichy : 76399 67359 Salem : 93602 68118

PG TRB COMPUTER SCIENCE 2020 - 21

UNIT – IX - WEB SCRIPTING

in
s.
SYLLABUS

s
Java script
Event handling, adding java script in an HTML page
Multimedia and authoring tools
p re
ex
Image Formats
TIFF, BMP, JPG/JPEG, GIF, IC, PDF, PSG:
vi

Image scanning with the help of scanner: Setting up resolution, size, file Formats of
images; Image preview
al

Significance of PDF-creation, modification; Animation, Morphing and Applications


Graphic Tools: Image Editing Software (Photoshop / CorelDraw)
.k

Image Handling: Cropping an image, adjusting image size, saving an image;


w

Layers: Adding layers, dragging and pasting selections on to layers, moving and
copying layers, duplicating layers, deleting layers, merging layers. Opacity.
w

Concept of multimedia: Picture/ Graphics, Audio, Video;


w

Sound: Recording sound using sound recorder (capture), Sound editing, Effect
enhancement;
Voice Recognition software Philips / Dragon, MIDI player, sound recorder.
Sound Quality: Radio Quality,
1. Movie File Formats: AVI, MPEG.
Movie Frames: Concept of Frame, Frame Buffer;
2. Multimedia authoring using macromedia flash
Making of simple flash movie.

Send Your Material &Question Answer Our Email ID [email protected]


www.kalviexpress.in www.kalviexpress.in
7

WEB SCRIPTING

1. Java Script
1.1 Introduction
TEACHER'S CARE ACADEMY

JavaScript is an object-based scripting language which is lightweight and cross-platform.

JavaScript is not a compiled language, but it is a translated language. The JavaScript


Translator (embedded in the browser) is responsible for translating the JavaScript code for the
web browser.

in
1.2 What is JavaScript

s.
JavaScript (js) is a light-weight object-oriented programming language which is used by

s
several websites for scripting the webpages. It is an interpreted, full-fledged programming
p re
language that enables dynamic interactivity on websites when applied to an HTML document.
It was introduced in the year 1995 for adding programs to the webpages in the Netscape
Navigator browser. Since then, it has been adopted by all other graphical web browsers. With
ex

JavaScript, users can build modern web applications to interact directly without reloading the
vi

page every time. The traditional website uses js to provide several forms of interactivity and
simplicity.
al

Although, JavaScript has no connectivity with Java programming language. The name was
.k

suggested and provided in the times when Java was gaining popularity in the market. In
w

addition to web browsers, databases such as CouchDB and MongoDB uses JavaScript as their
scripting and query language.
w

1.3 Features of JavaScript


w

There are following features of JavaScript:


1. All popular web browsers support JavaScript as they provide built-in execution
environments.
2. JavaScript follows the syntax and structure of the C programming language. Thus, it is
a structured programming language.
3. JavaScript is a weakly typed language, where certain types are implicitly cast
(depending on the operation).
4. JavaScript is an object-oriented programming language that uses prototypes rather
than using classes for inheritance.
5. It is a light-weighted and interpreted language.

www.tcaexamguide.com (95665 35080; 9786269980; 76399 67359; 93602 68118 )


Send Your Material &Question Answer Our Email ID [email protected]
www.kalviexpress.in www.kalviexpress.in
8

6. It is a case-sensitive language.
7. JavaScript is supportable in several operating systems including, Windows, macOS,
etc.
8. It provides good control to the users over the web browsers.

1.4 History of JavaScript

TEACHER'S CARE ACADEMY


In 1993, Mosaic, the first popular web browser, came into existence. In the year
1994, Netscape was founded by Marc Andreessen. He realized that the web needed to
become more dynamic. Thus, a 'glue language' was believed to be provided to HTML to make
web designing easy for designers and part-time programmers. Consequently, in 1995, the

in
company recruited Brendan Eich intending to implement and embed Scheme programming
language to the browser. But, before Brendan could start, the company merged with Sun

s.
Microsystems for adding Java into its Navigator so that it could compete with Microsoft over

s
the web technologies and platforms. Now, two languages were there: Java and the scripting

re
language. Further, Netscape decided to give a similar name to the scripting language as Java's.
It led to 'Javascript'. Finally, in May 1995, Marc Andreessen coined the first code of
p
Javascript named 'Mocha'. Later, the marketing team replaced the name with 'LiveScript'.
ex

But, due to trademark reasons and certain other reasons, in December 1995, the language was
finally renamed to 'JavaScript'. From then, JavaScript came into existence.
vi
al

1.5 Application of JavaScript


.k

JavaScript is used to create interactive websites. It is mainly used for:


o Client-side validation,
w

o Dynamic drop-down menus,


w

o Displaying date and time,


w

o Displaying pop-up windows and dialog boxes (like an alert dialog box, confirm dialog
box and prompt dialog box),
o Displaying clocks etc.

1.6 JavaScript Comment


The JavaScript comments are meaningful way to deliver message. It is used to add information
about the code, warnings or suggestions so that end user can easily interpret the code.
The JavaScript comment is ignored by the JavaScript engine i.e. embedded in the browser.

Advantages of JavaScript comments:

www.tcaexamguide.com (95665 35080; 9786269980; 76399 67359; 93602 68118 )


Send Your Material &Question Answer Our Email ID [email protected]
www.kalviexpress.in www.kalviexpress.in
9

There are mainly two advantages of JavaScript comments.

 To make code easy to understand It can be used to elaborate the code so that end user can
easily understand the code.
 To avoid the unnecessary code It can also be used to avoid the code being executed.
Sometimes, we add the code to perform some action. But after sometime, there may be
need to disable the code. In such case, it is better to use comments.
TEACHER'S CARE ACADEMY

Types of JavaScript Comments:

There are two types of comments in JavaScript.


1. Single-line Comment
2. Multi-line Comment

in
JavaScript Single line Comment

s.
It is represented by double forward slashes (//). It can be used before and after the statement.

s
Let’s see the example of single-line comment i.e. added before the statement.
<script>
// It is single line comment
p re
document.write("hello javascript");
ex

</script>
Let’s see the example of single-line comment i.e. added after the statement.
vi

<script>
al

var a=10;
.k

var b=20;
w

var c=a+b;//It adds values of a and b variable


document.write(c);//prints sum of 10 and 20
w

</script>
w

JavaScript Multi line Comment

It can be used to add single as well as multi line comments. So, it is more convenient.
It is represented by forward slash with asterisk then asterisk with forward slash. For example:
/* your code here */
It can be used before, after and middle of the statement.
<script>
/* It is multi line comment.
It will not be displayed */
document.write("example of javascript multiline comment");
</script>
www.tcaexamguide.com (95665 35080; 9786269980; 76399 67359; 93602 68118 )
Send Your Material &Question Answer Our Email ID [email protected]
www.kalviexpress.in www.kalviexpress.in
108

PG TRB COMPUTER SCIENCE 2020 - 21


PRACTICE QUESTIONS
1. Which of the following is not considered as an error in JavaScript?
A) Syntax error
B) Missing of semicolons
C) Division by zero
D) Missing of Bracket

2. What will be the output of the following JavaScript code?

function compare()
{

in
int a=1;

s.
char b=1;

s
if(A)tostring()===B)
returntrue;
else
returnfalse;
p re
ex

}
A) true
vi

B) false
al

C) runtime error
D) logical error
.k

3. The expression of calling (or executing) a function or method in JavaScript is called _______
w

A) Primary expression
w

B) Functional expression
C) Invocation expression
w

D) Property Access Expression

4. What will be the output of the following JavaScript code?

<p id="demo"></p>
<script>
function myFunction()
{
document.getElementById("demo").innerHTML=Math.cbrt(125);
}
</script>

Send Your Material &Question Answer Our Email ID [email protected]


www.kalviexpress.in www.kalviexpress.in
109

A) 125
B) 25
C) 5
D) Error

5. What will be the output of the following JavaScript code?


TEACHER'S CARE ACADEMY

var o = new F();

o.constructor === F

A) false

in
B) true

s.
C) 0

s
D) 1

6. The meaning for Augmenting classes is that ___________


p re
A) objects inherit prototype properties even in a dynamic state
ex

B) objects inherit prototype properties only in a dynamic state


C) objects inherit prototype properties in the static state
vi

D) object doesn’t inherit prototype properties in the static state


al
.k

7. Which of the following function of Boolean object returns a string containing the source of
w

the Boolean object?


A - toSource()
w

B - valueOf()
w

C - toString()
D - None of the above.

8. What will be the output of the following JavaScript code?


document.writeln("<br/>navigator.language: "+navigator.language);
A) Broswer name
B) Browser language
C) Browser version
D) Error

www.tcaexamguide.com (95665 35080; 9786269980; 76399 67359; 93602 68118 )


Send Your Material &Question Answer Our Email ID [email protected]
www.kalviexpress.in www.kalviexpress.in

in
s s.
p re
ex
vi
al
.k
w
w
w

Send Your Material &Question Answer Our Email ID [email protected]


www.kalviexpress.in www.kalviexpress.in
TABLE OF CONTENT

Chapter
Chapter Name Page No.
No.
Sullabus 1
Previous year questions (set-1) 2

Previous year questions (set-2) 9


1. Introduction 16
1.1 Communication System 16
1.1.1 Signal 16
1.1.2 Bit Rate and Baud Rate 21
1.1.3 Communication Mode 22

in
1.1.4 Way of Communication 22

s.
1.1.5 Delays in Computer Network 24
1.1.6 Communication Channel 27

s
1.1.7 Bandwidth, and Data Transfer Rate 28
1.1.8
1.1.9
Frequency
p re
Circuit Switching, Packet Switching
33
35
ex

1.2 Network Definition 37


1.2.1 Uses Of Computer Network 37
vi

1.2.2 Peer-to-Peer Network and Client Server Network 38


1.3 Evolution of Computer Network 40
al

1.4 Internet, Intranet & Extranet 41


.k

1.4.1 Comparison Between Internet, Intranet and Extranet 42


w

2. Types of Networks 45
2.1 Local Area Network (LAN) 45
w

2.2 Metropolitan Area Networks (MAN) 46


w

2.3 Wide Area Networks (WAN) 46


2.4 Personal Area Network (PAN) 47
2.5 Campus Area Network (CAN) 47
2.6 Storage Area Network (SAN) 47
2.7 Types of LAN Technologies 48
2.7.1 Ethernet 48
2.7.2 Fast Ethernet 50
2.7.3 Gigabit Ethernet 51
2.7.4 10 Gigabit Ethernet 51

Send Your Material &Question Answer Our Email ID [email protected]


www.kalviexpress.in www.kalviexpress.in
3. LAN Topology 55
3.1 Bus Topologies 55
3.2 Star Topologies 56
3.3 Tree Topologies 57
3.4 Ring Topologies 58
3.5 Mesh Topologies 58
3.6 Hybrid Topologies 59
TEACHER'S CARE ACADEMY

4. Transmission Medium (Communication Channel) 61


4.1 Types Of Transmission Medium 61
4.2 Guided Transmission Medium 63
4.2.1 Twisted pair cable (ethernet cable) 63
4.2.2 Coaxial cable 64

in
4.2.3 Fiber optics 65
4.3 Wireless transmission 66

s.
4.3.1 The electromagnetic spectrum 66

s
4.3.2 Radio wave 68
4.3.3
4.3.4
Microwave transmission
Infrared and millimeter waves
p re 68
69
4.4 Communication satellites 70
ex

4.4.1 Geo - geostationary satellites 70


vi

4.4.2 Meo - medium-earth orbit satellites 71


4.4.3 Leo - low-earth orbit satellites 71
al

5. Network Devices 74
.k

5.1 Ethernet Card (NIC) 74


5.2 Hub 75
w

5.3 Switch 76
w

5.4 Repeater 76
w

5.5 Bridge 77
5.6 Router 78
5.6.1 Physical vs Logical Addresses 78
5.7 Gateway 79
5.8 Modem 80
5.9 Wi-Fi Card 80
6. ISO/OSI Stack 82
6.1 Protocol Hierarchies 82
6.2 OSI Reference Model 86
6.2.1 Seven Layers of OSI Reference Model 87

www.tcaexamguide.com (9566535080; 9786269980; 76399 67359; 93602 68118 )


Send Your Material &Question Answer Our Email ID [email protected]
www.kalviexpress.in www.kalviexpress.in
7. Network Protocols (TCP/IP Protocol Suit) 93
7.1 Transmission Control Protocol / Internet protocol(TCP/IP) 93
7.2 List of Layers and its Protocols 97
7.3 Application Layer Protocols 99
7.3.1 File Transfer Protocol 99
7.3.2 Hyper Text Transfer Protocol 100
7.3.3 Simple Mail transfer protocol (SMTP) : E-Mail Protocol 101

TEACHER'S CARE ACADEMY


7.3.4 Post Office Protocol Version 3 (POP3) : E-Mail Protocol 103
7.3.5 Telnet : Remote Access Protocol 103
7.3.6 Simple Network Management Protocol (SNMP) 104
7.3.7 Dynamic Host Configuration Protocol (DHCP) 104
7.3.8 Chat Protocol 105

in
7.3.9 VOIP 106
7.4 Transport Layer Protocols 106

s.
7.5 Network Layer Protocols 107

s
7.5.1 Address Resolution Protocol (ARP) 107
7.5.2
7.5.3
re
Reverse Address Resolution Protocol (RARP)
Internet Control Message Protocol (ICMP)
p 107
107
7.6 Physical Layer Protocols 107
ex

7.6.1 Fiber Distributed Data Interface 107


vi

7.7 ALOHA Net 108


8. Flow Conrol 111
al

8.1 For Noiseless Channel: 111


.k

8.1.1 Simplex Protocol 111


8.1.2 Stop And Wait Protocol 112
w

8.2 For Noisy Channel 113


w

8.2.1 Sliding Window Protocols 114


w

8.2.2 Protocol Using Go Back N: 115


8.2.3 Protocol Using Selective Repeat 116
9. Error Control 119
9.1 Framing 119
9.2 Error Detection Techinques 122
9.2.1 VRC(Vertical Redundancy Check)or Simple Parity check 123
9.2.2 LRC (Longitudinal (or horizontal) redundancy checking )
123
Two-dimensional Parity check
9.2.3 Checksum 124
9.2.4 Cyclic redundancy check (CRC) 124

www.tcaexamguide.com (95665 35080; 9786269980; 76399 67359; 93602 68118 )


Send Your Material &Question Answer Our Email ID [email protected]
www.kalviexpress.in www.kalviexpress.in
9.3 Error Correction Techinques 125
9.3.1 Hamming Code 126
10. Routing 131
11. Congestion Control 135
11.1 General principles of congestion control 135
11.2 Traffic shaping 135
11.3 Flow specification 136
TEACHER'S CARE ACADEMY

11.4 Congestion control in virtual circuit subnets 136


11.5 Congestion control in datagram subnets 136
12. Media Access Control (MAC) Address 138
12.1 Format of MAC Address 138
12.2 Types of MAC Address 139

in
13. IP Address (IPv4 Overview) 143
13.1 What is Network? 143

s.
13.2 IPv4 - OSI Model 144

s
13.3 Network Layer 145
13.4
13.5
IPv4 - TCP/IP Model
IPv4 - Packet Structure
p re 145
146
13.6 IPv4 - Addressing 147
ex

13.7 IPv4 - Address Classes 150


vi

13.8 IPv4 - Subnetting 152


14 Electronic Mail 163
al

14.1 Architecture and Services 163


.k

14.2 The User Agent 164


14.3 Message Formats (rfc 822) 165
w

14.4 Message Transfer 167


w

14.5 Final Delivery 167


w

15. Video Conferencing 170


16. HTML ( Hyper Text Markup Language) 172
16.1 History of HTML 172
16.2 HTML Generations 172
16.3 HTML(Hypertext Markup Language) Tags 173
16.4 XML (Extensible Markup Language) 180
16.5 WWW(World Wide Web) 180
16.6 Web Page 180
16.7 Web Site 181
16.8 Web Browser 181

www.tcaexamguide.com (9566535080; 9786269980; 76399 67359; 93602 68118 )


Send Your Material &Question Answer Our Email ID [email protected]
www.kalviexpress.in www.kalviexpress.in
16.9 Home Page 182
16.10 URL ( Uniform Resource Locator) 183
16.11 Web Server 184
16.12 Web Hosting 184
16.13 WEB 2.0 184
17. Wireless Ad-hoc Network 186
17.1 Desirable properties of Ad-Hoc Routing protocols 187

TEACHER'S CARE ACADEMY


17.2 There are currently two variations of mobile wireless networks 188
17.3 Characters and Fundamental Challenges of Wireless Ad-hoc 189
17.4 Proactive and Reactive Routing 190
18. GSM (Global System for Mobile Communication) 192
18.1 Introduction 192

in
18.2 1G,2G,3G,4G 193
18.3 GSM Architecture 195

s.
19. Network Security 199

s
19.1 Security Attacks 202
19.2
19.3
Encryption and Decryption
Cryptography
p re 203
203
19.4 Private key Cryptography 204
ex

19.5 Public key Cryptography 205


vi

19.6 Encryption Methods 211


19.7 Digital Signature 216
al

19.8 Firewall 217


.k

20. Cyber Law 223


PG TRB (2020-2021) QUESTION BANK 225
w
w
w

www.tcaexamguide.com (95665 35080; 9786269980; 76399 67359; 93602 68118 )


Send Your Material &Question Answer Our Email ID [email protected]
www.kalviexpress.in www.kalviexpress.in
1

TEACHER’S CARE ACADEMY, KANCHIPURAM


TNPSC-TRB- COMPUTER SCIENCE -TET COACHING CENTER
HEAD OFFICE: NO. 38/23, VAIGUNDA PERUMAL KOIL,
SANNATHI STREET, KANCHIPURAM – 1. CELL: 9566535080
B.Off 2: 65C, Thillai Ngr(West), 4th Cross St, Trichy – 620018
B.Off 3: Vijiyaraghavachariar Memorial Hall(Opp to Sundar Lodge), Salem

Trichy : 76399 67359 Salem : 93602 68118

PG TRB COMPUTER INSTRUCTOR GRADE-1 (2020-2021)


UNIT-X
COMMUNICATION AND NETWORK CONCEPTS

in
s s.
SYLLABUS
 Evolution of Networking : Internet
p re
 Data Communication Terminologies: Bandwidth (Hz, KHz, MHz) and Data
ex

transfer rate (bps,kbps,Mbps,Gbps,Tbps)


 Network Devices : Modem, Ethernet Card, Hub, Switch, Router.
vi

 Different Topologies – Bus, Tree


al

 Concepts of LAN, WAN, MAN.


 Protocol : TCP/IP, Internet
.k

 Wireless/Mobile Communication , GSM


w

 Electronic Mail, Chat, Video Conferencing


 Network Security Concepts : Cyber Law, Hackers and Crackers.
w

 Web Pages : Hyper Text Markup Language (HTML), Hyper Text Transfer
w

Protocol (HTTP), Website, Web Browser, Web Server.

www.tcaexamguide.com (9566535080; 9786269980; 76399 67359; 93602 68118 )

Send Your Material &Question Answer Our Email ID [email protected]


www.kalviexpress.in www.kalviexpress.in
16
CHAPTER 1
INTRODUCTION
1.1 COMMUNICATION SYSTEM
 Sending or Receiving information, such as speaking, writing, telephone lines , computers or
using some other medium is communication.
 The communication system basically deals with the transmission of information from one
point to another using the well-defined steps which are carried out in sequential manner. The
TEACHER'S CARE ACADEMY
TEACHER'S CARE ACADEMY

system for data transmission makes use of the sender and destination address, In this other so
many elements are also there that allows it to transfer data from one set of point to another set
of point after dividing the elements of communication system in groups and these interface
elements acts as the main component for data communication.
 Data communication system made up of five basic components, they are

in
 Message

s.
 Sender

s
Receiver


Transmission Medium
Protocol
p re
ex
vi
al
.k
w
w

1.1.1. SIGNAL
 A signal is an electromagnetic or electrical current that carries data from one system or
w

network to another.
 In electronics, a signal is often a time-varying voltage that is also an electromagnetic wave
carrying information, though it can take on other forms, such as current.
 There are two main types of signals used in electronics: analog and digital signals.

a.) Analog Signal


 Because a signal varies over time, it's helpful to plot it on a graph where time is plotted on
the horizontal, x-axis, and voltage on the vertical, y-axis.

www.tcaexamguide.com (9566535080; 9786269980; 76399 67359; 93602 68118 )


Send Your Material &Question Answer Our Email ID [email protected]
www.kalviexpress.in www.kalviexpress.in
17
 Looking at a graph of a signal is usually the easiest way to identify if it's analog or digital;
a time-versus-voltage graph of an analog signal should be smooth and continuous.

 While these signals may be limited to a range of maximum and minimum values, there

TEACHER'S CARE ACADEMY


are still an infinite number of possible values within that range.
For example:
 The analog voltage coming out of your wall socket might be clamped between -120V and
+120V, but, as you increase the resolution more and more, you discover an infinite number
of values that the signal can actually be (like 64.4V, 64.42V, 64.424V, and infinite,

in
increasingly precise values).

s.
b.) Digital Signals

s
 Digital signals must have a finite set of possible values.

that's-not-infinity.
p re
 The number of values in the set can be anywhere between two and a-very-large-number-

 Most commonly digital signals will be one of two values -- like either 0V or 5V.
ex

 Timing graphs of these signals look like square waves.


vi
al
.k

 Or a digital signal might be a discrete representation of an analog waveform. Viewed


w

from afar, the wave function below may seem smooth and analog, but when you look
w

closely there are tiny discrete steps as the signal tries to approximate values:
w

 That's the big difference between analog and digital waves. Analog waves are smooth
and continuous, digital waves are stepping, square, and discrete.

c.) Key Differences:


 An analog signal is a continuous signal whereas Digital signals are time separated
signals.

www.tcaexamguide.com (95665 35080; 9786269980; 76399 67359; 93602 68118 )


Send Your Material &Question Answer Our Email ID [email protected]
www.kalviexpress.in www.kalviexpress.in
18
 Analog signal is denoted by sine waves while It is denoted by square waves
 Analog signal uses a continuous range of values that help you to represent information
on the other hand digital signal uses discrete 0 and 1 to represent information.
 The analog signal bandwidth is low while the bandwidth of the digital signal is high.
 Analog instruments give considerable observational errors whereas Digital instruments
never cause any kind of observational errors.
 Analog hardware never offers flexible implementation, but Digital hardware offers
TEACHER'S CARE ACADEMY
TEACHER'S CARE ACADEMY

flexibility in implementation.
 Analog signals are suited for audio and video transmission while Digital signals are
suited for Computing and digital electronics.

d.) Characteristics Of Analog Signal

in
Here, are essential characteristics of Analog Signal

s.
 These type of electronic signals are time-varying
 Minimum and maximum values which is either positive or negative.

s
 It can be either periodic or non-periodic.


Analog Signal works on continuous data.
p re
The accuracy of the analog signal is not high when compared to the digital signal.
ex

 It helps you to measure natural or physical values.


 Analog signal output form is like Curve, Line, or Graph, so it may not be meaningful.
vi

e.) Characteristics of Digital Signals


al

Here, are essential characteristics of Digital signals


.k

 Digital signal are continuous signals


w

 This type of electronic l signals can be processed and transmitted better compared to
analog signal.
w

 Digital signals are versatile, so it is widely used.


w

 The accuracy of the digital signal is better than that of the analog signal.

f.) Difference Between Analog and Digital Signal


Here are important differences between Analog and Digital Signal:

Analog Digital

An analog signal is a continuous signal that Digital signals are time separated signals
represents physical measurements. which are generated using digital modulation.

It is denoted by sine waves It is denoted by square waves

www.tcaexamguide.com (9566535080; 9786269980; 76399 67359; 93602 68118 )


Send Your Material &Question Answer Our Email ID [email protected]
www.kalviexpress.in www.kalviexpress.in
225
PG TRB (2020-2021) QUESTION BANK

1.) The number of bits used for addressing in Gigabit Ethernet is __________.
(A) 32 bit (B) 48 bit
(C) 64 bit (D) 128 bit

2.) Which of the following devices takes data sent from one network device and forwards it

TEACHER'S CARE ACADEMY


to the destination node based on MAC address?
(A) Hub (B) Modem
(C) Switch (D) Gateway

3.) __________ do not take their decisions on measurements or estimates of the current

in
traffic and topology.
(A) Static algorithms (B) Adaptive algorithms

s.
(C) Non – adaptive algorithms (D) Recursive algorithms

s
(A) Network layer (B) Data layer
p re
4.) Which of the following layer of OSI Reference model is also called end-to-end layer ?

(C) Session layer D) transport layer


ex
vi

5.) The IP address __________ is used by hosts when they are being booted.
(A) 0.0.0.0 (B) 1.0.0.0
al

(C) 1.1.1.1 (D) 255.255.255.255


.k

6.) Suppose we want to download text documents at the rate of 100 pages per second.
w

Assume that a page consists of an average of 24 lines with 80 characters in each line. What
w

is the required bit rate of the channel?


w

(A) 192 kbps (B) 512 kbps


(C) 1.248 Mbps (D) 1.536 Mbps

7.) If a file consisting of 50,000 characters takes 40 seconds to send, then the data rate is __.
(A) 1 kbps (B) 1.25 kbps
(C) 2 kbps (D) 10 kbps

www.tcaexamguide.com (95665 35080; 9786269980; 76399 67359; 93602 68118 )


Send Your Material &Question Answer Our Email ID [email protected]
www.kalviexpress.in www.kalviexpress.in

in
s s.
re
COMPUTER SCIENCE
p
ex

PG TRB 2020 – 21
vi
al
.k
w
w
w

Send Your Material &Question Answer Our Email ID [email protected]

You might also like