0% found this document useful (0 votes)
11 views

Basic of Computer Science

Uploaded by

shreeyonisha1910
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

Basic of Computer Science

Uploaded by

shreeyonisha1910
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 57

Basics of computer science

Unit -1 Introduction to computer

Being a modern-day kid you must have used, seen, or read about computers. This is because
they are an integral part of our everyday existence. Be it schools, banks, shops, railway
stations, hospitals, or your own home, computers are present everywhere, making our work
easier and faster for us. As they are such integral parts of our lives, we must know what they
are and how they function. Let us start with defining the term computer formally.

The literal meaning of a computer is a device that can calculate. However, modern computers
can do a lot more than calculate. The computer is an electronic device that receives input,
stores or processes the input as per user instructions, and provides output in the desired
format.

Input-Process-Output Model

Computer input is called data and the output obtained after processing it, based on user’s
instructions is called information. Raw facts and figures which can be processed using
arithmetic and logical operations to obtain information are called data.

The processes that can be applied to data are of two types −

 Arithmetic operations − Examples include calculations like addition, subtraction,


differentials, square root, etc.
 Logical operations − Examples include comparison operations like greater than, less
than, equal to, opposite, etc.

The corresponding figure for an actual computer looks something like this −

The basic parts of a computer are as follows −


 Input Unit − Devices like keyboard and mouse that are used to input data and
instructions to the computer are called input unit.
 Output Unit − Devices like printer and visual display unit that are used to provide
information to the user in desired format are called output unit.
 Control Unit − As the name suggests, this unit controls all the functions of the
computer. All devices or parts of computer interact through the control unit.
 Arithmetic Logic Unit − This is the brain of the computer where all arithmetic
operations and logical operations take place.
 Memory − All input data, instructions and data interim to the processes are stored in the
memory. Memory is of two types – primary memory and secondary memory. Primary
memory resides within the CPU whereas secondary memory is external to it.

Control unit, arithmetic logic unit and memory are together called the central processing
unit or CPU. Computer devices like keyboard, mouse, printer, etc. that we can see and touch
are the hardware components of a computer. The set of instructions or programs that make
the computer function using these hardware parts are called software. We cannot see or
touch software. Both hardware and software are necessary for working of a computer.

Characteristics of Computer

To understand why computers are such an important part of our lives, let us look at some of its
characteristics −

 Speed − Typically, a computer can carry out 3-4 million instructions per second.
 Accuracy − Computers exhibit a very high degree of accuracy. Errors that may occur
are usually due to inaccurate data, wrong instructions or bug in chips – all human errors.
 Reliability − Computers can carry out same type of work repeatedly without throwing
up errors due to tiredness or boredom, which are very common among humans.
 Versatility − Computers can carry out a wide range of work from data entry and ticket
booking to complex mathematical calculations and continuous astronomical
observations. If you can input the necessary data with correct instructions, computer will
do the processing.
 Storage Capacity − Computers can store a very large amount of data at a fraction of
cost of traditional storage of files. Also, data is safe from normal wear and tear
associated with paper.

Advantages of Using Computer

Now that we know the characteristics of computers, we can see the advantages that
computers offer−

 Computers can do the same task repetitively with same accuracy.


 Computers do not get tired or bored.
 Computers can take up routine tasks while releasing human resource for more
intelligent functions.

Disadvantages of Using Computer

Despite so many advantages, computers have some disadvantages of their own −

 Computers have no intelligence; they follow the instructions blindly without considering
the outcome.
 Regular electric supply is necessary to make computers work, which could prove
difficult everywhere especially in developing nations.

Booting
Starting a computer or a computer-embedded device is called booting. Booting takes place in
two steps −

 Switching on power supply


 Loading operating system into computer’s main memory
 Keeping all applications in a state of readiness in case needed by the user

The first program or set of instructions that run when the computer is switched on is
called BIOS or Basic Input Output System. BIOS is a firmware, i.e. a piece of software
permanently programmed into the hardware.

If a system is already running but needs to be restarted, it is called rebooting. Rebooting may
be required if a software or hardware has been installed or system is unusually slow.

There are two types of booting −

 Cold Booting − When the system is started by switching on the power supply it is
called cold booting. The next step in cold booting is loading of BIOS.
 Warm Booting − When the system is already running and needs to be restarted or
rebooted, it is called warm booting. Warm booting is faster than cold booting because
BIOS is not reloaded.
 There are five computer generations known till date. Each generation has been
discussed in detail along with their time period and characteristics. In the following table,
approximate dates against each generation has been mentioned, which are normally
accepted.
 Following are the main five generations of computers.

First Generation
1
The period of first generation: 1946-1959. Vacuum tube-based.

Second Generation
2
The period of second generation: 1959-1965. Transistor-based.

Third Generation
3
The period of third generation: 1965-1971. Integrated Circuit based.

Fourth Generation
4
The period of fourth generation: 1971-1980. VLSI microprocessor based.

Fifth Generation
5 The period of fifth generation: 1980-onwards. ULSI microprocessor based.

Input Devices –
The devices through which control signals are sent to a computer are termed input devices.
These devices convert the input data into a digital form that is acceptable by the computer
system. Some examples of input devices include a keyboard, mouse, scanner, touch screen,
etc., Specially designed braille keyboards are also available to help the visually impaired enter
data into a computer. Besides, we can now enter data through voice, for example, we can use
Google Voice search to search the web where we can input the search string through our
voice. Data entered through the input device is temporarily stored in the main memory (also
called RAM) of the computer system. For permanent storage and future use, the data as well
as instructions are stored permanently in additional storage locations called secondary
memory.
Output Devices –
The device that receives data from a computer system for display, physical production, etc., is
called an output device. It converts digital information into a human understandable form. For
example, monitor, projector, headphone, speaker, printer, etc.
A braille display monitor is useful for a visually challenged person to understand the textual
output generated by computers. A printer is the most commonly used device to get output in
physical (hardcopy) form. Three types of commonly used printers are inkjet, LaserJet, and dot
matrix. Nowadays, there is a new type of printer called 3D printer, which is used to build a
physical replica of a digital 3D design. These printers are being used in manufacturing
industries to create prototypes of products. Their usage is also being explored in the medical
field, particularly for developing body organs.
Computer Memory-
A computer system needs memory to store the data and instructions for processing. Whenever
we talk about the ‘memory’ of a computer system, we usually talk about the main or primary
memory. The secondary memory (also called storage device) is used to store data,
instructions, and results permanently for future use. 1.3.1 Units of Memory, A computer system
uses binary numbers to store and process data. The binary digits 0 and 1, which are the basic
units of memory, are called bits. Further, these bits are grouped to form words. A 4-bit word is
called a Nibble. Examples of nibble are 1001, 1010, 0010, etc. A two-nibble word, i.e., an 8-bit
word is called a byte, for example, 01000110, 01111100, 10000001, etc. Like any other
standard unit, bytes are grouped to make bigger chunks or units of memory. Table 1.1 shows
different measurement units for digital data stored in storage devices.
Types of Memory-
Human beings memorize many things over a lifetime and recall from memory to make a
decision or some action. However, we do not rely on our memory completely, and we make
notes and store important data and information using other media, such as notebooks,
manuals, journals, documents, etc. Similarly, computers have two types of memory — primary
and secondary.
1)Primary Memory-
Primary memory is an essential component of a computer system. Program and data are
loaded into the primary memory before processing. The CPU interacts directly with the primary
memory to perform read or write operations. It is of two types viz. (i) Random Access Memory
(RAM) and (ii) Read Only Memory (ROM).
RAM is volatile, i.e., as long as the power is supplied to the computer, it retains the data in it.
But as soon as the power supply is turned off, all the contents of RAM are wiped out. It is used
to store data temporarily while the computer is working. Whenever the computer is started or a
software application is launched, the required program and data are loaded into RAM for
processing. RAM is usually referred to as main memory and it is faster than the secondary
memory or storage devices.
On the other hand, ROM is non-volatile, which means its contents are not lost even when the
power is turned off. It is used as a small but faster permanent storage for the contents which
are rarely changed. For example, the start-up program (boot loader) that loads the operating
system into primary memory, is stored in ROM.
2)Cache Memory
RAM is faster than secondary storage, but not as fast as a computer processor. So, because
of RAM, a CPU may have to slow down. To speed up the operations of the CPU, a very high
speed memory is placed between the CPU and the primary memory known as cache. It stores
the copies of the data from frequently accessed primary memory locations, thus, reducing the
average time required to access data from primary memory. When the CPU needs some data,
it first examines the cache. In case the requirement is met, it is read from the cache, otherwise
the primary memory is accessed.
3) Secondary Memory -
Primary memory has limited storage capacity and is either volatile (RAM) or read-only (ROM).
Thus, a computer system needs auxiliary or secondary memory to permanently store the data
or instructions for future use. The secondary memory is non-volatile and has larger storage
capacity than primary memory. It is slower and cheaper than the main memory. But, it cannot
be accessed directly by the CPU. Contents of secondary storage need to be first brought into
the main memory for the CPU to access. Examples of secondary memory devices include
Hard Disk Drive (HDD), CD/ DVD, Memory Card, etc., as shown in Figure 1.7. However, these
days, there are secondary storage devices like SSD that support very fast data transfer speed
as compared to earlier HDDs. Also, data transfer between computers has become easier and
simpler due to the availability of small-sized and portable flash or pen drives.
Motherboard-

The motherboard serves as a single platform to connect all of the parts of a computer together.
It connects the CPU, memory, hard drives, optical drives, video card, sound card, and other
ports and expansion cards directly or via cables. It can be considered as the backbone of a
computer.

Description of Motherboard

The motherboard is mounted inside the case and is securely attached via small screws
through pre-drilled holes. Motherboard contains ports to connect all of the internal components.
It provides a single socket for CPU, whereas for memory, normally one or more slots are
available. Motherboards provide ports to attach the floppy drive, hard drive, and optical drives
via ribbon cables. Motherboard carries fans and a special port designed for power supply.

On the left side, motherboards carry a number of ports to connect the monitor, printer, mouse,
keyboard, speaker, and network cables. Motherboards also provide USB ports, which allow
compatible devices to be connected in plug-in/plug-out fashion. For example, pen drive, digital
cameras, etc.

Classification of Peripheral devices

It is generally classified into 3 basic categories which are given below:

1. Input Devices:

The input device is defined as it converts incoming data and instructions into a pattern of
electrical signals in binary code that are comprehensible to a digital computer.

Example: Keyboard, mouse, scanner, microphone, etc.

Keyboard: A keyboard is an input device that allows users to enter text and commands into a
computer system.

Mouse: A mouse is an input device that allows users to control the cursor on a computer
screen.

Scanner: A scanner is an input device that allows users to convert physical documents and
images into digital files.

Microphone: A microphone is an input device that allows users to record audio.

2. Output Devices:

An output device is generally the reverse of the input process and generally translates the
digitized signals into a form intelligible to the user. The output device is also performed for
sending data from one computer system to another. For some time punched card and paper
tape readers were extensively used for input, but these have now been supplanted by more
efficient devices.

Example: Monitors, headphones, printers etc.

Monitor: A monitor is an output device that displays visual information from a computer system.

Printer: A printer is an output device that produces physical copies of documents or images.

Speaker: A speaker is an output device that produces audio.

3. Storage Devices:

Storage devices are used to store data in the system which is required for performing any
operation in the system. The storage device is one of the most required devices and also
provides better compatibility.

Examples: Hard disk, magnetic tape, Flash memory, etc.

Hard Drive: A hard drive is a storage device that stores data and files on a computer system.
USB Drive: A USB drive is a small, portable storage device that connects to a computer
system to provide additional storage space.

Memory Card: A memory card is a small, portable storage device that is commonly used in
digital cameras and smartphones.

External Hard Drive: An external hard drive is a storage device that connects to a computer
system to provide additional storage space.

4. Communication Devices:

Communication devices are used to connect a computer system to other devices or networks.
Examples of communication devices include:

Modem: A modem is a communication device that allows a computer system to connect to the
internet.

Network Card: A network card is a communication device that allows a computer system to
connect to a network.

Router: A router is a communication device that allows multiple devices to connect to a


network.

Programming Languages

The computer system is simply a machine and hence it cannot perform any work; therefore, to
make it functional different languages are developed, which are known as programming
languages or simply computer languages.

Over the last two decades, dozens of computer languages have been developed. Each of
these languages comes with its own set of vocabulary and rules, better known as syntax.
Furthermore, while writing the computer language, syntax has to be followed literally, as even
a small mistake will result in an error and not generate the required output.

Following are the major categories of Programming Languages −

 Machine Language
 Assembly Language
 High Level Language
 System Language
 Scripting Language
 Machine Language or Code

This is the language that is written for the computer hardware. Such language is affected
directly by the central processing unit (CPU) of a computer system.

Assembly Language

It is a language of an encoding of machine code that makes it simpler and readable.

High-Level Language

The high-level language is simple and easy to understand and it is similar to the English
language. For example, COBOL, BASIC, C, C+, Python, etc.

High-level languages are very important, as they help in developing complex software.
Number System-

The technique to represent and work with numbers is called the number system. The
decimal number system is the most common. Other popular number systems include binary
number system, octal number system, hexadecimal number system, etc.

Decimal Number System

Decimal number system is a base 10 number system having 10 digits from 0 to 9. This means
that any numerical quantity can be represented using these 10 digits. Decimal number system
is also a positional value system. This means that the value of digits will depend on its
position. Let us take an example to understand this.

Say we have three numbers – 734, 971 and 207. The value of 7 in all three numbers is
different−

 In 734, value of 7 is 7 hundreds or 700 or 7 × 100 or 7 × 10 2


 In 971, value of 7 is 7 tens or 70 or 7 × 10 or 7 × 10 1
 In 207, value 0f 7 is 7 units or 7 or 7 × 1 or 7 × 10 0

The weightage of each position can be represented as follows −

In digital systems, instructions are given through electric signals; variation is done by varying
the voltage of the signal. Having 10 different voltages to implement decimal number system in
digital equipment is difficult. So, many number systems that are easier to implement digitally
have been developed. Let’s look at them in detail.

Binary Number System

The easiest way to vary instructions through electric signals is a two-state system – on and off.
On is represented as 1 and off as 0, though 0 is not actually no signal but signal at a lower
voltage. The number system having just these two digits – 0 and 1 – is called binary number
system.

Each binary digit is also called a bit. Binary number system is also positional value system,
where each digit has a value expressed in powers of 2, as displayed here.

In any binary number, the rightmost digit is called least significant bit (LSB) and leftmost digit
is called most significant bit (MSB).
And decimal equivalent of this number is sum of product of each digit with its positional value.

110102 = 1×24 + 1×23 + 0×22 + 1×21 + 0×20

= 16 + 8 + 0 + 2 + 0

= 2610

Computer memory is measured in terms of how many bits it can store. Here is a chart for
memory capacity conversion.

 1 byte (B) = 8 bits


 1 Kilobytes (KB) = 1024 bytes
 1 Megabyte (MB) = 1024 KB
 1 Gigabyte (GB) = 1024 MB
 1 Terabyte (TB) = 1024 GB
 1 Exabyte (EB) = 1024 PB
 1 Zettabyte = 1024 EB
 1 Yottabyte (YB) = 1024 ZB

Octal Number System-

Octal number system has eight digits – 0, 1, 2, 3, 4, 5, 6 and 7. Octal number system is also
a positional value system with where each digit has its value expressed in powers of 8, as
shown here −

Decimal equivalent of any octal number is sum of product of each digit with its positional value.

7268 = 7×82 + 2×81 + 6×80

= 448 + 16 + 6

= 47010

Hexadecimal Number System

Octal number system has 16 symbols – 0 to 9 and A to F where A is equal to 10, B is equal
to 11 and so on till F. Hexadecimal number system is also a positional value system with
where each digit has its value expressed in powers of 16, as shown here −

Decimal equivalent of any hexadecimal number is sum of product of each digit with its
positional value.

27FB16 = 2×163 + 7×162 + 15×161 + 10×160

= 8192 + 1792 + 240 +10


= 1023410

Number System Relationship

The following table depicts the relationship between decimal, binary, octal and hexadecimal
number systems.

HEXADECIMAL DECIMAL OCTAL BINARY

0 0 0 0000

1 1 1 0001

2 2 2 0010

3 3 3 0011

4 4 4 0100

5 5 5 0101

6 6 6 0110

7 7 7 0111

8 8 10 1000

9 9 11 1001

A 10 12 1010

B 11 13 1011

C 12 14 1100

D 13 15 1101

E 14 16 1110

F 15 17 1111
Unit – II Operating System

An Operating System (OS) is an interface between a computer user and computer hardware.
An operating system is a software which performs all the basic tasks like file management,
memory management, process management, handling input and output, and controlling
peripheral devices such as disk drives and printers.

An operating system is software that enables applications to interact with a computer's


hardware. The software that contains the core components of the operating system is called
the kernel.

The primary purposes of an Operating System are to enable applications (spftwares) to


interact with a computer's hardware and to manage a system's hardware and software
resources.

Some popular Operating Systems include Linux Operating System, Windows Operating
System, VMS, OS/400, AIX, z/OS, etc. Today, Operating systems is found almost in every
device like mobile phones, personal computers, mainframe computers, automobiles, TV, Toys
etc.

Definitions

We can have a number of definitions of an Operating System. Let's go through few of them:

An Operting System is the low-level software that supports a computer's basic functions, such
as scheduling tasks and controlling peripherals.

Architecture

We can draw a generic architecture diagram of an Operating System which is as follows:


Types of Operating System
Operating systems are there from the very first computer generation and they keep evolving
with time. In this chapter, we will discuss some of the important types of operating systems
which are most commonly used.

Batch operating system

The users of a batch operating system do not interact with the computer directly. Each user
prepares his job on an off-line device like punch cards and submits it to the computer operator.
To speed up processing, jobs with similar needs are batched together and run as a group. The
programmers leave their programs with the operator and the operator then sorts the programs
with similar requirements into batches.

The problems with Batch Systems are as follows −

 Lack of interaction between the user and the job.


 CPU is often idle, because the speed of the mechanical I/O devices is slower than the
CPU.
 Difficult to provide the desired priority.

Time-sharing operating systems-

Time-sharing is a technique which enables many people, located at various terminals, to use a
particular computer system at the same time. Time-sharing or multitasking is a logical
extension of multiprogramming. Processor's time which is shared among multiple users
simultaneously is termed as time-sharing.

The main difference between Multiprogrammed Batch Systems and Time-Sharing Systems is
that in case of Multiprogrammed batch systems, the objective is to maximize processor use,
whereas in Time-Sharing Systems, the objective is to minimize response time.

Multiple jobs are executed by the CPU by switching between them, but the switches occur so
frequently. Thus, the user can receive an immediate response. For example, in a transaction
processing, the processor executes each user program in a short burst or quantum of
computation. That is, if n users are present, then each user can get a time quantum. When the
user submits the command, the response time is in few seconds at most.

The operating system uses CPU scheduling and multiprogramming to provide each user with a
small portion of a time. Computer systems that were designed primarily as batch systems have
been modified to time-sharing systems

Advantages of Timesharing operating systems are as follows −


 Provides the advantage of quick response.
 Avoids duplication of software.
 Reduces CPU idle time.
Disadvantages of Time-sharing operating systems are as follows
 Problem of reliability.
 Question of security and integrity of user programs and data.
 Problem of data communication.
Distributed operating System

Distributed systems use multiple central processors to serve multiple real-time applications and
multiple users. Data processing jobs are distributed among the processors accordingly.

The processors communicate with one another through various communication lines (such as
high-speed buses or telephone lines). These are referred as loosely coupled systems or
distributed systems. Processors in a distributed system may vary in size and function. These
processors are referred as sites, nodes, computers, and so on.

The advantages of distributed systems are as follows −

 With resource sharing facility, a user at one site may be able to use the resources
available at another.
 Speedup the exchange of data with one another via electronic mail.
 If one site fails in a distributed system, the remaining sites can potentially continue
operating.
 Better service to the customers.
 Reduction of the load on the host computer.
 Reduction of delays in data processing.

Network operating System

A Network Operating System runs on a server and provides the server the capability to
manage data, users, groups, security, applications, and other networking functions. The
primary purpose of the network operating system is to allow shared file and printer access
among multiple computers in a network, typically a local area network (LAN), a private network
or to other networks.

Examples of network operating systems include Microsoft Windows Server 2003, Microsoft
Windows Server 2008, UNIX, Linux, Mac OS X, Novell NetWare, and BSD.

The advantages of network operating systems are as follows −

 Centralized servers are highly stable.


 Security is server managed.
 Upgrades to new technologies and hardware can be easily integrated into the system.
 Remote access to servers is possible from different locations and types of systems.

The disadvantages of network operating systems are as follows −

 High cost of buying and running a server.


 Dependency on a central location for most operations.
 Regular maintenance and updates are required.

Real Time operating System

A real-time system is defined as a data processing system in which the time interval required
to process and respond to inputs is so small that it controls the environment. The time taken by
the system to respond to an input and display of required updated information is termed as
the response time. So in this method, the response time is very less as compared to online
processing.

Real-time systems are used when there are rigid time requirements on the operation of a
processor or the flow of data and real-time systems can be used as a control device in a
dedicated application. A real-time operating system must have well-defined, fixed time
constraints, otherwise the system will fail. For example, Scientific experiments, medical
imaging systems, industrial control systems, weapon systems, robots, air traffic control
systems, etc.

There are two types of real-time operating systems.

Hard real-time systems

Hard real-time systems guarantee that critical tasks complete on time. In hard real-time
systems, secondary storage is limited or missing and the data is stored in ROM. In these
systems, virtual memory is almost never found.

Soft real-time systems

Soft real-time systems are less restrictive. A critical real-time task gets priority over other tasks
and retains the priority until it completes. Soft real-time systems have limited utility than hard
real-time systems. For example, multimedia, virtual reality, Advanced Scientific Projects like
undersea exploration and planetary rovers, etc

What is Windows Operating System?

Windows Operating System (OS) is a graphical user interface (GUI) based operating
system developed by Microsoft Corporation. It is designed to provide users with a user-
friendly interface to interact with their computers. The first version of the Windows
Operating System was introduced in 1985, and since then, it has undergone many
updates and upgrades. Windows Operating System is compatible with a wide range of
hardware and software applications, making it a popular choice for both personal and
business computing. It has a built-in security system to protect the computer from
malware and viruses and provides a comprehensive file management system that
makes it easy for users to organize and access their files. Windows Operating System
also allows users to run multiple applications simultaneously, making it easy to work on
multiple tasks at the same time.

List of Commands for Windows Operating System

Below is the list of some important commands for the Windows Operating System:

1. cd: This command is used to change the current directory. For example, you can use
"cd Documents" to change to the Documents directory.

2. cls: This command is used to clear the screen of any text or commands that were
previously entered.

3. dir: This command is used to display a list of files and directories in the current
directory.

4. move: This command is used to move a file from one location to another.

5. ipconfig: This command displays the current network configuration of your computer,
including the IP address, subnet mask, and default gateway.

6. ping: This command is used to test the connection between your computer and another
device on the network. It sends packets of data to the device and measures the
response time.
7. nslookup: This command is used to query the Domain Name System (DNS) to retrieve
information about a specific domain or hostname.

8. tracert: This command is used to trace the path that data takes from your computer to
another device on the network. It shows the routers and other devices that the data
passes through.

9. sfc: This command scans and repairs system files that have been corrupted or
modified.

10.attrib: This command is used to change the attributes of a file or directory, such as
read-only or hidden.

11.copy: This command is used to copy files and directories from one

location to another.

12.find: This command is used to search for a specific string of text within a file.

13.del: This command is used to delete a file or directory.

Introduction of Assembler

Assembler is a program for converting instructions written in low-level assembly code into
relocatable machine code and generating along information for the loader.

It is necessary to convert user written programs into a machinery code. This is called as
translation of the high level language to low level that is machinery language. This type of
translation is performed with the help of system software. Assembler can be defined as a
program that translates an assembly language program into a machine language program. Self
assembler is a program that runs on a computer and produces the machine codes for the
same computer or same machine. It is also known as resident assembler. A cross assembler
is an assembler which runs on a computer and produces the machine codes for other
computer.

It generates instructions by evaluating the mnemonics (symbols) in operation field and find the
value of symbol and literals to produce machine code. Now, if assembler do all this work in one
scan then it is called single pass assembler, otherwise if it does in multiple scans then called
multiple pass assembler
Introduction to Interpreters
All high-level languages need to be converted to machine code so that the computer can
understand the program after taking the required inputs. The software by which the conversion
of the high-level instructions is performed line-by-line to machine-level language, other than
compiler and assembler, is known as INTERPRETER.

The interpreter in the compiler checks the source code line-by-line and if an error is found on
any line, it stops the execution until the error is resolved. Error correction is quite easy for the
interpreter as the interpreter provides a line-by-line error. But the program takes more time to
complete the execution successfully. Interpreters were first used in 1952 to ease programming
within the limitations of computers at the time. It translates source code into some efficient
intermediate representation and executes them immediately .

Source programs are compiled before time and stored as machine-independent code, which
is then linked at run-time and executed by an interpreter. An Interpreter is generally used in
micro-computers. It helps the programmer to find out the errors and to correct them before the
control moves to the next statement. The interpreter system performs the actions described by
the high-level program. For interpreted programs, the source code is needed to run the
program every time. Interpreted programs run slower than the compiled programs.
Need for an Interpreter-
The first and vital need of an interpreter is to translate source code from high-level language to
machine language. However, we already had the compiler to serve the purpose, the compiler
is a very powerful tool for developing programs in a high-level language. However, there are
several demerits associated with the compiler. If the source code is huge in size, then it might
take hours to compile the source code, which will significantly increase the compilation
duration. Here, the Interpreter plays its role. The interpreter can cut this huge compilation
duration. As they are designed to translate single instruction at a time and execute them
immediately. So instead of waiting for the entire code, the interpreter translates a single line
and executes it.
Advantages and Disadvantages of Interpreters
The advantage of the interpreter is that it is executed line by line which helps users to find
errors easily.
The disadvantage of the interpreter is that it takes more time to execute successfully than the
compiler.
Applications of Interpreters-
1.Each operator executed in a command language is usually an invocation of a complex
routine, such as an editor or compiler so they are frequently used to command languages and
glue languages.

2.Virtualization is often used when the intended architecture is unavailable .


Sand-boxing
3.Self-modifying code can be easily implemented in an interpreted language.
4.Emulator for running Computer software written for obsolete and unavailable hardware on
more modern equipment.
Some examples of programming languages that use interpreters are Python, Ruby, Perl, PHP,
and MATLAB.
Introduction To Compilers-
A Compiler is a software that typically takes a high level language (Like C++ and Java) code
as input and converts the input to a lower level language at once. It lists all the errors if the
input code does not follow the rules of its language. This process is much faster than
interpreter but it becomes difficult to debug all the errors together in a program.

A compiler is a translating program that translates the instructions of high level language to
machine level language. A program which is input to the compiler is called a Source program.
This program is now converted to a machine level language by a compiler is known as the
Object code.
There are different Compilers :
1.Cross-Compiler – The compiled program can run on a computer whose CPU or Operating
System is different from the one on which the compiler runs.
2.Bootstrap Compiler – The compiler written in the language that it intends to compile.
3.Decompiler – The compiler that translates from a low-level language to a higher level one.
4.Transcompiler – The compiler that translates high level languages.
What is Debuggers?
A debugger is a tool that allows you to examine the state of a running program. Debugging is
the process of locating and then removing bugs or errors in a program. An interactive
debugging system gives programmers tools to help them test and debug their programs.
Debugging is the methodical process of locating and eliminating bugs or defects in a computer
program.

Types of Debuggers:
 Static debugger: A static debugger does not rely on any specific software. The
debugging can be completed by the user.
 Dynamic debugger: A dynamic debugger can be either software or hardware. There are
several types of dynamic debuggers, including the following:
 Breakpoint Debugger: Adding conditional and unconditional breakpoints to the program
at various points
 Kernel Debugger: To debug the operating system, a debugger with kernel debugging
capabilities is provided.
 Meta Debugger: Debugger includes debugging and meta-debugging features.
 Debugger with the same process: The debugger and debuggee processes are identical,
and they both share the main memory. This type of debugger is simple and
straightforward to implement. This debugger executes more quickly.
Need for Debugging:
When errors in a program code are identical, it is necessary to first identify the precise program
statements responsible for the errors and then fix them. Debugging is the process of identifying
and correcting errors in program code.

Features of Breakpoint Debuggers:


1. The Breakpoint debugger supports unit testing.
2. The flow of program execution is controlled by a breakpoint debugger.
3. The programmer may use some unconditional statement in the program, so it supports
this type of program.
4. It is possible to trace the flow of execution logic at different levels and data
modifications.
5. Checkpoint provides a snapshot of program output.
6. The program can add a watchpoint in the source code.
7. The process of execution in a debugger helps back to the previous state of execution.
Process of Debugging:
The following are the various steps involved in debugging:

 Recognize the Error: Identifying an error in a wrong may lead to time waste. It is obvious
that the production errors reported by users are difficult to interpret, and the information
we receive is sometimes misleading. As a result, identifying the actual error is required.
 Locate the Error: Once the error has been correctly identified, you will need to
thoroughly review the code several times to locate the position of the error. This step, in
general, focuses on locating the error rather than perceiving it.
 Evaluate the Error: The third step is error analysis, which is a bottom-up approach that
begins with locating the error and then analyses the code. This step facilitates
understanding of the errors. Essentially, error analysis has two major goals: revaluating
errors to find existing bugs and postulating the uncertainty of incoming collateral
damage in a fix.
 Verify the Analysis: After analysing the primary bugs, look for any additional errors that
may appear on the application. The fourth step is used to write automated tests for such
areas by incorporating the test framework.
 Cover Lateral Damage: The fifth phase involves collecting all of the unit tests for the
code that needs to be modified. When you run these unit tests, they must succeed.
 Fix & Validate: The final stage is fix and validation, which focuses on fixing bugs before
running all of the test scripts to see if they pass.
Unit – III MS-Office
Introduction to MS Office
Microsoft Office is a closed-source software office suite containing different applications.
It was first launched by Bill Gates on 19th November 1990 soon after the launch of
Microsoft Windows.
The first version of MS Office Contains MS Word, MS Excel & and MS PowerPoint.
While these are called Applications, Microsoft Office is called Software.

3.1 WORD PROCESSING


Word processing is the ability to create documents using a word processor. It can also
refer to advanced shorthand techniques, sometimes used in specialised contexts with a
specially modified typewriter. These were primarily aimed at typists, particularly in
offices where other workers sent handwritten notes to be transcribed into documents for
printing which were returned for reviewing. The word processing operators achieved
considerable time saving largely due to:
• the faster typing speeds achieved as a result of electronic keyboards
• the assistance of the word processing software for functions like layout and spell
check, etc.
Today, there are different word processors available; some are proprietary like Microsoft
Word, WordPerfect Office, Star Office Writer, etc., while others are open source like
Kwrite, Openoffice.org Writer, etc. Basic functions in all remain more or less similar
and do not require advanced computer or typing skills for use. However, a complete
word processor is that which lets us work with text and other features, for example,
pictures, tables, and artistic texts, to create interesting and meaningful pages. We can
make our posters for bulletin boards, type letters and attach them as documents to an e-
mail, etc. Since MS Word, an integral component of MS Office, is one of the programs
that provides all these features and many more and is also being mostly used due to its
ease of usage, we have taken it as a sample Word Processing Tool.
3.2 STARTING THE WORD PROCESSOR
Most of the time, we will be able to start the word processor of our choice from the
Program option under the Windows Start menu. Of course, we might also create a
shortcut on the desktop to access our word processor.
For example, to start Microsoft Word, click on


• , and lastly on

ANATOMY OF THE APPLICATION WINDOW
The first and foremost task is to get acquainted with the application window of
the word processing package that we are planning to use. As already
mentioned, most of the packages allow the user to perform identical tasks; their
application windows too appear by and large comparable. The important
components of this are:
 Menu Bar : Provides menu options like File, Edit, View, etc.



• Standard Toolbar : Contains tools for standard tasks, like


saving, printing, cutting, copying, pasting, etc.
• Formatting Toolbar : Provides tools for formatting like
bold, italic, underline, etc.
• View Buttons : Provides options to switch between
Normal, Web Layout, Print Layout, Outline and Reading
views.
• Tab stop: A position we set for placing and aligning text on a page.
• Drawing ToolBar : Provides tools for drawing basic

Standard toolbar
Formatting toolbar
Reviewing toolbar

Tabstop-A position
You set for placing and
Aligning text on a page

View button-click
To switch between
Normal,web Layout

When we start MS-Word, a blank document opens up. Word names the
document as Document1 (Figure 3.2). We can also start a new document in
any of the following ways:
 Click on New button ( ) on the Standard toolbar, or
 Click on New option in the File menu.
After we have started a new document, type in some introductory text into the
document. When we start a new document, the insertion
point (the blinking vertical line, also called cursor) appears in the first column
of the first line. We can just type the text, and it will appear where the
insertion point is. But in a document where we already have the text, we
can place the insertion point anywhere in the text by clicking the mouse
pointing at the desired location.

HOW TO SAVE A DOCUMENT?


• Click o n S a v e b ut t o n o n the formatting toolbar, or
• Click on the Save option in the File menu.
The Save As dialog box appears. It’s a good idea to give the new
document a name and save it as soon as we create it.
• Automatically, we will save our file in My Documents folder. If we need to save
in some other location, navigate towards it by clicking on the arrow on the right, and
selecting one of the available options. Select the location. Figure 3.5 shows the
drive/folder/sub-folder where we want to save the document.
• Type the filename as Document New and Type of document as Word document.
• Click on the Save button.
3.5 FORMATTING TEXT
Formatting refers to the way our text will look like – the design of the characters, their size,
the space between paragraphs, their alignment, etc.
First, selection of text.
By using the mouse, position the insertion point (by clicking the mouse) at the beginning
or end of the block to be selected and then click and drag to the end or beginning of
the block.
By using the shortcuts:
■ Double-click on a word to select it.
■ Triple-click on a paragraph to select it.
■ Ctrl+click on a sentence to select it.
There are basically two types of formatting:
• Character formatting, and
• Paragraph formatting

PARAGRAPH FORMATTING
There are some formatting features that get applied to an entire
paragraph or paragraphs, but not to any given character or a group
thereof. Such formatting features are described a s Paragraph formatting

Automatic Formatting and Styles:


Automatic formatting allows consistent application of styles throughout a
document.
Styles include predefined formatting settings for text, paragraphs, headings,
and more.
They ensure uniformity, simplify document updates, and enable quick changes
across the document.
Working with Tables:
Tables organize data into rows and columns for better presentation and
analysis.
Word processors offer tools to create, format, and manipulate tables.
Functions include adding/deleting rows/columns, merging/splitting cells, and
applying borders/shading.

Graphics and Frames:


Graphics like images, shapes, and SmartArt enhance document visuals.
Frames are containers for text, images, or other elements, allowing precise
positioning and formatting.
They help illustrate concepts, highlight information, and improve document
layout.

Mail Merge:
Mail merge combines a template document with a data source to generate
personalized documents.
Data sources can be spreadsheets, databases, or contact lists.
Merge fields in the template pull data from the source to create individualized
documents efficiently.

Automating Your Work:


Automation tools in word processors streamline repetitive tasks and workflows.
Macros record and playback sequences of commands and actions.
Templates offer pre-designed formats for consistent document creation.
AutoText and AutoCorrect features automatically correct or expand text as you
type.

Printing Documents:
Printing options allow customization of output based on printing needs.
Users can select printers, specify page ranges, adjust settings like orientation
and paper size, and preview documents before printing.
Printing ensures hard copies of documents for distribution, archiving, or
reference.

MS-EXCEL
MS-EXCEL is a part of Microsoft Office suite software. It is an electronic spreadsheet with
numerous rows and columns, used for organizing data, graphically representing data(s), and
performing different calculations. It consists of 1048576 rows and 16384 columns, a row and
column together make a cell. Each cell has an address defined by column name and row
number example A1, D2, etc. This is also known as a cell reference
What is MS Excel
Microsoft Excel is a software application designed for creating tables to input and organize
data. It provides a user-friendly way to analyze and work with data. The image below
provides a visual representation of what an Excel spreadsheet typically appears like

Excel Interface

What is a Cell
A spreadsheet takes the shape of a table, consisting of rows and columns. A cell is created
at the intersection point where rows and columns meet, forming a rectangular box. Here’s an
image illustrating what a cell looks like:
What is Cell Address or Cell Reference
The address or name of a cell or a range of cells is known as Cell reference. It helps the
software to identify the cell from where the data/value is to be used in the formula. We can
reference the cell of other worksheets and also of other programs.
 Referencing the cell of other worksheets is known as External referencing.
 Referencing the cell of other programs is known as Remote referencing.
There are three types of cell references in Excel:
1. Relative reference.
2. Absolute reference.
3. Mixed reference.

Features of MS Excel
Ribbon
Th eRibbon in MS-Excel is the topmost row of tabs that provide the user with different
facilities/functionalities. These tabs are:
It provides the basic facilities like changing the font, size of text, editing the cells in the
spreadsheet, autosum, etc.
Insert Tab
It provides the facilities like inserting tables, pivot tables, images, clip art, charts, links, etc.
Page layout
It provides all the facilities related to the spreadsheet-like margins, orientation, height, width,
background etc. The worksheet appearance will be the same in the hard copy as well.
Formulas
It is a package of different in-built formulas/functions which can be used by user just by
selecting the cell or range of cells for values.
Data
The Data Tab helps to perform different operations on a vast set of data like analysis through
what-if analysis tools and many other data analysis tools, removing duplicate data, transpose
the row and column, etc. It also helps to access data(s) from different sources as well, such
as from Ms-Access, from web, etc.
Review
This tab provides the facility of thesaurus, checking spellings, translating the text, and helps
to protect and share the worksheet and workbook.
View
It contains the commands to manage the view of the workbook, show/hide ruler, gridlines,
etc, freezing panes, and adding macros.

How to Create a New Spreadsheet


In Excel 3 sheets are already opened by default, now to add a new sheet :
 In the lowermost pane in Excel, you can find a button.
 Click on that button to add a new sheet.
 We can also achieve the same by Right-clicking on the sheet number before which
you want to insert the sheet.
 Click on Insert.
How to Open an Existing Worksheet
On the lowermost pane in Excel, you can find the name of the current sheet you have
opened.
On the left side of this sheet, the name of previous sheets are also available like Sheet 2,
Sheet 3 will be available at the left of sheet4, click on the number/name of the sheet you
want to open and the sheet will open in the same workbook.
For example, we are on Sheet 4, and we want to open Sheet 2 then simply just click on
Sheet2 to open it.
Managing the Spreadsheets
You can easily manage the spreadsheets in Excel simply by :
 Simply navigating between the sheets.
Right-clicking on the sheet name or number on the pane.
Choose among the various options available like, move, copy, rename, add, delete etc.
You can move/copy your sheet to other workbooks as well just by selecting the workbook in
the To workbook and the sheet before you want to insert the sheet in Before sheet.
How to Save the Workbook
1. Click on the Office Button or the File tab.
2. Click on Save As option.
3. Write the desired name of your file.
4. Click OK.
How to Share your Workbook
1. Click on the Review tab on the Ribbon.
2. Click on the share workbook (under Changes group).
3. If you want to protect your workbook and then make it available for another user
then click on Protect and Share Workbook option.
4. Now check the option “Allow changes by more than one user at the same time.
This also allows workbook merging” in the Share Workbook dialog box.
5. Many other options are also available in the Advanced like track, update changes.
6. Click OK.
Ms-Excel shortcuts
1. Ctrl+N: To open a new workbook.
2. Ctrl+O: To open a saved workbook.
3. Ctrl+S: To save a workbook.
4. Ctrl+C: To copy the selected cells.
5. Ctrl+V: To paste the copied cells.
6. Ctrl+X: To cut the selected cells.
7. Ctrl+W: To close the workbook.
8. Delete: To remove all the contents from the cell.
9. Ctrl+P: To print the workbook.
10. Ctrl+Z: To undo.
What is the Latest Versions of Excel
The most recent edition of Microsoft Excel is part of MS Office 2019, which is the
latest version of the Microsoft Office suite. It comes packed with numerous new
features introduced by Microsoft.
Three major components of a presentation program are:
(i) An editor that allows text to be input and formatted
(ii) a means for inserting visual pictures, audio, and video
(iii) and a slide-show system to display the final content.
How to open MS PowerPoint
In Windows 8/above:
Step 1: Press Windows + c to open the search bar

Step 2: Type PowerPoint & click on the MS Office version you are having in your
system. MS Office window will pop up.
In Windows 7 or below:
Step 1: Go to the program section in the windows start menu.
Step 2: Go to MS Office & click on it. A drop-down list is seen
Step 3: Click on MS PowerPoint & MS PowerPoint window will pop up.
Creating a Presentation
Once your MS PowerPoint Window pops up, you can create & save the file by:
Step 1: Click on the Microsoft button on the top left.
Step 2: Click on new, a new Presentation window will pop up.

Step 3: Click on Create & a new presentation will be created.


Saving a Presentation
Once you have created a presentation, it can be easily saved with the help of
following steps:
Step 1: Click on the Microsoft icon
Step 2: Click on the Save button

Step 3: A new Window for Save As will pop up.


Step 4: Select the drive (by clicking on it: Example: Local Drive (D)) in which
you want to save the presentation. Then your drive will open up, select the
folder in which you want to save the presentation (Example: img folder here) &
then give the required name to your presentation (Example: MyPresentation
here). Your presentation is created & saved with the provided name.

Basic Elements of a PowerPoint Window/Slide


You can see various bars in the presentation window. They are:
(i) Title Bar: This shows the name/title given by you to the current presentation. If
user do not save the presentation by any name, default name given by MS
PowerPoint appears in this bar.
(ii) Menu Bar: Contains menu items like insert, views, design, animations, etc.
(iii) Office Button: MS Office button on the left-most top.
(iv) Formatting Toolbar: Have tools like Bold, Italic, Underline, Font shape & size
etc. to format your data.

(v) Zoom Slider: To zoom in or zoom out your presentation.


(vi) Slide Sorter Pane: This allows us to choose which slides will be shown in which
sequence during the slide show.
(vii) Notes Pane: This allows us to type notes that we may require later when
preparing for the presentation, but they will not be displayed during the slide show.
(viii) View Buttons: Provides different views of your presentation like : normal, slide
show & slide sorter.
(ix) Slide Pane: This is where we type, format, and otherwise design the slide.
Concept of Slide Shows
After preparing the presentation, it’s time for the slide show. Steps for slide show are:
Step 1. Click on the view Option on the top Menu Toolbar
Step 2. Click on the slide show option.
Insert a picture from your computer
on your slide

1. Click where you want to insert the picture on the


slide.
2. On the Insert tab, in the Images group,
click Pictures and then click This Device.

In the dialog box that opens, browse to the picture that you want to insert, click that picture, and then
click Insert.

Insert stock images on your slide


1. Click where you want to insert the picture on the
slide.
2. On the Insert tab, in the Images group, click Pictures and then click Stock
Images.
3.Type in what image you're looking for, then click on which
images you want and click Insert.

Adding animations and videos

1. Animation in PowerPoint means to add a special visual or sound effect to text or an


object. For example, you can have your text bullet points fly in from the left, one word at
a time, or hear the sound of applause when a picture is uncovered. You can animate
any number of objects on a slide, and you can even animate elements of a chart.
2. Videos (movies) can be added to PowerPoint presentations.
3. An animated GIF is a file that contains a series of GIF images that are displayed in
rapid sequence to produce an animated effect.

To animate text and objects

Click on View, then

Click on Normal

and display the slide that has the text or objects you want to animate.

On the Slide Show menu bar

Click Custom Animation, and then

Click the Effects tab.


Under Check to animate slide objects, select the check box next to the text or object you
want to animate.

In the illustrated example the text will be animated, and will Fly in From left.

Repeat for every object you want to animate.

To change the order of animation:

Click the Order & Timing tab.

Under Animation order select the object you want to change, and then click one of the arrows
to move the object up or down in the list.

To view the animation:

Click Slide Show, then

Click on View Show

Display the slide you want to add the video to.

Click on the Insert menu

Click on Movies and Sounds.

Do one of the following:

1. To insert a video from the Clip Gallery, click Movie from Gallery, and then locate and insert
the video you want.
2. To insert a video from another location, click Movie from File, locate the folder that contains the
video, and then double-click the video you want.

Position the video clip on the slide. To view click Slide Show, then View Show.
Display the slide you want to add the animated GIF picture to.

Do one of the following:

1. To insert an animated GIF picture from the Clip Gallery, click Insert Clip Art on
the Drawing toolbar and then click the Motion Clips tab.
2. To insert an animated GIF picture from a file, on the Insert menu, point to Picture, and then
click From File. To view the animated GIF picture, click Slide Show, then View Show

Unit – IV Basics of Internet

WHAT IS THE INTERNET?

INTRODUCTION
The Internet is an increasingly
important part of everyday life for
people around the world. But if you've
never used the Internet before, all of
this new information might feel a bit
confusing at first.

Throughout this tutorial, we'll try to


answer some basic questions you may
have about the Internet and how it's
used. When you're done, you'll
have a good
understanding of how the Internet works, how to connect to the
Internet, and how to browse the Web
WHAT IS THE INTERNET?
The Internet is a global network of billions of computers and other electronic
devices. With the Internet, it's possible to access almost any information, communicate
with anyone else in the world, and do much more.

You can do all of this by connecting a computer to the Internet, which is also called
going online. When someone says a computer is online, it's just another way of saying
it's connected to the Internet.

W HAT IS THE W EB?


The World Wide Web—usually called the
Web for short—is a collection of different
websites you can access through the
Internet. A website is made up of related
text, images, and other resources.
Websites can resemble other forms of
media—like newspaper articles or
television programs—or they can be
interactive in a way that's unique to
computers.

The purpose of a website can be almost


anything: a news platform, an
advertisement, an online library, a forum
for sharing images, or an educational site
like us!

Once you are connected to the Internet, you can access and view websites using a type of
application called a web browser. Just keep in mind that the web browser itself is not the
Internet; it only displays websites that are stored on the Internet.

HOW DOES THE INTERNET WORK?


At this point you may be wondering, how does the Internet work? The exact answer
is pretty complicated and would take a while to explain. Instead, let's look at some of
the most important things you should know.

It's important to realize that the Internet is a global network of physical cables, which
can include copper telephone wires, TV cables, and fiber optic cables. Even wireless
connections like Wi-Fi and 3G/4G rely on these physical cables to access the Internet.

When you visit a website, your computer sends a request over these wires to a server.
A server is where websites are stored, and it works a lot like your computer's hard
drive. Once the request arrives, the server retrieves the website and sends the correct
data back to your computer. What's amazing is that this all happens in just a few
seconds!

OTHER THINGS YOU CAN DO ON THE INTERNET


One of the best features of the Internet is the ability to communicate almost instantly
with anyone in the world. Email is one of the oldest and most universal ways to
communicate and share information on the Internet, and billions of people use it.
Social media allows people to connect in a variety of ways and build communities
online.

There are many other things you can do on the Internet. There are thousands of
ways to keep up with news or shop for anything online. You can pay your bills,
manage your bank accounts, meet new people, watch TV, or learn new skills.
You can learn or do almost anything online.

For example, let's say you're looking for a new pair of shoes. You could use a search engine to
learn about different types of shoes, get directions to a nearby shoe store, or even find out where
to buy them online!

There are many different search engines you can use, but some of the most popular include
Google, Yahoo!, and Bing.
EMAIL

Short for electronic mail, email is a way to send and receive messages across the Internet.
Almost everyone who uses the Internet has their own email account, usually called an
email address. This is because you'll need an email address to do just about anything online,
from online banking to creating a Facebook account.
SOCIAL NETWORKING
Social networking websites are another way to connect and share with your family and friends
online. Rather than sharing with just a few people over email, social networks make it easier to
connect and share with many people at the same time. Facebook is the world's largest social
networking site, with more than 1 billion users worldwide .

CHAT AND INSTANT MESSAGING


Chat and instant messaging (IM) are short messages
sent and read in real time, allowing you to converse more
quickly and easily than email. These are generally used
when both (or all) people are online, so your message can
be read immediately. By comparison, emails won't be seen
until recipients check their inboxes.
Examples of instant messaging applications include
Yahoo Messenger and Google Hangouts. Some
sites, like Gmail and Facebook, even allow you to
chat within your web browser.

ONLINE MEDIA
Many sites allow you to watch videos and listen to music. For example, you can watch millions
of videos on YouTube or listen to Internet radio on Pandora. Other services, like Netflix and
Hulu, allow you to watch movies and TV shows. And if have a set-top streaming box, you can
even watch them directly on your television instead of a computer screen.
EVERYDAY TASKS
You can also use the Internet to complete many everyday tasks and errands. For example, you
can manage your bank account, pay your bills, and shop for just about anything. The main
advantage here is convenience. Rather than going from place to place, you can do all
of these tasks at home!

CONNECTING TO THE INTERNET

HOW DO I CONNECT TO THE INTERNET?


Once you've set up your computer, you may want to purchase home Internet access so you
can send and receive email, browse the Web, stream videos, and more. You may even want
to set up a home wireless network, commonly known as Wi-Fi, so you can connect multiple
devices to the Internet at the same time.

 Dial-up: This is generally the slowest type of Internet connection, and you
should probably avoid it unless it is the only service available in your area. Dial-
up Internet uses your phone line, so unless you have multiple phone lines you
will not be able to use your landline and the Internet at the same time.
 DSL: DSL service uses a broadband connection, which makes it much faster
than dial-up. DSL connects to the Internet via a phone line but does not require
you to have a landline at home. And unlike dial-up, you'll be able to use the
Internet and your phone line at the same time.
 Cable: Cable service connects to the Internet via cable TV, although you do
not necessarily need to have cable TV in order to get it. It uses a broadband
connection and can be faster than both dial-up and DSL service; however, it is
only available where cable TV is available.
 Satellite: A satellite connection uses broadband but does not require cable or
phone lines; it connects to the Internet through satellites orbiting the Earth.
As a result, it can be used almost anywhere in the world, but the connection may
be affected by weather patterns. Satellite connections are also usually slower
than DSL or cable.
 3G and 4G: 3G and 4G service is most commonly used with mobile
phones, and it connects wirelessly through your ISP's network. However,
these types of connections aren't always as fast as DSL or cable. They will
also limit the amount of data you can use each month, which isn't the case
with most broadband plans.

CHOOSING AN INTERNET SERVICE PROVIDER


Now that you know about the different types of Internet service, you can do some research to
find out what ISPs are available in your area. If you're having trouble getting started, we
recommend talking to friends, family members, and neighbors about the ISPs they use. This
will usually give you a good idea of the types of Internet service available in your area.

Most ISPs offer several tiers of service with different Internet speeds, usually measured
in Mbps (short for megabits per second). If you mainly want to use the Internet for email and
social networking, a slower connection (around 2 to 5 Mbps) might be all you need. However,
if you want to download music or stream videos, you'll want a faster connection (at least 5
Mbps or higher).

You'll also want to consider the cost of the service, including installation charges and monthly
fees. Generally speaking, the faster the connection, the more expensive it will be per month.

Although dial-up has traditionally been the least expensive option, many ISPs have raised
dial-up prices to be the same as broadband. This is intended to encourage people to switch
to broadband. We do not recommend dial-up Internet unless it's your only option.

HARDWARE NEEDED
MODEM
Once you have your computer, you really don't need
much additional hardware to connect to the Internet. The
primary piece of hardware you need is a modem.

The type of Internet access you choose will


determine the type of modem you need. Dial-up
access uses a telephone modem, DSL
service uses a DSL modem, cable access uses
a cable modem, and satellite service uses a
satellite adapter. Your ISP may give you a
modem—often for a fee—when you sign a
contract, which helps ensure that you have the
right type of modem. However, if you would
prefer to shop for a better or less expensive
modem, you can choose to buy one separately.

ROUTER
A router is a hardware device that allows you
to connect several computers and other
devices to a single Internet connection,
which is known as a home network. Many
routers are wireless, which allows you to
create a home wireless network, commonly
known as a Wi-Fi network.

You don't necessarily need to buy a router to


connect to the Internet. It's possible to connect your
computer directly to your modem using an Ethernet
cable. Also, many modems include a built-in router,
so you have the option of creating a Wi-Fi network
without buying extra hardware.

UNDERSTANDING THE CLOUD

W HAT IS THE CLOUD?


You may have heard people using terms like the cloud, cloud computing, or cloud
storage. But what exactly is the cloud?

Simply put, the cloud is the Internet—more specifically, it's all of the things you can
access remotely over the Internet. When something is in the cloud, it means it's
stored on Internet servers instead of your computer's hard drive.

WHY USE THE CLOUD?


Some of the main reasons to use the cloud are convenience and reliability. For example, if
you've ever used a web-based email service, such as Gmail or Yahoo! Mail, you've
already used the cloud. All of the emails in a web-based service are stored on servers rather
than on your computer's hard drive. This means you can access your email from any computer
with an Internet connection. It also means you'll be able to recover your emails if something
happens to your computer.
Let's look at some of the most common reasons to use the cloud.

USING A WEB BROWSER


A web browser is a type of software that allows you to find and view websites on the Internet.
Even if you didn't know it, you're using a web browser right now to read this page! There are
many different web browsers, but some of the most common ones include Google Chrome,
Internet Explorer, Safari, and Mozilla Firefox.
No matter which web browser you use, you'll want to learn the basics of browsing the Web. In
this lesson, we'll talk about navigating to different websites, using tabbedbrowsing, creating
bookmarks, and more.

Watch the video below to learn the basics of using a web browser.

We'll be using the Google Chrome web browser throughout this lesson, but you can use any
browser you want. Keep in mind that your browser may look and act a bit differently, but all web
browsers work in basically the same way.

URLS AND THE ADDRESS BAR


Each website has a unique address, called a URL (short for Uniform Resource Locator). It's
like a street address that tells your browser where to go on the Internet. When you type a URL
into the browser's address bar and press Enter on your keyboard, the browser will load the
page associated with that URL.

LINKS
Whenever you see a word or phrase on a website that's blue or underlined in blue, it's
probably a hyperlink, or link for short. You might already know how links work, even if you've
never thought about them much before.

Links are used to navigate the Web. When you click a link, it will usually take you to a different
webpage. You may also notice that your cursor changes into a hand icon whenever you hover
over a link.

NAVIGATION BUTTONS
The Back and Forward buttons allow you to move through websites you've recently viewed.
You can also click and hold either button to see your recent history.
The Refresh button will reload the current page. If a website stops working, try using the Refresh
button.
Unit V Introduction to Programming Environment

A Programming language is the language through which user can communicate with the computer by
writing program instructions. Every computer programming language contains a set of predefined words
and a set of rules (syntax) that are used to create instructions of a program. The Computer
programming languages are classified as –

1) Low Level Language

2) Middle Level Language

3) High Level Language 1) Low Level Language Low level language is also known as Machine
Language. Machine language is also known as Machine code. Binary language is an example of low
level language. The binary language contains only two symbols 1 and 0. All the instructions of binary
language are written in the form of binary numbers 1’s and 0’s. A computer can directly understand the
binary language. Low Level language is as the First generation language.

Advantages
 A computer can easily understand the low level language.
 Low level language instructions are executed directly without any translation.
 Low level language instructions require very less time for their execution.
Disadvantages
 Low level language instructions are very difficult to use and understand.
 Low level language instructions are machine dependent, that means a program written for a particular
machine does not executes on other machine.
 In low level language, there is very difficult to find errors, debug and modify.

2) Middle Level Language

Middle level language is also known as Assembly language or Symbolic language. Assembly language
is an example of Middle level language. In Assembly language, the instructions are created using
symbols such as letters, digits and special characters. In assembly language, we use predefined words
called mnemonics. A program written is an assembly language using mnemonics called assembly
language program or symbolic program. The process of translating an assembly language program into
its equivalent machine language program with the use of an assembler. Assembler is used to translate
middle level language to low level language.

Figure -1: Translate assembly language program into machine language


Advantages

 In middle level language, writing instructions is easier.


 Middle level language is more reliable.
 Middle level language is easy to understand, find error and modify.
Disadvantages

 Middle level language is machine dependent.


 Middle level language needs to be translated into low level language.
 Middle level language executes slower compared to low level language.
2) High Level Language
High level can be easily understood by the users. It is very similar to the human language
and has a set of grammar rules that are used to make instructions more easily. Every high
level language has a set of predefined words known as keywords and a set of rules known
as syntax. High level language is a programming language. Languages like COBOL,
BASIC, FORTRAN, C,C++, JAVA etc. All these programming languages are to write
program instructions. These instructions are converted to low level language by the
complier or interpreter.
Advantages

 Writing instructions in high level language is easier.


 High level language is readable and understandable.
 High level language program can runs on different machines without any modification.
 It is easy to understand, create programs, find errors and modify.
Disadvantages

 High level language instructions need to be translated to low level language by using
compiler or interpreter.
 Slower in execution as compared to low level and middle level language.
 Lack of flexibility.
 Lower efficiency.

Generation Languages Development Example


Date
First Machine Language 1940s 10101111
Second Assembly Language 1950s MOV
Third High Level Language 1960s Read Sales
Fourth Query and Database 1970s Select * from emp
Languages
Table -1: Evolution of Programming Languages

Programming Language Translator

A programming language translator is a software that translate computer program


(instructions) written in some specific programming language into another programming
language. A program written in high level language is called source code. To convert the
source code into machine code, translators are needed.

There are three types of programming language translator –


1) Compliers
2) Interpreters
3) Assemblers
4) Linker and Loader
1) Compliers
Compiler is a translator which is used to convert programs in high level langue to low level
language. It translates the entire program that is group of statements at a time and also
reports the errors in source program encountered during the translation.

Figure - 2: Compiler translator

2) Interpreters
Interpreter is a translator which is used to convert programs in high level language to
low level language. Interpreter translates line by line statements and reports the error
once it encountered during the translation process. It gives better error diagnostics than
a compiler.

Figure – 3: Interpreter translator

3) Assemblers
Assembler is a translator which is used to translate the assembly language code into
machine language code.

Figure – 4: Assembly translator


4) Linker and Loader
Linker is a computer program that links and merges various object files together in
order to make an executable file. All these files might have been compiled by separate
assembler.
The major task of a linker is to search and locate referenced module/routines in a program
and to determine the memory location where these codes will be loaded making the
program instruction to have absolute reference.

Loader is a part of operating system and is responsible for loading executable files
into memory and executes them.

It calculates the size of a program (instructions and data) and cerates memory space
for it. It initializes various registers to initiate execution.

Figure -4 : Process of Linker and Loader

Differentiate between Compiler and Interpreter


Compiler Interpreter
1) Compiler executes set of 1) Interpreter executes only one
instructions at instruction
a time. at a time.
2) Execution is faster. 2) Execution is slower.
3) It requires more memory for the 3) It requires efficient memory as no
generated intermediate object code. Intermediate object code is
generated.
4) It is difficult to debug. 4) It is easy to debug.
5) Locating an error is not instant. 5) Locating an error is instant.
6) C, C++ etc is an example of compiler 6) Python, BASIC, Ruby etc is an
example
of interpreter.
Data Structures and Algorithms

What is Data Structure:


A data structure is a storage that is used to store and organize data. It is a way of
arranging data on a computer so that it can be accessed and updated efficiently.
A data structure is not only used for organizing the data. It is also used for
processing, retrieving, and storing data. Different basic and advanced types of data
structures are used in almost every program or software system that has been
developed. So we must have good knowledge of data structures.
Data structures are an integral part of computers used for the arrangement of data
in memory. They are essential and responsible for organizing, processing,
accessing, and storing data efficiently. But this is not all. Various types of data
structures have their characteristics, features, applications, advantages, and
disadvantages. So how do you identify a data structure that is suitable for a
particular task? What is meant by the term ‘Data Structure’? How many types of
data structures are there and what are they used for?
How Data Structure varies from Data Type:
We already have learned about data structure. Many times, what happens is that
people get confused between data type and data structure. So let’s see a few
differences between data type and data structure to make it clear.
Data Type Data Structure

The data type is the form of a variable Data structure is a collection of


to which a value can be assigned. It different kinds of data. That entire data
defines that the particular variable will can be represented using an object
assign the values of the given data and can be used throughout the
type only. program.

It can hold value but not data. It can hold multiple types of data within
Therefore, it is dataless. a single object.

The implementation of a data type is Data structure implementation is


known as abstract implementation. known as concrete implementation.

There is no time complexity in the In data structure objects, time


case of data types. complexity plays an important role.

While in the case of data structures,


In the case of data types, the value of the data and its value acquire the
data is not stored because it only space in the computer’s main memory.
represents the type of data that can be Also, a data structure can hold
stored. different kinds and types of data within
one single object.
Data Type Data Structure

Data type examples are int, float, Data structure examples are stack,
double, etc. queue, tree, etc.

Definition of Algorithm

The word Algorithm means ” A set of finite rules or instructions to be followed in


calculations or other problem-solving operations ”
Or
” A procedure for solving a mathematical problem in a finite number of steps that
frequently involves recursive operations”.

Time Complexity-
The valid algorithm takes a finite amount of time for execution. The time required
by the algorithm to solve given problem is called time complexity of the algorithm.
Time complexity is very useful measure in algorithm analysis.
Space Complexity:
Definition –
Problem-solving using computer requires memory to hold temporary data or final
result while the program is in execution. The amount of memory required by the
algorithm to solve given problem is called space complexity of the algorithm.
Linked Lists:

Linked lists are dynamic data structures composed of nodes, where each node
contains data and a pointer to the next node. Linked lists are useful in scenarios that
involve frequent insertion and deletion of elements, such as:

o Memory Management: Linked lists play a vital role in memory management


systems. They enable efficient allocation and deallocation of memory blocks by
maintaining a linked structure that allows for easy insertion and deletion.
o Implementing Other Data Structures: Linked lists are fundamental in
implementing other dynamic data structures such as stacks, queues, and hash
tables.
o Polynomial Manipulation: In algebraic calculations, linked lists are used to
represent and manipulate polynomials efficiently. Each node in the linked list
represents a term in the polynomial, with its coefficient and exponent stored as
data.

Stacks:

Stacks follow the Last-In-First-Out (LIFO) principle, where the last element inserted is
the first one to be removed. Stacks find applications in several areas, including:

o Expression Evaluation and Conversion: Stacks are extensively used in


evaluating and converting expressions. Infix to postfix conversion, postfix
evaluation, and balancing parentheses are common applications of stacks in
expression manipulation.
o Function Call Stack: Stacks are essential for managing function calls in
programming languages. When a function is called, the function's local
variables and return address are pushed onto the stack, allowing for proper
execution and return flow.
o Backtracking Algorithms: Backtracking algorithms, such as depth-first
search (DFS), rely on stacks to keep track of visited nodes and potential paths.
The stack stores the state information required to backtrack and explore
alternative paths.

Queues:

Queues adhere to the First-In-First-Out (FIFO) principle, where elements are inserted
at the rear and removed from the front. Queues have various applications, including:
o Job Scheduling: Queues are used in operating systems and task
management systems for job scheduling. The first-in-first-out (FIFO) nature of
queues ensures fairness and proper execution order.
o Breadth-First Search (BFS) Algorithms: BFS algorithms explore graphs in a
level-by-level manner, making queues an ideal data structure for maintaining
the order of traversal.
o Printers' Job Management: In spooling systems, queues are employed to
manage print jobs, ensuring that they are processed in the order they were
received.

Trees:

Trees are hierarchical data structures consisting of nodes connected by edges. They
enable efficient searching, insertion, and deletion operations, and are utilized in
numerous applications:

o File Systems: File systems utilize tree structures to represent directory


hierarchies. Each node in the tree represents a directory, with child nodes
representing subdirectories and files.
o Database Indexing: Trees are extensively used in database indexing for
efficient searching and retrieval of records. B-tree and B+-tree structures are
commonly employed to organize and store large volumes of data.
o Hierarchical Relationships: Trees are useful for representing hierarchical
relationships in organizations, XML, and JSON data. They allow for efficient
navigation and management of hierarchical data.
o Decision-Making Processes: Decision trees and game trees are employed in
decision-making processes, such as machine learning algorithms and game AI,
to model choices and outcomes.

Graphs:

Graphs are versatile data structures comprising vertices (nodes) interconnected by


edges. Graphs have broad applications in areas such as:

o Social Network Analysis: Graphs are used to model and analyze social
networks, enabling applications such as friend recommendations, community
detection, and influence analysis.
o Network Routing Algorithms: Graphs are essential in network routing
algorithms, determining the shortest or optimal path between nodes. Dijkstra's
algorithm and Bellman-Ford algorithm rely on graphs for efficient routing.
o Web Page Ranking: Graph-based algorithms like Google's PageRank employ
graphs to rank web pages based on their importance and connectivity within
the web graph.
o Bioinformatics and Computational Biology: Graphs are utilized to model
and analyze biological networks, such as protein-protein interaction networks
and gene regulatory networks.

You might also like