Odisha Adarsha Vidyalaya Sangathan
hubaneswar
Department of School and Mass Education, OdishaCHAPTE
INFORMATION THREATS & SECURITY
1.1 INTRODUCTION OF THREATS
In today’s world, everyone knows that
information is a valuable asset and should be
& protected. The data in computer should be
secured and accessible only for the authorized
person. There are number of reason which
causes the damage of data, i.e. threat. Some
of the popular threats for computer are
Computer Virus, Trojans, Malware, Cyber Crime
© and Hacking etc.
&
Bi
Fe
Objectives
> Know about computer thre
> Causes for computer threats
> Cyber crime
> Hacking & software piracy
Tips to protect your computer from
ow about Cryptography, Firewall,
‘Digital Signature, Public and Private Key.
Athreat, in the context of computer
security, refers to anything that has the
Potential tocause serious harm to a computer
system.
0, /A threat
happen, but has the potential to cause serious
z damage“A threat can be either “intentional”
& (ie,, intelligent; e.g., an individual cracker or a
© criminal organization) or “accidental” (e.g., the
possibility of a computer malfunctioning, or the
possibility of a natural disaster such as an
earthquake, a fire, or a tornado) or otherwise
a circumstance, capability, action, or event.
pe eal dace ate)
omething that may or may not
= Worm
There are various types of threats for = Spoofing
© computer information, such as: oe Givecre
Malware Adware
© Virus = Spam
= Trojan Horse =
Phishing{) 4 )mtalware is short for “malicious software”,
alware is programming or files that are
developed for the purpose of doing harmThus,
malware includes computer viruses, worms,
Trojan horses, spyware, hijackers, and certain
type of adwares
Malware any kind of unwanted software
[Link] installed without your adequate consent.
CA. virus stands for “Vital_Information
Resource Under Seize”. Virus is a program or set
of programs that disrupts the normat operation
of the computer. It enters into the computer
without permission or knowledge of the user.
There are two types of VIRUS, such as:
1. Boot Sector Virus
A Boot Sector Virus infects the first sector
of the hard drive, where the Master Boot
Record (MBR) is stored.
Michelangelo and Stoned.
2. File / Program Virus
Some files/programs, when executed, load
the virus in the memory and perform
predefined functions to infect the system. They
infect program files with extensions like .EXE,
.COM, .BIN, .DRV and .SYS.
Trojan horse is a program that acts as a
malicious or harmful code. it designed to cause
some malicious activity or to provide a
backdoor to your system. Trojan horses have
no way to replicate automatically.
Beast, Rat, Netbus, Girl friend
etc,Note: The 1* PC VIRUS was a boot sector virus named as Brain released in 1987 by Alvi
brothers in Lahore, Pakistan.
Popular Viruses are — Jerusalem & Israeli, Ping Pong & Dark Avenger.
1.2.4 Worm
computer program that replicates itself in order
to spread to other computers. Often, it uses a
computer network to spread itself, relying on
security failures on the target computer to
.ccess it. Some examples are:
=
| Brontok: Spread through an Indonesian
&
| A computer worm is a standalone malware
y" 's some pictures for you ! o
PICSOUBE
e-mail headed with “stop the collapse in this country”; destroys firewalls.
Code Red: This worm allows hackers to hack your complete network from the location. This
infection allows hackers to steal data like credit card numbers, passwords, and other personal
information.
Mydoom: It is Fastest-spreading e-mail worm.
1.2.5 Spyware
k) It is software that secretly collects user_
information ile on internet. Spyware can
capture information like web browsing habits,
emai messages, user name and passwords and
credit card information. Spyware does not
necessarily spread in the same way as a virus or
‘worm. Most common example is
Key-logger also called a keystroke logger,
key logger, or system monitor, is a hardware device or small program that monitors each keystroke
2 user types. ‘s
1.2.6 Adware
J) Adware, or advertising-supported software,
‘is any software package that automatically
ders advertisements in order to generate
enue for its author. The advertisements may
the user interface of the software or on a
screen presented to the user during the
installation process.1.2.7 Spam
These are unwanted e-mails,SMS,MMS. In other words we can call them as unsolicited
promotional mail.
Bajaj Finserv
Kent RO Systems
1.2.8 Phishing
Phishing is a form of fraud in which the
attacker tries to learn information such as login
credentials or account information by
, ALVA Nk AARNE ER WY
= masquerading as a reputable entity or person
& in email, instant messaging (IM) or other
communication channels.
Spoofing
it is a type of scam wi in_ intruder
attempts to gain unauthorized
1.2.10 Ransomware
More ~
Delete all spam messages now (messages that have been in Spam more than 30 days will
‘be automatically deleted)
[Link]
Miss Suzan Patrick
[Link]
‘Ventura Securities Ltd.
115098 <>
Mar 22
Mar 22
Mar 21
Mar 21
Mar 20
Mar 20
Mar 20
Mar19
Dhruba, Confusion Ruling
PL with a Line of Credit ar
Greetings, - Greetings, Son
Dhruba, Get Glimpse Of ¥
Protect your family from ¥
Zero Ale Opening , Zero A
Dhruba, Hurry, Get Career
Dhruba, Nothing But The!
Dnruba, Your Weekly Pred
cow eee,
Inedfotonde ace oom se nme
‘diceememysrersgoesn tested |
ido ex eect a 40nd ;
foro
Sieyaroe be um tecev ton osm yor eve ~
‘pice art
Sate mmr azart oberon
{rove ry gts, owe ows.
Ts
Toon Tom
access to a users system or information by pretending to be the.
user. It is illegal use of your e-mail address by a stranger.
S
Ransomware is a type of malware that prevents or restricts access to your computer system 5
and demands that a ransom is paid in order for the restriction to be removed.
Ransomware is created by scammers who are highly knowledgeable in computer
programming. It can enter your PC through an email attachment or through your browser if youCee ae ee Ec, |
|What Happened to My Computer?
Your important files are encrypted.
IMany of your documents, photos, videos, databases and other files are no longer
accessible because they have been encrypted. Maybe you are busy looking for away to
recover your Miles, but do not waste your time. Nobody can recover your files without
jour decryption service.
Can I Recover My Files?
Sure. We guarantee that you can recover all your files safely and easily. But you have
not so enough time.
You can decrypt some of your files for free. Try now by clicking
[J But ifyou want to decrypt all your files, you need to pay.
You only have 3 days to submit the payment. After that the price will be doubled.
pay in 7 days, you won'tbe able to recover your files forever.
[We will hava free events for users who ara so poor that thay couldn't pay in 6 monthe
|How Do I Pay?
Payment is accepted in Bitcoin only. For more information click
Please check the current price of Bitcoin and buy some bitcoins For more information,
click
[And send the correct amount to the address specified in thls window.
) :) bitcoin)
happen to visit a website that is infected with this type of malware. It can also access your PC via
your [Link] has affected over 150 countries within a week.
Example: WannaCry.
1.3. HOW THREADS SPREAD
As modern computer technology and communications tools develop, hackers have more
opportunities for spreading threats. The threats can spread through using Internet, intranet,
e-mail and Removable Storage Media (floppies, CD/DVD-ROM’s, and USB flash drives) are widely
used for storing and transmitting information.
DIFFERENT TYPES OF POTENTIAL ATTACK
®» Unauthorized access
Virus attack
Worm attack SS
Trojan Attack
E-mail crimes
Email spoofing
ewe ee
Email bombing1.4. CYBER CRIME
Cyber crime means illegal activity of computer [Link] is defined as a criminal or illegal
activity which uses computer network and internet. Criminal who perform these illegal activities
is often referred to as hackers. Cyber criminal use computer technology to access personal
information, business trade secrets, uses the internet for exploitive malicious purpose. Cyber
crime includes:
Cyber stalking
Hacking
Online Fraud
Software Piracy
way Vv oCv
Pornography
1.4.1 Cyber Stalking *
Cyber stalking is the use of the Internet or
electronics to stalk or harass an individual, an
organization or a specific group. Cyber stalking
can include monitoring someone's activity real-
time, or while on the computer or device in
the current moment, or while they are offline,
or not on the computer or electronic device.
1.4,2 Hacking and Cracking
2
NYA Hacker is a person who is extremely
interested in exploring the things and workings
of any computer system or networking system.
Most often, hackers are expert programmers.
These are also called Ethical Hackers or white
hat hackers. The technique used by them is
called ethical hacking.
These types of hackers protect the cyber
world from every possible threat and fix
potential future security loop holes. These
peoples are also called the “GURU’s” of
Computer Security.
6) [Link] White Hat Hacker
Awhite hat hacker is a computer security specialist
who breaks into protected systems and networks to test
and asses their security. White hat hackers’ use their
skills to improve security by exposing vulnerabilities
before malicious hackers (known as black hat hackers)
can detect and exploit them.
Famous White Hat Programmers are : Stephan
} Wozniak, Tim Berners Lee, Linus Torvalds, Ankit Fadia.
EMI) a cracker (alco known as a black hat. hacker) lc anil
individual with extensive computer knowledge whose
purpose is to gain access to software without paying royalties.
The general view is that, while hackers build things,
crackers break things.
Cracker is the name given to hackers who break into
computers for criminal gain.
They may steal credit card numbers, leave viruses, hack
of email password and website, destroy files or collect
personal information to sell.
§) [Link] Black Hat Hacker
A black hat hacker is a person who attempts
|) to find computer security vulnerabilities and
exploit them for personal financial gain or other
= malicious reasons. Black hat hackers can inflict
= major damage on both individual computer users
| and large organizations by stealing personal
| financial information, compromising the security
of major systems, or shutting down or altering the
function of websites and networks.
Famous Black Hat Programmers are Gary McKinnon, Jonathan James, Adrian Lamo.
143 On-line Fraud
“It refers to any type of fraud through internet which uses e-mail, website, internet chart,
voice call through mobile phone, SMS (short message service) etc. It can involve Identity §
theft, online lottery fraud, credit card fraud, financial fraud, on-line shop fraud etc.1.4.4 Identity Theft
Identity theft isa form of stealing someone's personal
information and pretending to be that person in order to.
obtain financial resources or other benefits in that person’s 3
name without their consent. - Y se 8
1.4.5 Software Piracy
It is defined as “the illegal copying, downloading, sharing distribution among organization or
friends and other for duplication and resale or purchased by someone else.” It is not simple a
crime but it can also destroy computer and data.
Pirated software distributed over internet. A piracy website may also provide hackers with
virus and Trojans, as well as tips techniques for gaining illegal entry into network and system.
Wiens ease)
Computer Ethics is set of moral principles that
regulate the use of computers. Some common issues of
computer ethics include Intellectual Property Rights(IPR)
(such as copyrighted electronic content), privacy concerns,
and how computers affect society.
1. You shall not use a computer to harm other
computer work.
You shall not snoop around in other people's - COMputer Ethics
computer files.
You shall not use a computer to steal.
You shall not use a computer to bear false witness
You shall not copy or use proprietary software for which you have not paid.
You shall not use other people’s computer resources without authorization or proper
compensation.
You shall not appropriate other people's intellectual output.
5
5
=
| ; -|
s
S
5
Resp lity =
people. S
You shall not interfere with other people’s -
=
5
5
3
|
3
5
5
s
|
s
5
&
s
&
=
5
|
2
=
&
&
.
You shall think about the social consequences of the program you are writing or the
system you are designing.
. You shall always use a computer in ways that ensure consideration and respect for your
fellow humans.1.6 INTRODUCTION OF INFORMATION SECURITY
Information security is the process of preventing and identifying unauthorized use of
computer, when transforming information over internet or network.
:
:
‘The internet is an insecure channel for exchanging or transferring information leading to a =
high risk of intrusion or fraud, |
Intrusion — It is a computer program that enters a computer system without authorization
Or permission.
1.7 HOW TO SECURE OR PROTECT YOUR INFORMATION
fromunauthorized user. Such as-
> Keep the operating system updated a
p the operating system up veil oe %
> Use a Firewall Trojans tay,
> Anti-virus software is crucial to preventing virus attacks, fa Adware
= There are different techniques have been used to protect transfer of data or information §
é
&
| but this strategy only works if users update their software.
2
> Know that the only way a virus spreads is either by
There are various types of information security. Such as
Cryptography
Firewall
Antivirus
Proxy Server
Digital Signature
PPh Ne
PVN (Private Vertual Network)
5
5
3
|
launching an infected file or by booting an infected disk. ae 5
a You cannot get a virus by simply being online or by reading s
e-mail. j
pe BAe wea ee ee aa8) iad 5
= =
' s
& 3
s
1.8.1 Cryptography
4) Itisa technique to provide message confidentiality. tis a process o \ich is unreadab
any one into secrete ‘ansmission on internet.
itis a digital technique which is the original text (planed text) turned into a coded equivalent
text (encrypted)called cipher text and the cipher text is decrypted at the receiving end and turned
into its original or plane text.Encryption — It is a method that the original text turned into coded equivalent textthat can’t
readable by anyone.
Decryption - It is a method that the coded text converts it into readable text. It is the reverse
process of encryption.
ROD © eS 8
1.8.2 Firewall
Zz,
zc JA firewall is is a system designed to prevent unauthorized access to or from a private network.
jrewalls can be implemented in both hardware and software, or a combination of both. All
messages entering or leaving the intranet pass through the firewall, which examines each message
and blocks those that do not meet the specified security criteria.
Itis a network security system that monitors and controls the incoming and outgoing network
© traffic based on predefined security rules.USES OF FIREWALL
1 ti Firewall Protects Your Computer From Unauthorized Remote Access.
= 2 Firewalls Can Block Messages Linking to Unwanted Content.
e 3 Firewalls Make Online Gaming Safer.
A= You Can Block Unsuitable or Immoral Content With the help of 4 Firewall.
5A Hardware or Software can be used asa firewall.
1.8.3 Antivirus
Anti-virus software are the software for your computer us9¢
points between the p user's
Server, which acknowledges client requests.
Proxy server is an intermediary server between client and the internet. A proxy server offers
the following basic functionalities:> Firewall and network data filtering.
® Network connection sharing.
» Data caching.
Purpose of Proxy Servers
Following are the reasons to use proxy servers:
1, Monitoring and Filtering
2, Improving performance-
3. Translation
4. Accessing services anonymously
5. Security
1.8.5 Digital Signature
A digital signature is en electronic signature that
can be used to authenticate the identity of the sender
of the message or the person or the organization who
has signed the document.
A Digital Signature is an electronic form of a
signature. it contains information about the user’s
identity (name, pin code, country, email address, the
date the certificate was issued and the name of the
certifying authority).
The digital signature is very important in e-commerce, on line banking. In fact a digital
= signature provides the greater degree of security than a handwritten signature,
= 1.8.6 Private Virtual Network (PVN) / VPN
AVN or Private Virtual Network is a method used to add security and privacy to private
and public networks, like Wi-Fi Hotspots and the Internet.
Private. Private means to keep something @ secret from the general public.Virtual. Virtual means not real,
Network. A network is a connection
between two or more computer system
(nodes) linked together for sharing
information and resources, x
A virtual private network (VPN) is a
technology that creates a safe and encrypted
connection over a less secure network, such
as the internet. VPN technology was
developed as a way to allow remote users and branch offices to securely access somone’
applications and other resources. A VPN is a network. It can transmit information over long =
distances effectively and efficiently.
1.9 CYBER LAW
The Indian law assures us with the basic and essential
rights that a man requires to carry out his livelihood. With the
increase in requirements and discoveries round the globe,
there, been continuous amendments and appendices in
the | the frequent updating technologies ease our life but
at the same time create threats too. The digital tech nology i is
governed byt d by the cyber wing of our nation which has drafted
known as “The Cyber Law”.
Cyber lawis the law governing cyber space. Cyber space includes Sarnpae: internet, website,
e-mail, cell phone, Automatic teller Machine(ATM) etc.
IMPORTANCE OF CYBER LAW:
= Companies now be able to carry out electronic commerce using the legal infrastructure
provided by the Act allows Government to issue notification on the web thus heralding e-
governance Protect Computer fraud and Unauthorized access. Consumers are now increasingly
using credit cards for shapping. Most people are using email, cell phones and SMS messages for
communication as well as Deal with Internet Banking Transactions.
:
Like all other concerned acts under Indian penal code we are
provide with an Act that governs the crime against Information
Technology of India.
1.10.1 Ammendments IT Act, 2000
The IT Act witnessed some amendments, afew of the important amendments were:® — Section 66A was introduced in the year 2008 that notified sending of “offensive message”
as a crime under the IT ACT 2000.
® Section 69 was also introduced that powered the concerned authorities to monitor or
decrypt any information through any computer resource.
10.2 Objective of 1.7. ACT 2000
& It is objective of |.T. Act 2000 to give legal recognition to any transaction which is done
by electronic way or use of internet. s
» To give legal recognition to digital signature for accepting any agreement via computer.
To provide facility of filling document online relating to school admission or registration
in employment exchange.
® According to |. T. Act 2000, any company can store their data in electronic storage.
v
To stop computer crime and protect privacy of internet users.
> Togive legal recognition for keeping books of accounts by bankers and other companies
in electronic form.
® Tomake more power to IPO, RBI and Indian Evidence act for restricting electronic crime.
PORTANT SECTION OF IT ACTS 2000
OFFENCE
= PENALTY
6s Tampering with computer source
document
Hacking with Computer System
Receiving stolen computer or
communication device
Using Password of another person
& deals with Credit card fraud
Cheating using computer resource
Either Imprisonment up to 3 years
or with fine of to Rs.2 Lakhs or both.
Either Imprisonment up to 3 years
or with fine of to Rs.5 Lakhs or both.
Either Imprisonment up to 3 years
or with fine of to Rs.1 Lakhs or Both.
Either Imprisonment up to 3 years
or with fine of to Rs.1 Lakhs or both.
Either imprisonment up to 3 years
or with fine of to Rs.1 Lakhs or Both.
Either Imprisonment up to 3 years
or with fine of to Rs.2 Lakhs or both.
Imprisonment up to life.
Either Imprisonment up to 3 years
or with fine or both.
66
66D
Publishing private images of
others
Act of Cyber terrorism
Failure to maintain records
67CLAB ACTIVITY >
Note and identify which computer antivirus program is installed in computers of your school
computer lab.
Scan your computer with antivirus and notewhat different viruses are detected. if detected
take appropriate action.
Run antivirus program and see if the virus definition file is up-to-date or not.
Attach a USB flash drive and scan it for virusesPROGRAMMING
Language is a medium to express our views
and feelings. To communicate with a computer,
we need a language which a computer
understands. Far every action, a computer has
to be given instructions accordingly.
:
Pee see
A computer programis a sequence
of instructions to process certain input and
produces desired output.
ay
Ss EU
ire
eta
The process of writing the sequence of
logical steps using a computer language is called
programming. There are many programming
languages. Each language has its own rules and
way of writing the command, called syntax. The
people who do this job are called
“Programmers”.
PR eu ee eee clea
A computer program is written in a
computer language. The computer language
can be classified into fifth categories:
TOFS.
Idea of Problem solv
es like algorithm and
blem Solving Methodology.
Blopment algorithm and |
Machine Language
Assembly Language
High Level Language
4™ Generation Language
5™ Generation Language
2.2.1 Machine Language
A machine language is @ computer
language which is made up of Os! and 1s’. It is
the language which is only understood by the
computers. It is also known as a binarylanguage. It is also known as the language of the CPU (The
central processing unit of the computer, which is the part that
5 does the “thinking”). The machine language is the lowest level
E language composed of O’s and 1's.
§ 2.2.2 Assembly Language
An assembly language is a form of computer
language where mnemonic codes are used for writing
programs. An assembler is required for converting an
assembly program into machine language for the
computer to understand. Example of an assembly
g language is ADA,
Since a computer can only understand the
machine language, assembly language programs have to be converted into machine language.
Translator programs known as Assemblers were developed to convert the assembly language
program into machine language.
Assembly language is also machine-dependent and programming in this language is quite
time-consuming. Thus, it is also regarded as a Low Level Language (LLL).
2.2.3 High Level Language
Ahigh level computer language
is English like language used for
making computer programs. Itis not
understood by the computer
directly and hence requires an
= Interpreter/ Compiler fortranslating
= it into machine language. Some of
‘the high level languages are: Basic,
Cobol, Logo, C, C++ etc.
=
|
=
2
|
After a program is written in one of the high-level languages, it must be either compiled or
interpreted.
e High level language programs need to be translated into machine language by using the
= Translator programs. There are twa types of translator programs for converting high level language
= program into machine language.
1. INTERPRETER
It is a translator program used to convert a high level language program into machine
Language. It translate line by line, i.e., it converts one line, executes the instruction and thenrepeats the procedure for the remaining instructions. Errors, if amy, are to be immediately removed.
The converted form is nat stored anywhere and has to be generated at the time of execution of
program. Interpreter programs are preferred for beginners and are slow in execution speed. :
Example: Suppose the French President is visiting India on an official tour: To understand
each other, French President and Indian Prime Minister require an Interpreter who can interpret 3
French language into English language and English into French language. |
2. COMPILER
Compiler is a translator program used to convert a high level language program into machine
language. It translates the whole program at once, i.e. itgenerates the object code far the program
along with a list of errors, if any. The execution is very fast.
Note:
Source Code is a code which is written in programming language by the user/ programmer.
Object Code is an intermediate code between the source code and the executable machine
code.
COMMON HIGH-LEVEL LANGUAGES
BASIC - It stands for Beginners All Purpose Symbolic Instruction Code.
COBOL- It stands for Common Business Oriented Language.
FORTRAN- It stands for Formula Translation.
C- It is a structured programming language.
(C++ It is an Object Oriented Programming Language
LOGO- LOGO stands for Logic Oriented Graphic Oriented programming language.
JAVA - java is another type of an Object Oriented Programming Language. It is used for
programming 4s well as developing.
ee oe
‘VISUAL BASIC - Visual Basic (VB) is a programming environment from Microsoft in which a
programmer uses a graphical user interface (GUI) to choose and modify preselected sections
of code written in the BASIC programming language. |
> C# (C Sharp) - C# (pronounced “C-sharp”) is an object-oriented programming language from
Microsoft that aims to combine the computing power of C+ + with the programming ease of .
Visual Basic. C# is based on C+ + and contains features similar to those of Java programming
language.
af» Perl- Peri is a flexible, feature-rich and powerful dynamic programming language. One can
often achieve in one line of Perl what requires 1 OOs of lines in C and other languages.
> Python- It is an object oriented computer programming language. It was created by
programmer named GUIDO VAN ROSSUM in the year1991. It was named after TV show
MONTY PYTHON. ;
2.2.4 4™ Generation Language
The development of computer languages has been classified into the following aeons
Machine Language as First Generation
Assembly language as Second Generation
High level language as Third Generation
Ne ee ne ie
Fourth Generation Languages are combination of languages with the following features:
= Highly user-friendly
= Very high speed of execution
= Reduced level of programming skills.
= Minimum efforts from the user to obtain any information.
In 4GL, the user has to specify only the required output and the format of the output without
bothering about the steps required to obtain that.
Example: SQL (Structured Query Language).
Binary codes to depict operators and data.
Machine dependent.
Only language directly understood by a computer.
ASSEMBLY Machine dependent.
|: RP a ee
Has to be converted into Machine language byTranslator
programs (Assemblers).
English words and mathematical operators.
Machine independent.Has to be converted into Machine language by Translator
programs (interpreters and Compilers).
Machine Independent.
Minimal user skills required to obtain results.
Application development tool.
2.2.5 5™ Generation Language =
Fifth generation programming languages use artificial intelligence techniques to meet their
goal. The artificial intelligence (Al) techniques can handle imprecision and supports human like
self learning and problem solving.
® USP was the first computer language for writing artificial intelligence programs. It was
created by John McCarthy.
The first interactive computer game was Spacewar.
» The term software wos first used by John W. Turkey in 1957
Peed) Coen 1
MENTS OF PROGRAMMING a
‘We know that, A computer program is a sequence of instructions to process certain input
and produces desired output. Therefore, certain containers are required while doing programming
to store these inputs and outputs. Variables and constants can be thought of as containers to
contain some values.
L:
=
Note:
® Lady Ada Lovelace is regarded as the first lady computer programmer.
&
=
=
|
value.
1 Consta Nts
Constants are the quantities whose values
cannot be changed during program execution
or running. These are the named spaces in the
computer’s memory. There are various types
of constants.
5
Technically variables and constants are narned memory locations which can store certain
» Character constants: These are the
alphanumeric and special characters
like ‘A’ to ‘Z’/ a’ to ‘2/0’ to ‘9’ and
Variables ete yeother special characters are available on the keyboard. Basically each character constant
is internally represented as a positive integer which is known as its ASCII (American
Standard Code for Information Interchange) value.
Numeric Constants: These are the numbers, for example 117, 20.50,-50 etc.
String Constants: These are sequence of alphabetic or alphanumeric characters
‘enclosed in double quotation marks. For example “Male”, “Married” and” India” etc.
2.3.2 Variables
tis anamed space in the computer’s memary whase value can Alelet
be changed during the execution of a program. This is just like a
variable in mathematics.
Example: Let x be the age of the father. Here x is a variable.
In programming variables can be of different types, like there
different types of containers.
For Example
> if we want to keep potatoes then we need a cloth bag.
> = If your father asks for water to drink then we take a glass. ‘
In the above examples the Bag and the glass are the variables because a bag can contain
different solid objects at different times and the glass can contain different liquids at different
time.
2.3.3 Data Types
SCR | CE LL | SR | | CaN
Likewise in programming a variable can be of different
5 types, known as Data type, which specifies the type of value
it can contain and the type of operations that can be
performed.
In the physical world matters are classified solid, liquid
and gas. Likewise in the competing world data types are
mainly categorized as character, integer and float. These
© different data types different from one another in terms of
© the memory they occupy. The memory they occupy depends
on the language we use.
> Character type {In C language it occupies 1 byte). The character type stores characters like
"b//D'/& etc.like -20, 0,12etc.
> Float type (In C language it occupies 4 byte). It store:
2.0, 3.1415, -100.876, etc
.s the floating point numbers, such as
used in mathematics. There are four common types of operators which are given below:
> Integer type (In C language it occupies 2 byte). The integer types can hold only integer values
1. Arithmetic operators(+,-,*,/,4,MOD)
2.3.4 Operators
‘Operators are symbols that indicate the type of operation to be performed on the data as
2. Assignment operator(=)
3. Relational operators(<,>,!=,<=,>=)
=
a
| 4. Logical operator(AND, OR, NOT)
1. Arithmetic operators
Arithmetic operators are used to perform mathematical caleulatic
division, muttiplication and exponentiation.
ions like addition, subtraction,
Addition Gives the sum of values
Subtraction Gives the difference of values
Multiplication _| Gives the product of values
Division Gives the quotient
Exponentiation | Raise the value to the
power of an exponent
Gives the remainder
after division
Precedence of arithmetic operators
Precedence Is the priority that is followed while applying these operators. This becomes |
more important when more than one kind of arithmetic operator appears within one expression.
The precedence of arithmetic operators is given in the following table:Note: In an expression the operations within parentheses ( ) are resolved first.
The usual order inside the parenthesis is maintained as given in the above table.
Solve the expression X + ¥/10, where X = 30 and Y = 50
Solution: x+¥/10
=30+450/10 (Division will be resolved first)
=30+5 (Addition will be resolved next)
=35
Assignment operator
An operator which is used to assign a value to a variable is called assignment operator. In
programming languages “Equal sign” (=) is used as an assignment operator.
Example: A=5
[ee a If the two values are
not equal and false if they are equal ee l=7
Returns true if the first number is
greater than the second and false if not
Greater than | Returns true if the first number is
‘or equal to Greater than or equal to the second
and false if not
Less than or Returns true if the first number is.
equal to less than or equal to the second
and false if not3. Relational operator
Relational operators are used to perform comparisons on two values, i.e. they operate on
two operands. The result of comparison is either TRUE (non zero) or FALSE (zero). The following
table gives the description of relational operators with examples:
is also either TRUE OR FALSE.
Operates on two operands. If both the operands are
TRUE, the resultant is TRUE otherwise the resultant
s
Ss
4. Logical operator
The logical operators operate on BOOLEAN values that is TRUE and FALSE and the resultant
.
is FALSE.
‘Operates on two operands. If both the operands are
FALSE, the resultant is FALSE otherwise the
resultant is TRUE. (AOR B)
| Operates on one operand, It returns FALSE if the
aperand is TRUE. It returns TRUE if the
operand is FALSE. NOT(A)
2.3.5 Expression
An expression is a combination of symbols and operators that represents a value. Every
expression consist of at least one operand and can have one or mare operators. Operands are
values ,where as operators are symbols that represent particular actions,
An expression which represents a numeric value is called an Arithmetic Expression.
For Example, Exp= (a+3)*(C+2)
‘An algebraic expression cannot be used directly in programming. It must be converted into
=
For example, in the expression X+3
whereX and 3 are operands and + is an operator
= computer understandable expression.
&
‘At times a program may not compile, even if it gets compiled, it may not run. Even if it
compiles and runs it may not produce the desired output. This unexpected behavior of the program
is because of some errors. Therefore errors are the mistake in a program.Type of Errors:
1. Compilation Error: These are caught during compilation.
> Syntax Error: Occurs when the rule of the language Is violated. Example: x = 10; Here x
is not created but used, :
} Semantic Error: Occurs because of meaningless statements.
> Type Error: Occurs when a value of one datatype is assigned to variable of another
datatype.
2. Runtime Error : Occur during run time of the program
3, Logical Error: Occur due to the bad logic of the programmer. Because of this, the program
will compile, run but will not give desired output. This is most serious in nature.
ING METHODOLOGY (PSM;
The programming process is 2 set of activities that are carried out to develop and implement
a computer program. The various stages involved in the process of software development may
& bbe depicted as follows.
5
2.4.1 Steps of PSM
‘A program development process is the step by step process in converting the inputs into:
outputs.
1. Analysis; This is the important phase where all the requirements of the program are.
gathered and analyzed. Based on ‘the problem the different inputs are identified and
their corresponding outputs are decided. For the above example problem the inputs
are the two numbers and output is their sum.
This can be represented either in form of algorithm or flowchart.
3, Coding: In this stage the algorithm is translated into the program called source code
using some programming language.
| 2, Design: In this phase the detailed step by step procedures are discussed and represented.
& 4. Compile or Test the program: in this stage, it translates the whole program at once into
s
=:
the object code for execution of the program.
5, Execute the program: An error free program after compilation is put to run to produce
the output. This phase is called run-time, the phase of program execution during which
program instructions is carried out.2.4.2 Algorithm & Flowchart
é
|
é
&
—
ALGORITHM
‘An algorithm is a finite set of instructions, which is to be carried out in order to solve
Output = It should have one output. «
Definiteness — Every step in an algorithm should be definite.
|
=
s
particular task. bs
“Characteristics of an Algorithm:
Input — It should have one or more inputs.
s
=
Finiteness ~ An algorithm consists of finite number of steps.
Effectiveness — Each instruction must be sufficiently basic, so that person using paper
and pencil can carry out in a finite time.
ON RS ie
The following keywords are used in algorithm.
BEGIN
READ, INPUT, ACCEPT
WRITE, OUTPUT, DISPLAY
END, GOTO
STEP 1, 2,....N
Fe. ELSEssseom ENDIF
WHILE .....END WHILE
Structure of Algorithm:
STEP n END (End of the algorithm)LOWCHART
A flowchart is a pictorial representation of step by step solution of a
he pictorial representation of an algorithm.
symbols used for Flowchart
1. Terminal box:
Used to mark the beginning and end ofa
flowchart.
2. Input/output box:
Used to representation an input operation
or an output operation.
3. Processing box:
Used to representation arithmetic
operation like calculation of a value or
assignment of a value to a variable, etc.
| 4, Decision box:
Used to represent branching by selecting
one of the two possible paths depending on
the given condition. All companies such as
equal to, greater than, etc. are made with the
use of a decision box.
5. Flow lines:
Used to indicate the direction of flow of
:
execution. Every line in a flowchart must have
an arrow in it. Generally, the flow lines should
5
ey
=
not cross each other.
Keywords of Flowchart:
The following keywords are used in flowchart.
START
READ, INPUT, ACCEPT
WRITE, OUTPUT, DISPLAY
problem. Or It refers tosTOP
IF
Y for YES
N for NO
Example-1
Write an algorithm & flow chart for Addition of two numbers.
Step 1: Start
Step 2: Declare two variables a, b for storing the input
| CREE: \ | 3)
’
Step 3: Read the first number and store it in a
Step 4: read the second number and store it in b.
Step 5: declare a variable sum to store the total.
Step 6: Add num1 and num2 and store the result in the variable total.
Total ¢!num1+num2
= Step 5: Display total
= Step 6: Stop
OR
Algorithm:
‘STEP 1 BEGIN
4 ‘STEP 2 READA, B
: ‘STEP 3 SUM = A+B
STEP 4 PRINTSUM
STEPS END
Example-2
Write an algorithm & flowchart for Calculation of Simple Interest
: Step 1: Start
Step 2: declare variables P, T, R
Step 3: declare a variable SI to store the simple interest.
Step 4: Initialize variables to P=1000, T=2, R=2, SI=0Step 5: calculate simple interest and store the result in the SI.
SI = (P*T*R)/100
Step 6: Display St
Step 7: Stop
OR
Algorithm:
STEP 1 BEGIN é
STEP 2 READ p, tr
STEP 3 si= (p*t*r) / 100 3
STEP 4 PRINTsi
‘STEPS END
‘Syntax of “IF” statement:
IF (CONDITION) THEN
TRUE STATEMENTS
STEP 1 BEGIN.
STEP 2 READ n
STEP 3 IF (n > 0) THEN STEP 4
PRINT “nis a Positive number”
STEP 4 END IF
‘STEPS END
‘Syntax of “IF — ELSE “statement:
IF (CONDITION) THENTRUE STATEMENTS
ELSE
: FALSE STATEMENTS
: END IF
Example-4
Write an algorithm — input any number whether it is even or odd
Algorithm:
STEP 1 BEGIN
; STEP 2 READ n
STEP 3 IF (N %2== 0) THEN
STEP 4 PRINT “Nis a even number”
STEPS ELSE
STEP 6 PRINT “Nis aodd number”
BS “ster ?. END IF
: STEP 8 END
Nested” IF — ELSE “ statement
‘Syntax of Nested” IF — ELSE “ statement
If (CONDITION) THEN
.
TRUE STATEMENTS
IF (CONDITION) THEN
TRUE STATEMENTS
IF (CONDITION) THEN
TRUE STATEMENTS
ELSE
FALSE STATEMENTS
END IFExample-S
Write an algorithm& flowchart — “Compare between two numbers”
Algorithm:
STEP 1
STEP 2
STEP 3.
STEP 4
STEPS
STEP 6
STEP 7
STEP 8
STEP 9
‘STEP 10
STEP 11
Flowchart;
BEGIN
READ a, b
IF (a == b) THEN
PRINT “Bothno.a&bare Equal”
ELSE IF (a >b) THEN
PRINT “a is greater than b”
ELSE
PRINT”a is smaller than b”
END IF
END IF
END
51) ) =nExample -6:
Draw a flow chart display “the natural number from 1 to 100.”
Example -7:
Draw a flow chart “Factorial of a number.”
fi! AS fs 1s ts A | ss ss) ee § ssi | eee |
|
|In early days when there were no means of counting, people used to count with the help of
figures, stones, pebbles, stick etc. These methods were not adequate and had many limitations.
‘When we type some letters or words, the computer translates them in numbers as computers
can understand only numbers. The data within the computer is represented in the following
types:
1. Decimal Number System
2. Binary Number System
3. Octal Number System
4. Hexadecimal Number System
2.5.1 Decimal Number System
Under this system, all the computation is done using decimal numbers which include digits
from 0 to 9. It is composed of 10 digits and hence the base of this system is also 10.
5
| ‘The numbers belonging to this system are: 100, 234, 3343 etc.
=
g The value of each digit in a number depends upon the following:
= 1. The face value of the digits
2. The base of the number system
3. The position of the digit in the number
For example, the number 547 can be understood in powers of its base:
= - =
5 =
= :
.
|
=
=
5
2
Also its value can be written as
(5x100) + (4x10) + (71)
(5%10*) + (4«10") + (7«10°)
500+ 40 +7
547,
cK 36 SSThe positional value of each digit increase 10 folds as we move from right to left. In the
above given example; 5, 4 and 7 are the face values of digits and their place value is hundreds,
: tens and ones respectively. The face value depends on the position of the digit in the number.
:
= 2.5.2 Binary Number System
Since computer is a machine, it cannot think by itself. It understa nds only ON pulse and OFF
pulse. ON is represented by 1 code and OFF is represented by the code O(zero). These codes, 0
and 1, are called binary codes.
The binary number system consists of only two digits i.e. 0 and 1. Since this system uses two
E cigits, it has the base 2. All digital computers use this number system and convert the data input
from the decimal format into its binary equivalent.
The base of this system is 2 and is a very easy to code system which represents two voltage
levels as ON and OFF respectively, The numbers belonging to this system ore: 1001, 1010, 100
etc.
2.5.3 Octal Number System
TRL a FTAA Ee
This type of number system consists of eight digits, ranging from 0 to 7 (0, 1, 2, 3, 4,5, 6 and
7). The base of this system js 8. The numbers belonging to this system are: 12, 26, 44 etc.
2.5.4 Hexadecimal Number System
This system acts as the shorthand notation within the computer systems. It is composed of
16 characters, which include digits from Oto 9 (0,1, 2,3, 4, 5, 6, 7, 8, 9)and alphabet from A to F
eB” B, C, D, E, F) where A stands for 10, B for 11, C for 12, D for 13, E for 14 and F for 15. The
= numbers belonging to this system are: A93, ACD, 2C etc.
Tel melas ser Van ena a Le)
The equivalence between binary and decimal numbers canbe understood with given example.
Following the rules:
1. Divide the given decimal number with the base 2.
2. Write down the remainder and divide the quotient again by 2.
=
=
|
=
s
3
3
|
:
5
=
=
=
3
=
=
3. Repeat the step 2 till the quotient is zero.
Let us understand the conversion of Decimal number into binary number with the given
example.Thus (25 ),,= {41004 ),
Remainders, which are obtained in each step are written in reverse order, to form the binary
SCE of a decimal number.
Pa BEM TO DECIMAL NUMBER
To convert @ binary number 1010 into decimal number, follow the given steps:
1, Multiply each binary number with 2 having the power 0 for unitary position, starting
from the extreme right digit.
2. Increase the power one by one, keeping the base fixed as 2.
3. Sum up all products to get the decimal number.
Example1 Example2
THTU (100 1)
(1010), Lyteve4
Ox2’ - Units =0 Ox2=0
1x2’ - Tens =2 = O« 2= 0
Ox2' - Hundreds =0 1x 2= 8
1x2 + Thousands =8 Thus (1001), = (9),
Thus(1010), =(10),,
Example 3
(110001001), = 12°40 %2'+0%27+4% 240% 2+0 «2°40 x2" 12741 x2"
= 1+0+0+8+0+0+04128+256
= 393
Thus(110001001), = (393),
:
:
:
:2.8 BINARY ARITHMETIC
Similar to the decimal number system, which is our conventional mathematical system of
computation, the binary number system also involves arithmetic combining, addition subtraction, =
© multiplication and division. :
2.8.1 Binary Addition
The technique used to add binary numbers inside the computer is very easy and simple. This
is performed in the same way as you perform addition with decimal numbers. The follawing table
illustrates the addition of two binary digits: 7
4 1141 Cary
+ 0111 11414
1114 + 01011
: 101010
"
2.8.2 Binary Subtraction
Follawing rules must be followed to perform binary subtraction:
& .
| !
5 =
=
Example 1: Example 2:
Sa Compute (11111), + (1011),
= .
S$ .
S =
8 =
| |
4 =
: 3
: :
{with borrow taken from next place]
Borrow Is taken when 1 is subtracted from O. (10-1=1)Example 1:
Compute (1111), - (1010),
2.8.3 Binary Multiplication
The rules for performing multiplication using binary numbers are same as that of decimal
numbers. The following table illustrates the multiplication of two binary digits:
5
|
5
)
|
2.8.4 Binary Division
The method to perform division of two binary numbers is same as that of decimal numbers.
See the example given below:Example 1: Compute (110), (10), | Example 2: Compute (10000117), + (1001),
41 ————-auotient _ ee Quotient
10/110 ——Dividena | 1001]10000111— Dividend
10 1001 :
10 001
St: 41001 :
00 SO Oe =
‘Remainder
| —901—
01001
1001 :
0000 ——— Remainder
Example-3:
Here 101 is the quotient and 1 is the remainder.
RELATION BETWEEN DECIMAL, BINARY, OCTAL AND HEXADECIMAL.
RN RRS, S\N A RESRRRREI $ 1 Lh SERENA A | FT|Draw flowchart using MS Word.
1. Draw a flow chart to calculate simple interest.
2. Draw a flow chart to find the greatest number among two number,
3. Draw a flow chart to change rupees into paisa,
4. Construct an algorithm & draw a flowchart for making coffee.
.
.
&| 5
Fill in the blanks:
(a) 2 techniques are helpful in solving problems.
(b) is a process of pictorial illustration for 20 a problem. :
The input/output in a flowchart is represented by a“ __ shape.
\
a An operator which is used to assign a value to a variable is called .
{e) A sequence of instruction used to solve a particular task called __.
A______ isa set of instruction.
Language uses mnemonics, Ays1»-l” by
wed ye Scrivett higriaavel language to machine language line by line.
The machine language also known as_Lornawiy [am Ter
A high-level language is also known as__ ate language.
State true or false
A flowchart is a step-by-step procedure for calculations.
Constants are the quantities whose values cannot be changed
5
|
Variable is a named space in the computer's memory whose value can be changed during
the execution of a program.
(d) The occurrence of incorrect or unexpected result is called an error.
(e) Relational operators are used to assign values.
(f) Machine language is a 1" generation language.(a) What is program? 5
(b) Differentiate between a constant and a variable.
(c) Differentiate between a Syntax error and Logical error.
{d)_ What is flowchart?
{e) What is algorithm?
(f) Name the different number systems of a computer.
{g) Name the rules for adding Binary Numbers. :
(h) Name the rules of multiplication of binary numbers.
5. Add the following:
(a) 100-1000-10000 .
(b) 111000+11000 :
(c) 1+214111+1111
6. Subtract the followings:
(a) 10101011-1010101
(6) 1100110-11111
7. Multiply the fallowings:
(a) 101x011
(b) 102010 x 1011
8. Divide the followings
(a) 1221+11
(b) 111121111 +1011
(c) 10100110111+1119. Give detailed answers to the following questions.
(i) Explain different types of errors in programming with examples.
(ii) What is arithmetic expression ? Explain different types of operators with examples.
(iii) Convert the following algebraic expressions into computer expressions.
(a) (AB) + (BC)
{b) 5X-7¥
(c) A+BxC3
(dé) B2-4AC
fe) XY - (X-¥)
10. Find solution for the following expressions, if A= 3, B= 4andC=5
fa) C-A*B-5
(b) (A+B)-C42
{c) (B+C)/A*10
(d) A*2+B*2-2°AR
fe) CmodA*B+C
{a) Find the addition of threenumbers.
(b) Find given number even or odd.
{c) To print 1 to 10 natural number.
CO CO eePO e ete
A header is the information that appears
at the top of each printed page and a footeris
the information that appears at the bottom of
each printed page. By default, new workbooks
do not have headers or footers.
The following steps will help you
understand how to add header and footer in a
Word document,
Step 1- Click the Insert tab, and click either
the Header button or the Footer button that
which needs to be added first. Assume you are
going to add Header; when you click the Header
button it will display a list of built-in Headers
ADVANCED FEATURE OF MS WORD
from where you can choose any of the headers
by simply clicking on it.—
| eres —
i Step 2- Once you select any of the headers, it will be applied to the document in editable
| mode and the text in your document will appear dimmed, Header and Footer buttons appear on
= the Ribbon and a Close Header and Footer button will also appear at the top-right corner.
Breve | SD nue
BD heer temoe sco an
building blocks. When you create pictures, charts, or
t diagrams, they also coordinate with your current document look.
= ‘Step 3- Finally, you can type your information whatever you want to have in your document
header and once you are done, click Close Header and Footer to come out of the header insertion
mode, You will see the final result as follows,
You can follow a similar procedure to add footer in your document.
Word Training Document |
On the Insert tab, the geileries include items that are designed to coordinate with the overs
look of your document. You can use these galleries to Insert tables, headers, footers, lists,
| cover pages. and other document building blocks. When you create pictures. charts, or *Edit Header and Footer. : a |
The following steps will help you understand how to edit the existing header or footer of 2
document.
‘Step 1 - Click the Insert tab, and click either the Header button or Footer button or whatever ©
# want to edit. Assume you are gaing to edit the Header, so when you click the Header button §
display a list of options including the Edit Header option.
On thes teasers mome______ han are shenignect to coorstinete: with the
| certestoimert tation headers, footers: tees, I
detument took
You cen sasit i __ ad tant inithe document text by choosing #
foot or he ————— 5 [Link] the Home tab. You can alse
! Step 2- Click on the Edit Header option and Word will display the editable header as shown |
following screenshot.
SPM tna Vecoaraet Geen qsbictose teers siiias headers, footers, lists.
caver pages, and other document building blocks. When you create pictures, cherts, or
ddagrams, they also coordinate with your current document look,Step 3- Now you can edit your document header and once you are done, click Close Header
and Footer to came out of the edit header mode.
moo can follow a similar procedure to edit the footer in your document.
j 3.2. Manmerce 9
Mail merge isa very important tool which allows you to create form letters, mailing labels,and
envelopes by linking a main document to as et of data or data source. The main document is
linked to the data source by common fields of data, called merge fields.
For example, in a form letter, your main document would be the letter informing the parents
to be called for a parent teacher meeting. The data source is where the fields of information one
ach parent receiving the letter are located. The data source would contain names, addresses,
phone number etc.
=
|
@ If you were printing envelopes or address labels, the main document would be the “a
c
:
3
=
or the sheet with labels on it; the data source would be the addresses that are to be placed on
these envelopes or labels of sheets.
When you are performing a Mail Merge, you will need a Word document (you can start with
an existing one or create a new one) and a recipient list, which Is typically an Excel workbook.
3.2.1. Exploring Mail Merge practically:
1, Open an existing Word document, or
create ane wone,
2. Click the Mailing stab.
3. Click the Start Mail Merge command.
4, Select Step by Step Mail Merge
Wizard,
The Mail Merge task pane appears and will
guide you through the six main steps to
complete a [Link] following is an example
of how to create a form letter and merge the
letter with a recipient list.
Step 1;
1. Choose the type of document you
want to create. In this example, select
Letters.
2. Click Next: Starting document to
move to Step2.