Wednesday, August 21, 2013

Computer Virus and Crime and How to Prevent It

1. What is a Virus?
Computer Virus Alert!

A virus is a program designed to replicate itself in order to spread itself from one system to another.

Some viruses are harmless. They display only a simple message. But most viruses are very harmful. They destroy data or even the entire hard disk. Viruses attach themselves to program-files and move with them from disk to disk. When a virus attaches itself to a file, it lies dormant.

But when a certain date or event occurs, it gets triggered and becomes active. One notorious virus is called Friday, the 13 Virus. It is also called Jerusalem Virus because it was first of all discovered at the University of Jerusalem in 1987. It gets activated every Friday that occurs on the 13th of a month.

2. What does a Virus do?

What harm can a virus do when it gets active? It depends on the virus itself. It may:
  1. reformat hard disks erasing them totally.
  2. delete or damage files.
  3. heavily damage the file-allocation table. As a result of which, files cannot be easily located and found.  Moreover, the hard disks are rendered absolutely useless.
The first documented virus-program was written in 1983 by Fred Cohen, Within only six years, i.e., by the close of the 1980s, virus had become an alarming epidemic. However, viruses need caution on the user's part. But they are not at all to be feared from. Some simple steps can protect a system from them. These steps are:
  1. backing up important files frequently.
  2. Write-protecting program disks.
  3. Some viruses are copied from an infected disk during start-up. So, all disks should be removed from their drives before starting the computer.
  4. All files that come from an unknown source should be checked with an anti-virus program. They should be used only when they are found to be totally virus-free.
  5. Every PC should be equipped with some anti-virus program. Examples of such anti-virus programmers include Norton Anti-virus, Dr.Solomon's Anti-virus, McAfee Virus Scan and many others.
New viruses are being discovered every day. So, the users should keep updating their list of viruses. Also, they should take necessary precautions and steps for keeping the viruses at arm's length.

3. Types of Virus:

The different types of viruses are listed below:
a. Worm.
Originally, it is quite a harmless virus that simply replicates itself. But in the long run, it takes over all the resources of the itself. But in the long run, it takes over all the resources of the system and the PC become useless. Worms have the capacity to travel from system to system very easily.
b. Trojan Horse.
This virus comes as a friendly program (as a game etc.). But it is very dangerous as it destroys all data.
c. File Infector.
This is the most common type of virus, It adds virus code to the regular programming code within program-files. So, when the infected program is run, other program-files also get infected. 
d. Boot-Sector Virus. 
The virus attaches itself to the boot-sector of the disk. This sector is the part of the disk where start-up instructions and the file-allocation table are kept. This sector is read and loaded into the memory every time the disk is booted. Evidently, this virus is also very dangerous.
4. Computer Crime:

Computer crime means unauthorized access to or alteration in computer programs or data.

As the human society is becoming more and more dependent on computers, computer crime is talking an alarming shape. Computer criminals have done the following harms:
  • They have stolen huge amounts of funds belonging to various computer companies by transferring them out of their computer accounts illegally.
  • They have spread destruction from one computer to another using virus programs. Thus they have crippled the entire system of computer networks.
  • They have spread computer-worm programs that are less harmful in the beginning but render the computer almost useless in the long run.
5. How to prevent Computer Crime?

The basic ways of prevention are listed below:
a. Vaccines:
These are programs that vaccinate the computers against the viruses.
b. Passwords:
Most computer systems require the user to enter a password that is usually a combination of alphanumeric characters (A-Z and 0-9). If the password is valid, the computer grants access to the system. If it is not valid, access is denied. Some complex computer security-systems trigger an alarm if someone tries to use a fake password. The longer the password, the safer it is.
c. Halting Trespassers:

In order to restrict illegal access to a computer, some sophisticated defenses are used instead of simple passwords. For example, special voice-recorders can analyses the voice of a trespasser and check it against a database containing the voice-patterns of valid users.

Introduction to BASIC Programming Language

BASIC is a popular programming language for the beginners. It was developed in 1964. Using this easy language, we can make very interesting programs with text and graphic output.

A number of companies provide this language under different names.
For example,

T-BASIC, GW-BASIC AND Q-BASIC.

1. Structure of a Program in BASIC language:

  • Every program in BASIC language has a line number. The line numbers start from 10 and increase with the difference of 10. For example, 10,20,30,...
  • Every line in the programme is called a statement. This statement asks the computer to perform the required task.
2. Our First BASIC Program:

Using BASIC, we can print any message on the screen. To display a message, we use the PRINT statement. This statement takes a message from us and prints it on the screen. Type the following PRINT statement and press ENTER.


10 PRINT "Hello, World!"
140 END



Our first program will give this output on the computer screen.




3. Modes of a Program:

In BASIC, we can write a programme in two different modes.

(i) Direct Mode
(ii) Indirect Mode

(i). Direct Mode:

In the direct mode, we can write any program and immediately run it without giving any line numbers or saving to the floppy or hard disk. Our first programme was also written in the Direct Mode.

Here  is another Direct Mode program.


PRINT 4+2 <Enter>

we will get this output on the computer screen.



(ii). Indirect Mode:

In the Indirect Mode we can write multilane programs and then run all the statements turn by turn. We can also save these programs on the floppy or hard disk.

Write the following program with line numbers.


10 PRINT "I Live in"
20 PRINT "USA"



Now type RUN and we get the output on the screen.


4. Saving a Program:

To save a program on floppy disk, type the following command.


SAVE " my prog1" <Enter>

5. Loading a Program:
Loading a program means getting data from the floppy disk to the computer, so that we may run it. Use this command to load a program from floppy to the computer.

LOAD " my prog1" <Enter>

6. Getting List of the Loaded Programs:

LIST command in BASIC displays all the programs that have been loaded in the computer memory and can be run by RUN command.


LIST " my prog1" <Enter>

7. Variables in BASIC:

BASIC language allows us the use of variables. Therefore, instead of using constants as in our previous examples, we  can use variables in our programs. Once defined, we can store values in these variables and can use them anywhere in the program.

8. Variable Types In BASIC:

We can use two types of variables in BASIC:

a. Numeric
b. String

a. Numeric Variables:
Numeric Variables can hold numeric values. For example, 12,32,23,50 etc. We can perform calculations on numeric variables.

b. String Variables:
String variables can store non-numeric data. For example, David, USA, A, 77%, etc.

9. Using Variables:

To use a variable, whether it is numeric or string, we have to take two steps:
a. Defining the Variableb. Defining a String Variable
a. Defining a Numeric Variable:

In BASIC, a numeric variable can be defined in this way.

LET A=20


In the above statement, we use LET to define a variable 'A' and give it the value 20. We can give any numeric value to a variable.

b. Defining a String Variable:

A string variable is the collection of alphabets. Defining a string variable is a little different to defining a numeric variable. Let us see how?
LET B$ = "Computer"

Note: A string variable may also contain numbers but a numeric variable cannot contain alphabets. (Every string value for a variable should be in double quotes).

For example, the following two statements are correct.
LET C$ = "123"
LET D$ = "A1B2C3"

In the above example, both '123' and 'A1B2C3' are taken as string values and stored into string type of variables.

10. BASIC Commands:

You already know about some BASIC commands, such as SAVE, LOAD, SAVE and RUN. Let's know some other commands.
  1. BASIC or GWBASIC (This command is used to load BASIC language itself. This command will work when you are in the directory that contains the BASIC OR GWBASIC file).
  2. SYSTEM (We use this command to exit from BASIC language environment)
  3. INPUT (This command is used to get input from user. This input is stored into some variable).
  4. CLS (This command is used to clear the monitor screen).
  5. END (End is used to end a BASIC program. This statement comes at the end of a program).
11. Sample Programs:

Program - 1

Now we make some program that gets two values from the user: stores them into the variables and shows the total of the two values to the user.

10 CLS
20 INPUT "Enter first Value"; A
30 INPUT "Enter second Value"; B
40 PRINT A + B
50 END

Friday, July 20, 2012

Computer Language Translators

We know that there are two main types of programming languages. We know that a computer can only execute a program that is in the machine language. Therefore every language program must be translated by some special program before it is actually executed on a computer.

Decoding or Translating is the process of converting a program written in a high level or a low level language into machine code, so that a computer can understand it easily. There are a number of translators used for different programming languages. Some language software come with built-in language translator while others are translated separately.

For example,

In order to translate Machine or Assembly language into a machine code, we use an Assembler. For high-level language programs we use a compiler or an interpreter.

Translating High-Level Computer Languages


1. Assembler:

These language translators translate low-level language programs into machine code. Assemblers are dependent on the configuration of a Microprocessor.

Function of Assembler

2. Compiler:

Compiler complies all the programs (High level language programs) into machine language before the program is executed. Then Assembler further translates this machine language for execution. Number of programming languages use compiler to compile their programs. For example: COBOL, FORTRAN, PASCAL and C/C++.

Compiler Language Translator

3. Interpreter:

As compiler translates programs into a machine language a machine language all at once, so before the programs the run, Interpreter translates the programs one line at a time as they are being run. For example, if in a program, one instruction is to be executed hundred times, it must be translated into machine language at all those hundred times.

Interpreter

Computer Languages

Computer Programming Languages
The purpose of computer language is to communicate with the computer. We actually develop computer programs in computer language in order to give the computer the commands what to do. There are two main types of computer languages.

1. Low Level Programming Language:

A low level language is very close to a microprocessor (CPU). There are two low-level languages i.e. Machine Language and Assembly Language.

Computer directly understands Machine Language as this language uses only two symbols i.e. 0 & 1. Assembly Language is very similar to the Machine Language but easier than that.

2. High Level Programming Language:

High level programming language differs from a low level  language in a way that a high level language is close to the human beings and far from the Microprocessor. Some common high-level languages are:

  • BASIC (Beginner's All purpose Symbolic Instruction Code)
  • COBOL (Common Business Oriented Language).
  • FORTRAN (Formula Translation),
  • PASCAL
  • C/C++

3. Generations of Computer Languages:

Computer Programming Languages
We divide the development of programming language into generations. We will discuss all these generations one by one; we use 1GL notation for a first generation language, 2GL for a second generation language and so on.

Generation Language Period
1GL Machine Language 1940's---1950's
2GL Assembly Language 1950's---1960's
3GL High level programming language 1960's---1970's
4GL Very high level languages 1970's---1980's
5GL Al-Based languages, Object Oriented languages 1980's---To date

4. Machine Language:
This is the first programming language. This language is very difficult for common people because it deals in 0's and 1's only. All instructions are given by using the binary number system.

5. Assembly Language:
Grace Hopper developed this language in early 1950's. This is the 2GL. This language uses short hand for doing commands. For example, to do Multiplication, Addition or Subtraction, the commands are MUL, ADD and SUB.

This language is dependent on the microprocessor chip. Although this language is also not so easy yet it is the most powerful and speedy language.

6. High Level Language:
There are number of High-level languages available, which FORTRAN, COBOL, BASIC, C/C++, etc.

7. FORTRAN:

In early days of computers, the main goal was complicated calculations in solving problems of science and mathematics. So, the first major high-level programming language was FORTRAN (Formula Translation). It was developed in 1956. The latest version of FORTRAN is FORTRAN 90 which is being used in modern computers nowadays.

8. COBOL:

COBOL stands for Common Business Oriental Language. It was developed in late 1950's. As compared to FORTRAN, it was the easiest language at that time because its instructions looked very much similiar to common English. It has very powerful facilities for file handing and business arithmetic.

9. BASIC:

BASIC is almost always considered to be the first programming language that a programmer learns. It was developed in 1964. As it is very easy as compared to other programming languages of that time, so it is used to teach computer programming to beginners, as its name also implies:

Beginner's All purpose Symbolic Instruction Code

There are a number of BASIC languages developed by different companies, for example: T-BASIC, Q-BASIC AND GW-BASIC etc.

10. C/C++:

Dennis Ritchie first developed C in 1972. C is the next version of language B. Different C languages are available nowadays for IBM, IBM compatible, Unix and Macintosh etc. C++ is an object oriented programming language and it is based on C language.

It is the most popular programming language in developing commercial programs such as the software used in electronic devices.

11. Very High Level Languages:

These languages are commonly known as 4GL. These languages made the programming very easy because of their visual and object oriented approach. These languages are Visual Basic, Visual C/C++, etc.

12. Al-Based Language:

Al stands for Artificial Intelligence. These languages are based on a special subject of computer sciences, i.e., A.l. In this, we make our computer Artificiality Intelligent. Examples of these languages are PROLOG (Programming Logic) and ADA (named after Lady Ada Byro) etc. A.l. Based Languages are used for different purposes, such as to give intelligence to the robots.

Computer Professionals

We have seen that many people today know how to operate and use computers efficiently. There are many who build their career in the field of computers and become computer professionals.

In this post we shall look at more of these professionals.

1. Computer Programmer:

Computer cannot do anything without knowing correct instructions. A computer programmer writes instructions that tell the computer what to do.

A programmer writes the lists of instructions required to solve particular problems. Programmer must know the languages of computer.

2. System Analyst:

A system analyst works with a company to develop a plan to use a computers in a particular business. A system analyst must study and analyze jobs that are done and how computers can be integrated into business effectively to get these jobs done efficiently. Once the needs of an organization are identified, a system analyst will make suggestions as to the type of computers needed, what jobs they will do, where they should be placed and what kind of software programs will be needed.

3. System Manager:

The system manager is in-charge of supervising the working of a computer system in an organization or business. System manager makes sure that all computer activities run smoothly. It is the system manager's job to keep abreast of all new software and hardware development in order to maintain the most current and effective computer systems.

4. Computer Engineer:

A computer engineer is a person who designs and builds computer, peripherals, chips, and circuit boards.

A computer engineer must have a degree in electrical engineering or electronics.

It is the responsibility of all computer engineers to put all the parts the parts of a computer together in the right way so that the computer parts are interconnected and function properly.

5. Computer Technician:

When computer engineers design computer parts, these parts must be tested by computer technicians for any flaws or defects.

A computer technician is specially trained to repair all the hardware parts of a computer system.