Friday, May 15, 2009

SSC I & II - Computer Sc. Notes

HILAL UD DIN
Lecturer (Computer Sc.) /IT Coordinator APS&C (Zamzama) - Nowshera
http://apszamzama.blogspot.com
http://pakiearn.blogspot.com
e-mail: hily007@hotmail.com, hilalkhan007@gmail.com , hilal_ud_din@yahoo.com


SSC I & II Computer Sc. Notes


CH-1 HISTORY AND DEVELOPMENT OF COMPUTER

CH – 2 COMPUTER COMPONENTS

CH – 3 INPUT / OUTPUT DEVICES

CH- 4 STORAGE DEVICES

CH- 7 COMPUTER SOFTWARE

CH - 9 PROBLEM SOLVING

CH-10 DATA TYPES, ASSIGNMENT AND INPUT/OUTPUT STATEMENT

CH-11 CONTROL STATEMTES

CH - 12 ARRAYS

CH-13 SUB PROGRAMS & FILE HANDLING

CH-14 GRAPHICS

CH – 15 WORD PROCESSING






Chapter-1 History and Development of the computer.

Abacus:-

About 3000 years ago, the Chinese developed and used the first counting and calculating device. It is called an ABACUS. It is still used in China and many other countries i.e. Egypt, Greece, Arabia, and Europe etc. ABACUS is made of a wooden or plastic frame and used beads for counting purposes. ABACUS is a person who has been trained to use the abacus and can use it almost as quickly and correctly as we can use a calculator.

A Napier’s bone:-

In 1614 Jone Napier invented logarithms and a device called Napier’s bones or rods. The rods helped to multiply numbers. These rods not only simplified tedious calculations but also were fast and accurate. Let see the example of calculation.

1 2 3 4 5 6 7 8 9
2 4 8 16 32 64 128 256 512

Multiplication of two numbers
8  64 = 512

In first row 8 below of 3, and 64 below of 6, as 3+6=9, and 512 is below of 9.

Slide Rule:-

Napier’s idea of logarithm gave birth to another very useful and commonly used calculating device called SLIDE RULE. A slide rule consists of two scales one is the rule and other is the slide. The ruled is made up of two sets of scales joined together with a space between them. The space is just enough for free movement of the slide, which carries other set of scales on its both sides. It has moving transparent rectangular piece called cursor.

Pascal’s adding Machine:-

A 19-year-old man named Blaise Pascal in 1642 invented the first mechanical calculating machine. His machine was called PASCALINE, and about 50 models were made. It was a wooden box that could only add and subtract by a series of gears and wheels. When each wheel rotated one revolution. Blaise Pascal invented the Pascaline to help make his father’s job as a tax accountant easier.

Leibniz Calculator:-

In 1673, in Germany, Gottfried Leibniz invented the Leibniz calculator. Not only could it add and subtract but it could also multiplication and division, and do square roots. It too was mechanical, but a hand crank sped up the work of this calculator.

Difference Engine:-
An early computer like mechanical device designed by British mathematician and scientist Charles Babbage in the early 1820s. The Difference Engine was intended to be a machine with a 20-decimal capacity capable of solving mathematical problems. The concept of the Difference Engine was enhanced by Babbage in the 1830s in the design of his more famous Analytical Engine, a mechanical precursor of the electronic computer.
Analytical Engine:-
A mechanical calculating machine designed by British mathematician Charles Babbage in 1833 but never completed. It was the first general-purpose digital computer. His Analytical Engine consisted of five units i.e. Store unit, Control unit, Mill and Input Output units.
Input Unit:- this unit was used to input data to machine like Keyboard.
Output Unit:- This unit was used to gave the result.
Store Unit:- This unit was store the data, which had to be processing.
Control Unit:- This unit was used to control all other devices of the machine.
Mill:- This unit was used for arithmetic calculation.

Hollerith Tabulating/recording machine:-
An electromechanical machine invented by Herman Hollerith in the late 1800s for processing data supplied in the form of holes punched at predetermined locations in cards. Contacts made through the holes completed electrical circuits, allowing signals to be passed to counting and tabulating devices. This machine is considered to have reduced the time required to finish the 1890 U.S. census by two-thirds. Such machines were manufactured in the early 1900s by Hollerith's Tabulating Machine Company, which eventually became the International Business Machines Corporation

Mark – I:-
An electromechanical calculating machine designed in the late 1930s and early 1940s by Howard Aiken of Harvard University and built by IBM. Also called Automatic Sequence Controlled Calculator, Harvard Mark I. The first fully electronic stored-program computer designed and built at Manchester University in England. It successfully executed its first program in June 1948. The first commercial computer, which was based on the Manchester Mark I and released in 1951.

Generations of Computer.

First Generation. (1942 – 1959)

The technology that used in that generation of computers were vacuum tubes. There are about 17,468 vacuum tubs, and 6000 manual switches were used in single computer. Consumption of the electricity about 150 KW, and the size of the computer about 1800 sqf, and weight is about 30 tones (30000 kgs). Only expert peoples could use those computers. The following computers were used in that generation EDSAC (Electronic Delayed Storage Automatic Computer) and EDVAC (Electronic Discrete Variable Automatic Computer) and ENIAC (Electronic Numerical Integrator And Computer)

Second Generation. (1959 - 1965)

The main and important technology was introducing Transistor that worked in place of vacuum tub. Size of transistor was small to vacuum tube, and also reduces the consumption of electricity, and size of computer. Speed of computer fast, stored large amount of data, produce less heat. Also introduce some output devices such as magnetic tape, magnetic disk, card readers and printer etc. IBM – 704 was popular computer of that generation.

Third Generation. (1965 – 1973)

The main technology that introduce in that generation was ICs(Integrated Circuits). Which brought revolution in the field of computer. Size of computer reduce, used little amount of power and their speed and storage capacity increased. Mainframe and minicomputers and networking facilities were introduced. Some software company developed software for company i.e. payroll, billing and other business tasks. Some popular computers i.e. IBM 360, PDP 8 and ICL 1900 etc.





Fourth Generation. (1973 – )
Actual revolution in computer field started from this generation, when microprocessor was introduced. The microprocessor is a single silicon chip, but there are million of integrated circuits in this one chip. Which performs all Arithmetically, Logically and control the system. First processor Intel 4004 was 4-bits, then Intel introduce 8 and 16 bits processors. Micro computer (PC) is introduced; size and price of computers reduce. Commercial using of computer increase, each organization used to computer for their own purposes.

Fifth Generation. (work on progress )
Fifth-generation computers are expected to combine very-large-scale integration (VLSI) with sophisticated approaches to computing, including artificial intelligence and true distributed processing. The scientists are trying to make a computer, which have thinking and acting capabilities.

Types of Computers

Analog Computer
Analog computer measures data varying continuously in value, such as speed, temperature, pressure, voltage and current etc. Analog computers are special purpose computer and used in scientific laborites and industries etc. The speed of these computers are fast but accuracy is not 100%. Examples are analog watch, mercury thermometer, speedometer etc.

Digital Computer
A computer in which operations are based on two or more discrete states. Binary digital computers are based on two logical states "ON" and "OFF," (0 and 1) represented by two voltage levels, arrangements of which are used to represent all types of information-numbers, letters, graphics symbols, and program instructions. It is a general-purpose computer, these types of computers are used everywhere such as at home, schools, offices, laborites etc. the speed and accuracy also well. The input, output and processing of the computer in form of digits.

Hybrid Computer
The computer that contains both digital and analog circuits is called hybrid computer. It is also a special purpose computer used in special laborites such as hospital to carry out medical investigation, and in industries to monitors the productions & function of machines etc. these types of computer have the capabilities of both data i.e. digital and analog.

Classification of Computers

Supercomputers

Supercomputers are largest fastest and most expensive computers developed in 1980s to handle complicated problems. Thousands of processors are used in these computers. These have extraordinary computing power required by large organizations, scientific laboratories, etc.

Supercomputers are used in space exploration forecasting weather, aircraft design, and nuclear researches. They are used in a time-sharing mode in which thousands of users can be attached to a supercomputer at the same time. Some of the supercomputers are CRAY-1 and CRAY – 2 and CYBER 205.

Mainframe Computers

A high-level, typically large and expensive computer designed to handle intensive computational tasks. Mainframe computers are characterized by their ability to simultaneously support many users connected to the computer by terminals. Mainframe Computers have a large amount of speed, memory etc. Large organizations are used these type of computers such as Banks, Universities, Govt. organizations, Airlines etc. The different user perform different task at a same time. The popular mainframe computers are IBM 4341 & CYBER 176.


Minicomputers

Mid-level computer built to perform complex computations. Minicomputers also frequently connect to other minicomputers on a network and distribute processing among all the attached computers. Minicomputers are used heavily in transaction-processing applications and as interfaces between mainframe computer systems and wide area networks. Minicomputer works and others functions same as mainframe computer, but one step down from mainframe computers and as one step up from Microcomputer.. Usually used in same building like Banks, Colleges, Industries etc.

Microcomputers

A computer built around a single-chip (CPU) microprocessor. Less powerful than minicomputers and mainframes, microcomputers have nevertheless evolved into very powerful machines capable of complex tasks. Microcomputers introduce in 1970s, when microprocessor was invented. These types of computer are very popular, because less prices, small size, and easy handling, use everywhere such as in offices, homes, Schools etc.

Impact of computer and Internet on Society

Computer and Society

From last 20 & 25 years computer has an important role in our society. All system of the world has computerized i.e. our banks, airplanes, factories, school, college, universities, office, transport, Education system, all laborites etc. If we want to go with computerized world then we must to learn computer, and as day-by-day the using of computer becoming easily, any person can use computer easily.

Computer makes us more productive in many of our jobs. In education they can help us for better understanding faster learning and broaden our thinking. And as in health department computer have an important roll, especially in medicine and treatment. It is help us to do thing efficiently and accurately.

Social disadvantages of computer. These are unemployment due to automation, wastage of time and energy in useless computer activities, no data security, personal privacy and computer crime and miss used of Internet & time etc.

Internet and Society or the roll of Internet in our Society

Internet: The Internet was launched by the U.S Defence Department in the late 1960’s. By the early 1990’s the Internet’s popularity had grown considerably.

Internet is an extension of the Network System to the entire world. It is an electronic highway that connects various networks around the world. These networks belong to government agencies, universities, libraries and big business house of those countries in which these networks are working. A user can send messages, get any kind of information, seek jobs, get admission, selling and purchasing etc.

Internet and Society:-

From last some years the Internet has become very popular in all over the world, every person of the society is using net for their own purposes. As every organization i.e. Government organization, Universities, Colleges, Schools, Offices are used the Internet for their own benefits.

The Internet offers many kinds of features, we can send and receive e-mail, we can read any newspaper, magazines, academic papers, government documents, books etc. We can find Jobs, We can get admission in any university of the World. We can meet with people to exchange information with each other. We can do shopping.

Internet has now become the need of most of us because of the vast array of information and activities possible with it.


Application of computer in various Organizations.

Applications in Business

Computer has an important roll in all kind of business i.e. from a shop to big industries. Every businessmen can use it for their own business, because which is used to keep record of items, inventory reports, report of sale and purchase, report of accounts, bank statements, Tax report, salary of employees, report of creditor and debtors etc.

Applications in Banks

Banks are the largest users of computers, since largest paperwork handling problems are found in the banking. Computers are used for day-to-day processing of customer’s accounts and the processing and clearing of cheques is now a routine in all banks throughout the world. Banks also use computers for maintaining loan accounts, saving account’s deposits and withdrawals. Also banks issue credit card to customers.

Stock Exchange Applications

Before using of computers in stock exchange all trading was manually, which created problems to customers and Security and Exchange Commission. It was very difficult to maintain and tally all transactions at end of every day. As computer has solved these problems, and also increase the volumes of the stock exchange business. And now a day every person can easily understand the stock exchange business, and also satisfied from the business.

Retailing Applications

The black and white bar code printed on most of the products offered for sale in the store is called (UPC) Universal Product Code. This code is the key to computer controlled store checkout. The computers use this code through optical sensor to determine product’s name and price it is also updating the store’s items list, warning the manager about an item going to be short. As at the end of the day computer gave detail information about daily sale and remaining stock and balance.

Application in Education

It is essential every educated person becomes familiar with the computer. The ability to use computers in a basic and necessary to a person’s formal education as reading, writing and arithmetic. There are number of methods in which educational institutions can use computers to educate the students.

Computer Assisted Instructions (CAI) OR What is meat by CAI?

It does not involve teaching about computers but rather using computer as an aid in the classroom instruction of a particular subject matter. CAI is a system of individualized instruction that uses a programme presented by a computer as the learning medium. There are four major types of CAI systems.
1. Drill and Practice 2. Tutorial 3. Dialog 4. Testing.

Drill and Practice: - The role of the computer is to provide regular review and practice on basic concepts and skills. It is usually used in math and foreign languages for spelling, typing, and other similar tasks.

Tutorial: - In this method present subject material give to students and conducts check on their progress directly.

Dialog:- Dialog is a complicated form of teaching in which the computer and the student carry on a conversation.

Testing:- Computer are ideal test givers, particularly for matching, true or false and multiple choice tests etc.



Computer Managed Instructions (CMI) OR What is meat by CMI

In a computer managed instruction (CMI) system, instead of teaching, the computer assigns a certain topic to student to read it, listen certain tape attend certain lecture and so on. On completing the assignment, the student returns to the computer for testing and further assignment. A CMI system has the following objectives:

The collection and processing of student’s information.
Instructional information.
Passing of this information to the teacher in summarized form so that it can be used to help the student.

Computer Based Simulations

A simulate is to copy the behavior of one system with a different dissimilar system. A simulation model system implemented on a computer provides students with real life situations. In chemistry, simulation models have been developed to conduct experiments by simulating instruments and chemicals. In business, students can learn management techniques by operating a simulated business. A physics student can even explode a simulated atomic reactor and watch the nuclear reaction in slow motion.

Computer Aided Problem Solving

Students can use computers as problem solving tools. For that the students must learn how to develop a plan so that they could get the solution of their problem. Computer aided problem solving is the highest form of computer enhanced learning activity, students explore and organize material from a course by using the computer as an aid to problem solving. Problem solving is a creative process. The student must understand the problem completely. The student must be able to select or develop a plan for a problem solution, and must be able to implement the problem solution in the form of computer program.

Computer as a Subject of Instruction

Upto 1970’s computer science did not exist as an academic discipline in Pakistan. Today computer science degrees programmed are offered at bachelor and master’s level at many universities and colleges. During the past few years many secondary schools and institutions have introduced microcomputer-programming courses. To be computer literate one must be able to define, demonstrate, and / or discuss:

• How computer are used?
• How computer do their work?
• How computers are programmed?
• How to use a computer?
• How computers affect our society?

Application in Medical Field

Although computer has been introduced quite recently in the medical field. It is changing the very structure of society’s health care system. It is used for basic tasks such as keeping track of patient’s appointments, diagnosis and treatment procedure. Also the new technologies are computerized, which have good accuracy in result of checkup and test etc. The most general use of a computer in hospital is business oriented such as accounting, payroll, billing and inventory control.

Application in Science

Computer finds vast applications in the field of science and research such as in physics, chemistry, mathematics, biological sciences, medical science, Agricultural science, Astrophysics, Geophysics, Nuclear Physics, meteorological study, communication, space travel, etc. It is fact today it is impossible to carry out scientific researches without computers. Computer scientists are engaged in developing software for the users to fulfill their ever-increasing demands.



Product Design and Manufacturing OR What is meant by CAD

Computer Aided Design (CAD) software provides product designers with a way not only to develop a representation of the product, but also test the product design in a variety of simulated environment. Companies that evolved in the business of manufacturing products have found new ways to use computers in every aspect of product development.


Programming Languages OR Computer Languages

The only way, which is used to commutation with computer, is programming. With the help of program we communicate with computer. A computer program is a set of instructions that perform a specific task. The process of writing these instructions (program) is called Programming. There are three basic types of languages, which are used for programming:

1. Machine Languages 2. Assembly Languages 3. High Level Languages.


1. Machine language / Low Level Language


Machine language is used binary codes (0s and 1s), which is easily understandable to computer. As there is no translator is used in low level or machine language. A Low Level or Machine Language is designed for a particular computer according to its internal codes. A low level language is a machine-oriented language. Evidently, a low level programming language is difficult to learn, it needs a great deal of study to be mastered.

2. Assembly Language or Medium language

Assembly language is special type of language, which is easy to compare with low level or machine language. There are some abbreviations are used for a particular purposes. i.e. HLT used for stop processing, ADD for addition, MUL for multiplication, STO for store to data and LDA used for Load the data into memory.

In Assembly language a translator (Assembler) has used to covert the program codes into machine language.

3. High Level Language or Symbolic Language

A high level programming language is designed to suit the needs f the programmer. These languages are easy to understand because they closely resemble the English language. Every High Level Language have a translator for compilation. High-level languages are good for writing well organized programs business processing, games, graphics, Web, scientific and technical calculations etc. Common high-level languages are BASIC, COBOL, FORTRAN, PASCAL, C/C++, JAVA etc.


Language Processor or Language Translator

We know computer understands only machine language, and we have use high-level languages for programming. So, computer processor needs a medium, which translate high-level language into machine language or machine codes.
As a computer programmer has used to translator for translation of High Level Language. As each High level language has a translator, which convert high level language program into machine codes, and find error in program and then after debugging run the program output.

There are three types of translator are used i.e. INTERPRETER, COMPILER & ASSEMBLER

INTERPRETER

Interpreter is used to translate and executes a program written in a high level language. Interpreter translates statements of the program line by line, translation begins from start and stop at the end of program. If found any error in program line stop the translating process, and display the error, after removing the error, then translating begin from start, as we say interpreter is slow compare to compiler. Interpreter is used in BASIC, Visual-Basic, FoxPro etc.



COMPILER

It is also a type of translator is used to convert High Level Language into Machine Codes. This conversion is called compilation. Compiler reads whole program at once, if found any error in the program, display the errors at the end of compilation other wise display the output of the program. Compiler is used in C / C ++, COBOL etc.


ASSEMBLER

Assembler is also a type of translator that used to translate Assembly Language into Machine codes.

No comments: