You are on page 1of 52

SEMIT

SEMIT

Introduction to Computer
FULL FORM OF COMPUTER C- COMMON, O- OPERATING, M- MACHINE, P- PARTICULAR, U- USER, T- TRADE E- EDUCATION, R- RESEARCH

What is Computer : Computer is an electronic device that is designed to work with Information. The term computer is derived from the Latin termcomputare, this means to calculate. Computer cannot do anything without a Program.it represents the decimal numbers through a string of binary digits. The Word 'Computer usually refers to the Center Processor Unit plus Internal memory. Computer is an advanced electronic device that takes raw data as input from the user and processes these data under the control of set of instructions (called program) and gives the result (output) and saves output for the future use. It can process both numerical and non-numerical (arithmetic and logical) calculations. The basic components of a modern digital computer are: Device, Output, and Central Processor. A Typical modern computer uses LSI Chips. Charles Babbage is called the "Grand Father" of the computer. The First mechanical computer designed by Charles Babbage was called Analytical Engine. It uses read-only memory in the form of punch cards.

SEMIT

ADALPURA (SHITLA DHAM)

MIRZAPUR

SEMIT

SEMIT

Block Diagram of Computer and Explain its Various Components


A computer can process data, pictures, sound and graphics. They can solve highly complicated problems quickly and accurately. A computer as shown in Fig. Performs basically five major computer operations or functions irrespective of their size and make. These are

1) It accepts data or instructions by way of input, 2) It stores data, 3) It can process data as required by the user, 4) It gives results in the form of output, and 5) It controls all operations inside a computer. We discuss below each of these Computer operations

Fig: Basic computer Operations 1. Input: This is the process of entering data and programs in to the computer system. You should know that computer is an electronic machine like any other machine which takes as inputs raw data and performs some processing giving out processed data. Therefore, the input unit takes data from us to the computer in an organized manner for processing. 2. Storage: The process of saving data and instructions permanently is known as storage. Data has to be fed into the system before the actual processing starts. It is because the processing speed of Central Processing Unit (CPU) is so fast that the data has to be provided to CPU with the same speed. Therefore the data is first stored in the storage unit for faster access and processing. This storage unit or the primary storage of the computer system is designed to do the above functionality. It provides space for storing data and instructions.
SEMIT ADALPURA (SHITLA DHAM) MIRZAPUR

SEMIT

SEMIT

3. Output: This is the process of producing results from the data for getting useful information. Similarly the output produced by the computer after processing must also be kept somewhere inside the computer before being given to you in human readable form. Again the output is also stored inside the computer for further processing. 4. Control: The manner how instructions are executed and the above operations are performed. Controlling of all operations like input, processing and output are performed by control unit. It takes care of step by step processing of all operations inside the computer. 5. Processing: The task of performing operations like arithmetic and logical operations is called processing. The Central Processing Unit (CPU) takes data and instructions from the storage unit and makes all sorts of calculations based on the instructions given and the type of data provided. It is then sent back to the storage unit. FUNCTIONAL UNITS In order to carry out the operations mentioned in the previous section the computer allocates the task between its various functional units. The computer system is divided into three separate units for its operation. They are 1) Arithmetic logical unit 2) Control unit. 3) Central processing unit. Arithmetic Logical Unit (ALU) Logical Unit Logical Unit: After you enter data through the input device it is stored in the primary storage unit. The actual processing of the data and instruction are performed by Arithmetic Logical Unit. The major operations performed by the ALU are addition, subtraction, multiplication, division, logic and comparison. Data is transferred to ALU from storage unit when required. After processing the output is returned back to storage unit for further processing or getting stored. Control Unit (CU) The next component of computer is the Control Unit, which acts like the supervisor seeing that things are done in proper fashion. Control Unit is responsible for coordinating various operations using time signal. The control unit determines the sequence in which computer programs and instructions are executed. Things like processing of programs stored in the main memory, interpretation of the instructions and issuing of signals for other units of the computer to execute them. It also acts as a switch board operator when several users access the computer simultaneously. Thereby it coordinates the activities of computers peripheral equipment as they perform the input and output. Central Processing Unit (CPU) The ALU and the CU of a computer system are jointly known as the central processing unit. You may call CPU as the brain of any computer system.
SEMIT ADALPURA (SHITLA DHAM) MIRZAPUR

SEMIT

SEMIT

History of computer
Each generation of computer is characterized by a major technological development that fundamentally changed the way computers operate, resulting in increasingly smaller, cheaper, and more powerful and more efficient and reliable devices. The various generations of computers a listed below: (i) First Generation (1946-1954): In 1946 there was no 'best' way of storing instructions and data in a computer memory. There were four competing technologies for providing computer memory: electrostatic storage tubes, acoustic delay lines (mercury or nickel), magnetic drums (and disks?), and magnetic core storage. The digital computes using electronic valves (Vacuum tubes) are known as first generation computers. The first 'computer' to use electronic valves (i.e. vacuum tubes). The high cost of vacuum tubes prevented their use for main memory. They stored information in the form of propagating sound waves. The vacuum tube consumes a lot of power. The Vacuum tube was developed by Lee Deforest in 1908. These computers were large in size and writing programs on them was difficult. Some of the computers of this generation were: Mark I: The IBM Automatic Sequence Controlled Calculator (ASCC), called the Mark I by Harvard University, was an electro-mechanical computer. Mark I is the first machine to successfully perform a long services of arithmetic and logical operation. Mark I is the First Generation Computer. it was the first operating machine that could execute long computations automatically. Mark I computer which was built as a partnership between Harvard and IBM in 1944. This was the first programmable digital computer made in the U.S. But it was not a purely electronic computer. Instead the Mark I was constructed out of switches, relays, rotating shafts, and clutches. The machine weighed 5 tons, incorporated 500 miles of wire, was 8 feet tall and 51 feet long, and had a 50 ft. rotating shaft running its length, turned by a 5 horsepower electric motor. ENIAC: It was the first general-purpose electronic computer built in 1946 at University of Pennsylvania, USA by John Mauchly and J. Prosper Eckert. The completed machine was announced to the public the evening of February 14, 1946. It was named Electronic Numerical Integrator and Calculator (ENIAC). ENIAC contained 17,468 vacuum tubes, 7,200 crystal diodes, 1,500 relays, 70,000 resistors, 10,000 capacitors and around 5 million hand-soldered joints. It weighed more than 30 short tons (27 t), was roughly 8 by 3 by 100 feet (2.4 m 0.9 m 30 m), took up 1800 square feet (167 m2), and consumed 150 kW of power. Input was possible from an IBM card reader, and an IBM card punch was used for output. These cards could be used to produce printed output offline using an IBM accounting machine, such as the IBM 405. Today your favorite computer is many times as powerful as ENIAC, still size is very small.

SEMIT

ADALPURA (SHITLA DHAM)

MIRZAPUR

SEMIT

SEMIT

EDVAC: It stands for Electronic Discrete Variable Automatic Computer and was developed in 1950.it was to be a vast improvement upon ENIAC, it was binary rather than decimal, and was a stored program computer. The concept of storing data and instructions inside the computer was introduced here. This allowed much faster operation since the computer had rapid access to both data and instructions. The other advantage of storing instruction was that computer could do logical decision internally. The EDVAC was a binary serial computer with automatic addition, subtraction, multiplication, programmed division and automatic checking with an ultrasonic serial memory. EDVAC's addition time was 864 microseconds and its multiplication time was 2900 microseconds (2.9 milliseconds). The computer had almost 6,000 vacuum tubes and 12,000 diodes, and consumed 56 kW of power. It covered 490 ft (45.5 m) of floor space and weighed 17,300 lb. (7,850 kg). EDSAC: It stands for Electronic Delay Storage Automatic Computer and was developed by M.V. Wilkes at Cambridge University in 1949. Two groups of individuals were working at the same time to develop the first stored-program computer. In the United States, at the University of Pennsylvania the EDVAC (Electronic Discrete Variable Automatic Computer) was being worked on. In England at Cambridge, the EDSAC (Electronic Delay Storage Automatic Computer) was also being developed. The EDSAC won the race as the first stored-program computer beating the United States EDVAC by two months. The EDSAC performed computations in the three millisecond range. It performed arithmetic and logical operations without human intervention. The key to the success was in the stored instructions which it depended upon solely for its operation. This machine marked the beginning of the computer age.EDSAC is the first computer is used to store a program UNIVAC-1: Ecker and Mauchly produced it in 1951 by Universal Accounting Computer setup. it was the first commercial computer produced in the United States. It was designed principally by J. Presper Eckert and John Mauchly, the inventors of the ENIAC. The machine was 25 feet by 50 feet in length, contained 5,600 tubes, 18,000 crystal diodes, and 300 relays. It utilized serial circuitry, 2.25 MHz bit rate, and had an internal storage capacity 1,000 words or 12,000 characters. It utilized a Mercury delay line, magnetic tape, and typewriter output. The UNIVAC was used for general purpose computing with large amounts of input and output. Power consumption was about 120 kiva. Its reported processing speed was 0.525 milliseconds for arithmetic functions, 2.15 milliseconds for multiplication and 3.9 Milliseconds for division. The UNIVAC was also the first computer to come equipped with a magnetic tape unit and was the first computer to use buffer memory.

SEMIT

ADALPURA (SHITLA DHAM)

MIRZAPUR

SEMIT

SEMIT

Limitations of First Generation Computer


Followings are the major drawbacks of First generation computers. 1. They used valves or vacuum tubes as their main electronic component. 2. They were large in size, slow in processing and had less storage capacity. 3. They consumed lots of electricity and produced lots of heat. 4. Their computing capabilities were limited. 5. They were not so accurate and reliable. 6. They used machine level language for programming. 7. They were very expensive. Example: ENIAC, UNIVAC, IBM 650 etc. (ii) Second Generation (1955-1964): The second-generation computer used transistors for CPU components &ferrite cores for main memory & magnetic disks for secondary memory. They used high-level languages such as FORTRAN (1956), ALGOL (1960) & COBOL (1960 1961). I/O processor was included to control I/O operations. Around 1955 a device called Transistor replaced the bulky Vacuum tubes in the first generation computer. Transistors are smaller than Vacuum tubes and have higher operating speed. They have no filament and require no heating. Manufacturing cost was also very low. Thus the size of the computer got reduced considerably. It is in the second generation that the concept of Central Processing Unit (CPU), memory, programming language and input and output units were developed. The programming languages such as COBOL, FORTRAN were developed during this period. Some of the computers of the Second Generation were 1. IBM 1620: Its size was smaller as compared to First Generation computers and mostly used for scientific purpose. 2. IBM 1401: Its size was small to medium and used for business applications. 3. CDC 3600: Its size was large and is used for scientific purposes. Features: 1. Transistors were used instead of Vacuum Tube. 2. Processing speed is faster than First Generation Computers (Micro Second) 3. Smaller in Size (51 square feet) 4. The input and output devices were faster. Example: IBM 1400 and 7000 Series, Control Data 3600 etc.

SEMIT

ADALPURA (SHITLA DHAM)

MIRZAPUR

SEMIT

SEMIT

(iii) Third Generation (1964-1977): By the development of a small chip consisting of the capacity of the 300 transistors. These ICs are popularly known as Chips. A single IC has many transistors, registers and capacitors built on a single thin slice of silicon. So it is quite obvious that the size of the computer got further reduced. Some of the computers developed during this period were IBM-360, ICL-1900, IBM-370, and VAX-750. Higher level language such as BASIC (Beginners All-purpose Symbolic Instruction Code) was developed during this period. Computers of this generation were small in size, low cost, large memory and processing speed is very high. Very soon ICs were replaced by LSI (Large Scale Integration), which consisted about 100 components. An IC containing about 100 components is called LSI. Features: 1. They used Integrated Circuit (IC) chips in place of the transistors. 2. Semiconductor memory devices were used. 3. The size was greatly reduced, the speed of processing was high, they were more accurate and reliable. 4. Large Scale Integration (LSI) and Very Large Scale Integration (VLSI) were also developed. 5. The mini computers were introduced in this generation. 6. They used high level language for programming. Example: IBM 360, IBM 370 etc. (iv) Fourth Generation: An IC containing about 100 components is called LSI (Large Scale Integration) and the one, which has more than 1000 such components, is called as VLSI (Very Large Scale Integration). It uses large scale Integrated Circuits (LSIC) built on a single silicon chip called microprocessors. Due to the development of microprocessor it is possible to place computers central processing unit (CPU) on single chip. These computers are called microcomputers. Later very large scale Integrated Circuits (VLSIC) replaced LSICs. Thus the computer which was occupying a very large room in earlier days can now be placed on a table. The personal computer (PC) that you see in your school is a Fourth Generation Computer Main memory used fast semiconductors chips up to 4 M bits size. Hard disks were used as secondary memory. Keyboards, dot matrix printers etc. were developed. OS-such as MS-DOS, UNIX, and Apples Macintosh were available. Object oriented language, C++ etc were developed. Features:1. they used Microprocessor (VLSI) as their main switching element. 2. They are also called as micro computers or personal computers. 3. Their size varies from desktop to laptop or palmtop. 4. They have very high speed of processing; they are 100% accurate, reliable, diligent and versatile. 5. They have very large storage capacity. Example: IBM PC, Apple-Macintosh etc.
SEMIT ADALPURA (SHITLA DHAM) MIRZAPUR

SEMIT

SEMIT

(v) Fifth Generation (1991- continued): 5th generation computers use ULSI (Ultra-Large Scale Integration) chips. Millions of transistors are placed in a single IC in ULSI chips. 64 bit microprocessors have been developed during this period. Data flow & EPIC architecture of these processors have been developed. RISC & CISC, both types of designs are used in modern processors. Memory chips and flash memory up to 1 GB, hard disks up to 600 GB & optical disks up to 50 GB have been developed. fifth generation digital computer will be Artificial intelligence.

SEMIT

ADALPURA (SHITLA DHAM)

MIRZAPUR

SEMIT

SEMIT

Classification of Computers
Computers differ based on their data processing abilities. They are classified according to purpose, data handling and functionality. According to purpose, computers are either general purpose or specific purpose. General purpose computers are designed to perform a range of tasks. They have the ability to store numerous programs, but lack in speed and efficiency. Specific purpose computers are designed to handle a specific problem or to perform a specific task. A set of instructions is built into the machine. According to data handling, computers are analog, digital or hybrid. Analog computers work on the principle of measuring, in which the measurements obtained are translated into data. Modern analog computers usually employ electrical parameters, such as voltages, resistances or currents, to represent the quantities being manipulated. Such computers do not deal directly with the numbers. They measure continuous physical magnitudes. Digital computers are those that operate with information, numerical or otherwise, represented in a digital form. Such computers process data into a digital value (in 0s and 1s). They give the results with more accuracy and at a faster rate. Hybrid computers incorporate the measuring feature of an analog computer and counting feature of a digital computer. For computational purposes, these computers use analog components and for storage, digital memories are used. According to functionality, computers are classified as : Analog Computer An analog computer (spelt analogue in British English) is a form of computer that uses continuous physical phenomena such as electrical, mechanical, or hydraulic quantities to model the problem being solved Digital Computer A computer that performs calculations and logical operations with quantities represented as digits, usually in the binary number system Hybrid Computer (Analog + Digital) A combination of computers those are capable of inputting and outputting in both digital and analog signals. A hybrid computer system setup offers a cost effective method of performing complex simulations.

SEMIT

ADALPURA (SHITLA DHAM)

MIRZAPUR

SEMIT

10

SEMIT

On the basis of Size


Super Computer The fastest and most powerful type of computer Supercomputers are very expensive and are employed for specialized applications that require immense amounts of mathematical calculations. For example, weather forecasting requires a supercomputer. Other uses of supercomputers include animated graphics, fluid dynamic calculations, nuclear energy research, and petroleum exploration. The chief difference between a supercomputer and a mainframe is that a supercomputer channels all its power into executing a few programs as fast as possible, whereas a mainframe uses its power to execute many programs concurrently. Mainframe Computer A very large and expensive computer capable of supporting hundreds, or even thousands, of users simultaneously. In the hierarchy that starts with a simple microprocessor (in watches, for example) at the bottom and moves to supercomputers at the top, mainframes are just below supercomputers. In some ways, mainframes are more powerful than supercomputers because they support more simultaneous programs. But supercomputers can execute a single program faster than a mainframe. Mini Computer A midsized computer. In size and power, minicomputers lie between workstations and mainframes. In the past decade, the distinction between large minicomputers and small mainframes has blurred, however, as has the distinction between small minicomputers and workstations. But in general, a minicomputer is a multiprocessing system capable of supporting from 4 to about 200 users simultaneously. Micro Computer or Personal Computer

Desktop Computer: a personal or micro-mini computer sufficient to fit on a desk. Laptop Computer: a portable computer complete with an integrated screen and keyboard. It is generally smaller in size than a desktop computer and larger than a notebook computer. Palmtop Computer/Digital Diary /Notebook /PDAs: a hand-sized computer. Palmtops have no keyboard but the screen serves both as an input and output device. Workstations A terminal or desktop computer in a network. In this context, workstation is just a generic term for a user's machine (client machine) in contrast to a "server" or "mainframe."

SEMIT

ADALPURA (SHITLA DHAM)

MIRZAPUR

SEMIT

11

SEMIT

Characteristic of a Computer
Basic characteristics about computer are: 1. Speed: - As you know computer can work very fast. It takes only few seconds for calculations that we take hours to complete. You will be surprised to know that computer can perform millions (1,000,000) of instructions and even more per second. Therefore, we determine the speed of computer in terms of microsecond (10-6 part of a second) or nanosecond (10 to the power -9 part of a second). From this you can imagine how fast your computer performs work. 2. Accuracy: - The degree of accuracy of computer is very high and every calculation is performed with the same accuracy. 3. Diligence: - A computer is free from tiredness, lack of concentration, fatigue, etc. It can work for hours without creating any error. If millions of calculations are to be performed, a computer will perform every calculation with the same accuracy. Due to this capability it overpowers human being in routine type of work. 4. Versatility: - It means the capacity to perform completely different type of work. You may use your computer to prepare payroll slips. Next moment you may use it for inventory management or to prepare electric bills. 5. Power of Remembering: - Computer has the power of storing any amount of information or data. Any information can be stored and recalled as long as you require it, for any numbers of years. It depends entirely upon you how much data you want to store in a computer and when to lose or retrieve these data. 6. No IQ: - Computer is a dumb machine and it cannot do any work without instruction from the user. It performs the instructions at tremendous speed and with accuracy. It is you to decide what you want to do and in what sequence. So a computer cannot take its own decision as you can. 7. No Feeling: - It does not have feelings or emotion, taste, knowledge and experience. Thus it does not get tired even after long hours of work. It does not distinguish between users. 8. Storage: - The Computer has an in-built memory where it can store a large amount of data. You can also store data in secondary storage devices such as floppies, which can be kept outside your computer and can be carried to other computers.

SEMIT

ADALPURA (SHITLA DHAM)

MIRZAPUR

SEMIT

12

SEMIT

Uses of Computer
Education: Getting the right kind of information is a major challenge as is getting information to make sense. College students spend an average of 5-6 hours a week on the internet. Research shows that computers can significantly enhance performance in learning. Students exposed to the internet say they think the web has helped them improve the quality of their academic research and of their written work. One revolution in education is the advent of distance learning. This offers a variety of internet and videobased online courses. Health and Medicine: Computer technology is radically changing the tools of medicine. All medical information can now be digitized. Software is now able to computer the risk of a disease. Mental health researchers are using computers to screen troubled teenagers in need of psychotherapy. A patient paralyzed by a stroke has received an implant that allows communication between his brain and a computer; as a result, he can move a cursor across a screen by brainpower and convey simple messages. Science: Scientists have long been users of it. A new adventure among scientists is the idea of a collaborator, an internet based collaborative laboratory, in which researchers all over the world can work easily together even at a distance. An example is space physics where space physicists are allowed to band together to measure the earths ionosphere from instruments on four parts of the world. Business: Business clearly sees the interest as a way to enhance productivity and competitiveness. Some areas of business that are undergoing rapid changes are sales and marketing, retailing, banking, stock trading, etc. Sales representatives not only need to be better educated and more knowledgeable about their customers businesses, but also must be comfortable with computer technology. The internet has become a popular marketing tool. The world of cybercast has come to banking not only smart cards but internet banking, electronic deposit, bill paying, online stock and bond trading, etc. Recreation and Entertainment: Our entertainment and pleasure-time have also been affected by computerization. For example: i) In movies, computer generated graphics give freedom to designers so that special effects and even imaginary characters can play a part in making movies, videos, and commercials. ii) In sports, computers compile statistics, sell tickets, create training programs and diets for athletes, and suggest game plan strategies based on the competitors past performance.

SEMIT

ADALPURA (SHITLA DHAM)

MIRZAPUR

SEMIT

13

SEMIT

Government: Various departments of the Government use computer for their planning, control and law enforcement activities. To name a few Traffic, Tourism, Information & Broadcasting, Education, Aviation and many others. DE fence: There are many uses computers in DE fence such as: 1) Controlling UAV or unmanned air-crafts an example is Predator. If you have cable I would recommend watching the shows Future Weapons" and Modern Marvels". The show future weapon gives an entire hour to the predator. 2) They are also used on Intercontinental Ballistic Missiles (ICBMs) that use GPS and Computers to help the missile get to the target. 3) Computers are used to track incoming missiles and help slew weapons systems onto the incoming target to destroy them. 4) Computers are used in helping the military find out where all their assets are (Situational Awareness) and in Communications/Battle Management Systems. Sports: In today's technologically growing society, computers are being used in nearly every activity. Recording Information Official statistics keepers and some scouts use computers to record statistics, take notes and chat online while attending and working at a sports event. Analyzing Movements The best athletes pay close attention to detail. Computers can slow recorded video and allow people to study their specific movements to try to improve their tendencies and repair poor habits. Writers Many sportswriters attend several sporting events a week and they take their computers with them to write during the game or shortly after while their thoughts are fresh in their mind. Scoreboard While some scoreboards are manually updated, most professional sports venues have very modern scoreboards that are programmed to update statistics and information immediately after the information is entered into the computer. Safety Computers have aided in the design of safety equipment in sports such as football helmets to shoes to mouth guards
SEMIT ADALPURA (SHITLA DHAM) MIRZAPUR

SEMIT

14

SEMIT

INPUT DEVICE
Any information or data that's entered or sent to the computer to be processed is considered input. Input or user input is most often sent to the computer using an input device such as a keyboard or mouse. In the picture to the right, is an example of input being sent from the computer keyboard to the computer.

Following are few of the important input devices, which are used in Computer Systems:

Keyboard Mouse Joystick Light pen Track Ball Scanner Graphic Tablet Microphone Magnetic Ink Card Reader (MICR) Optical Character Reader (OCR) Bar Code Reader Optical Mark Reader Keyboard Most common and very popular input device is keyboard. The keyboard helps in inputting the data to the computer. The layout of the keyboard is like that of traditional typewriter, although there are some additional keys provided for performing some additional functions. Keyboards are of two sizes 84 keys or 101/102 keys, but now 104 keys or 108 keys keyboard is also available for Windows and Internet. The keys are following

SEMIT

ADALPURA (SHITLA DHAM)

MIRZAPUR

SEMIT

15

SEMIT

Sr. No. 1

Keys

Description These keys include the letter keys (A-Z) and digits keys (0-9) which generally give same layout as that of typewriters. It is used to enter numeric data or cursor movement. Generally, it consists of a set of 17 keys that are laid out in the same configuration used by most adding machine and calculators. The twelve functions keys are present on the keyboard. These are arranged in a row along the top of the keyboard. Each function key has unique meaning and is used for some specific purpose. These keys provide cursor and screen control. It includes four directional arrow key. Control keys also include Home, End, Insert, Delete, Page Up, Page Down, Control(Ctrl), Alternate(Alt), Escape(Esc). Keyboard also contains some special purpose keys such as Enter, Shift, Caps Lock, Num Lock, Space bar, Tab, and Print Screen.

Typing Keys

Numeric Keypad

Function Keys

Control keys

Special Purpose Keys

SEMIT

ADALPURA (SHITLA DHAM)

MIRZAPUR

SEMIT

16

SEMIT

Mouse
Mouse is most popular Pointing device. It is a very famous cursor-control device. It is a small palm size box with a round ball at its base which senses the movement of mouse and sends corresponding signals to CPU on pressing the buttons. Generally, it has two buttons called left and right button and scroll bar is present at the mid. Mouse can be used to control the position of cursor on screen, but it cannot be used to enter text into the computer.

ADVANTAGES

Easy to use Not very expensive Moves the cursor faster than the arrow keys of keyboard.

Joystick
Joystick is also a pointing device, which is used to move cursor position on a monitor screen. It is a stick having a spherical ball at its both lower and upper ends. The lower spherical ball moves in a socket. The joystick can be moved in all four directions. The function of joystick is similar to that of a mouse. It is mainly used in Computer Aided Designing (CAD) and playing computer games.

SEMIT

ADALPURA (SHITLA DHAM)

MIRZAPUR

SEMIT

17

SEMIT

Light Pen
Light pen is a pointing device, which is similar to a pen. It is used to select a displayed menu item or draw pictures on the monitor screen. It consists of a photocell and an optical system placed in a small tube. When light pen's tip is moved over the monitor screen and pen button is pressed, its photocell sensing element, detects the screen location and sends the corresponding signal to the CPU.

Track Ball
Track ball is an input device that is mostly used in notebook or laptop computer, instead of a mouse. This is a ball, which is half inserted and by moving fingers on ball, pointer can be moved. Since the whole device is not moved, a track ball requires less space than a mouse. A track ball comes in various shapes like a ball, a button and a square.

Scanner
Scanner is an input device, which works more like a photocopy machine. It is used when some information is available on a paper and it is to be transferred to the hard disc of the computer for further manipulation. Scanner captures images from the source which are then converted into the digital form that can be stored on the disc. These images can be edited before they are printed.

SEMIT

ADALPURA (SHITLA DHAM)

MIRZAPUR

SEMIT

18

SEMIT

Digitizer
Digitizer is an input device, which converts analog information into a digital form. Digitizer can convert a signal from the television camera into a series of numbers that could be stored in a computer. They can be used by the computer to create a picture of whatever the camera had been pointed at. Digitizer is also known as Tablet or Graphics Tablet because it converts graphics and pictorial data into binary inputs. A graphic tablet as digitizer is used for doing fine works of drawing and images manipulation applications.

Microphone
Microphone is an input device to input sound that is then stored in digital form. The microphone is used for various applications like adding sound to a multimedia presentation or for mixing music.

Magnetic Ink Card Reader (MICR)


MICR input device is generally used in banks because of a large number of cheques to be processed every day. The bank's code number and cheque number are printed on the cheques with a special type of ink that contains particles of magnetic material that are machine readable. This reading process is called Magnetic Ink Character Recognition (MICR). The main advantage of MICR is that it is fast and less error prone.

SEMIT

ADALPURA (SHITLA DHAM)

MIRZAPUR

SEMIT

19

SEMIT

Optical Character Reader (OCR)


OCR is an input device used to read a printed text. OCR scans text optically character by character, converts them into a machine readable code and stores the text on the system memory.

Bar Code Readers


Bar Code Reader is a device used for reading bar coded data (data in form of light and dark lines). Bar coded data is generally used in labeling goods, numbering the books, etc. It may be a hand-held scanner or may be embedded in a stationary scanner. Bar Code Reader scans a bar code image, converts it into an alphanumeric value, which is then fed to the computer to which bar code reader is connected.

Optical Mark Reader (OMR)


OMR is a special type of optical scanner used to recognize the type of mark made by pen or pencil. It is used where one out of a few alternatives is to be selected and marked. It is specially used for checking the answer sheets of examinations having multiple choice questions.

SEMIT

ADALPURA (SHITLA DHAM)

MIRZAPUR

SEMIT

20

SEMIT

OUTPUT DEVICE

Any information that has been processed and comes from a computer or computer device is considered output. When someone is viewing output, they're seeing it on an output device such as a computer monitor or a hard copy prints out. In the picture to the right, is an example of output being sent from the computer to a printer? Following are few of the important output devices, which are used in Computer Systems:

Monitors Graphic Plotter Printer

Monitors
Monitor commonly called as Visual Display Unit (VDU) is the main output device of a computer. It forms images from tiny dots, called pixels that are arranged in a rectangular form. The sharpness of the image depends upon the number of the pixels. There are two kinds of viewing screen used for monitors:

Cathode-Ray Tube (CRT) Flat-Panel Display

Cathode-Ray Tube (CRT) Monitor


In the CRT, display is made up of small picture elements called pixels for short. The smaller the pixels, the better the image clarity or resolution. It takes more than one illuminated pixel to form whole character, such as the letter 'e' in the word help. A finite number of characters can be displayed on a screen at once. The screen can be divided into a series of character boxes - fixed location on the screen where a standard character can be placed. Most screens are capable of displaying 80 characters of data horizontally and 25 lines vertically. There are some disadvantages of CRT:

Large in Size High power consumption

SEMIT

ADALPURA (SHITLA DHAM)

MIRZAPUR

SEMIT

21

SEMIT

Flat-Panel Display Monitor


The flat-panel display refers to a class of video devices that have reduced volume, weight and power requirement compared to the CRT. You can hang them on walls or wear them on your wrists. Current uses for flat-panel displays include calculators, video games, monitors, laptop computer, graphics display.

The flat-panel displays are divided into two categories:

Emissive Displays - The emissive displays are devices that convert electrical energy into light. Examples are plasma panel and LED (Light-Emitting Diodes).

Non-Emissive Displays - The Non-emissive displays use optical effects to convert sunlight or light from some other source into graphics patterns. Example is LCD (Liquid-Crystal Device)

SEMIT
SCHOOL OF EDUCTIONAL MNAGAMENT &INFORMATION TECHNOLOGY

SEMIT

ADALPURA (SHITLA DHAM)

MIRZAPUR

SEMIT

22

SEMIT

PRINTERS

Printer is the most important output device, which is used to print information on paper. There are two types of printers:

Impact Printers Non-Impact Printers

Impact Printers
The printers that print the characters by striking against the ribbon and onto the paper, are called impact printers. Characteristics of Impact Printers are the following:

Very low consumable costs Impact printers are very noisy Useful for bulk printing due to low cost There is physical contact with the paper to produce an image These printers are of two types:

Character printers Line printers

Character Printers:
Character Printers are printers, which print one character at a time. These are of further two types:

Dot Matrix Printer (DMP) Daisy Wheel

SEMIT

ADALPURA (SHITLA DHAM)

MIRZAPUR

SEMIT

23

SEMIT

Dot Matrix Printer


In the market, one of the most popular printers is Dot Matrix Printer because of their ease of printing features and economical price. Each character printed is in form of pattern of Dot's and head consists of a Matrix of Pins of size (5*7, 7*9, 9*7 or 9*9) which comes out to form a character that is why it is called Dot Matrix Printer. Advantages

Inexpensive Widely Used Other language characters can be printed Disadvantages

Slow Speed Poor Quality

Daisy Wheel
Head is lying on a wheel and Pins corresponding to characters are like petals of Daisy (flower name) that is why it is called Daisy Wheel Printer. These printers are generally used for word-processing in offices which require a few letters to be send here and there with very nice quality representation. Advantages

More reliable than DMP's Better quality The fonts of character can be easily changed. Disadvantages

Slower than DMP's Noisy More expensive than DMP's

SEMIT

ADALPURA (SHITLA DHAM)

MIRZAPUR

SEMIT

24

SEMIT

Line Printers
Line printers are printers, which print one line at a time.

These are of further two types:


Drum Printer Chain Printer

Drum Printer
This printer is like a drum in shape so it called drum printer. The surface of drum is divided into number of tracks. Total tracks are equal to size of paper, i.e., for a paper width of 132 characters, Drum will have 132 tracks. A character set is embossed on track. The different character sets available in market are 48 character set, 64 and 96 characters set. One rotation of drum prints one line. Drum Printers are fast in speed and prints between 300 to 2000 lines per minute. Advantages

Very high speed Disadvantages

Very expensive Characters fonts cannot be changed

Chain Printer
In this printer, chains of character sets are used so it called Chain Printers. A standard character set may have 48, 64, 96 characters. Advantages

Character fonts can easily be changed. Different languages can be used with the same printer. Disadvantages

Noisy Do not have the ability to print any shape of characters.

SEMIT

ADALPURA (SHITLA DHAM)

MIRZAPUR

SEMIT

25

SEMIT

Non-impact Printers
The printers that print the characters without striking against the ribbon and onto the paper are called Non-impact Printers. These printers print a complete page at a time, also called as Page Printers. These printers are of two types:

Laser Printers Inkjet Printers Characteristics of Non-impact Printers:

Faster than impact printers. They are not noisy. High quality. Support many fonts and different character size.

Laser Printers
These are non-impact page printers. They use laser lights to produce the dots needed to form the characters to be printed on a page. Advantages

Very high speed. Very high quality output. Gives good graphics quality. Supports many fonts and different character sizes. Disadvantage

Expensive. Cannot be used to produce multiple copies of a document in a single printing.

SEMIT

ADALPURA (SHITLA DHAM)

MIRZAPUR

SEMIT

26

SEMIT

Inkjet Printers
Inkjet printers are non-impact character printers based on a relatively new technology. They print characters by spraying small drops of ink onto paper. Inkjet printers produce high quality output with presentable features. They make less noise because no hammering is done and these have many styles of printing modes available. Color printing is also possible. Some models of Inkjet printers can produce multiple copies of printing also. Advantages

High quality printing More reliable Disadvantages

Expensive as cost per page is high Slow as compared to laser printer

SEMIT

ADALPURA (SHITLA DHAM)

MIRZAPUR

SEMIT

27

SEMIT

Computer Memory

A memory is just like a human brain. It is used to store data and instructions. Computer memory is the storage space in computer where data is to be processed and instructions required for processing are stored. The memory is divided into large number of small parts. Each part is called cell. Each location or cell has a unique address, which varies from zero to memory size minus one. For example, if computer has 64k words, then this memory unit has 64 * 1024=65536 memory location. The address of these locations varies from 0 to 65535. Memory is primarily of three types:

Cache Memory Primary Memory/Main Memory Secondary Memory

Cache Memory
Cache memory is a very high speed semiconductor memory, which can speed up CPU. It acts as a buffer between the CPU and main memory. It is used to hold those parts of data and program which are most frequently used by CPU. The parts of data and programs are transferred from disk to cache memory by operating system, from where CPU can access them.
SEMIT ADALPURA (SHITLA DHAM) MIRZAPUR

SEMIT

28

SEMIT

ADVANTAGE

Cache memory is faster than main memory. It consumes less access time as compared to main memory. It stores the program that can be executed within a short period of time. It stores data for temporary use.

DISADVANTAGE:

Cache memory has limited capacity. It is very expensive.

Primary Memory (Main Memory)


Primary memory holds only those data and instructions on which computer is currently working. It has limited capacity and data gets lost when power is switched off. It is generally made up of semiconductor device. These memories are not as fast as registers. The data and instructions required to be processed earlier reside in main memory. It is divided into two subcategories RAM and ROM. Characteristic of Main Memory

These are semiconductor memories. It is known as main memory. Usually volatile memory. Data is lost in case power is switched off. It is working memory of the computer. Faster than secondary memories. A computer cannot run without primary memory.

SEMIT

ADALPURA (SHITLA DHAM)

MIRZAPUR

SEMIT

29

SEMIT

Secondary Memory
This type of memory is also known as external memory or non-volatile. It is slower than main memory. These are used for storing Data/Information permanently. CPU directly does not access these memories, instead they are accessed via input-output routines. Contents of secondary memories are first transferred to main memory and then CPU can access it. For example, disk, CD-ROM, DVD, etc. Characteristics of Secondary Memory

These are magnetic and optical memories. It is known as backup memory. It is non-volatile memory. Data is permanently stored even if power is switched off. It is used for storage of the data in the computer. Computer may run without secondary memory. Slower than primary memories.

SEMIT

ADALPURA (SHITLA DHAM)

MIRZAPUR

SEMIT

30

SEMIT

Computer - RAM
A RAM constitutes the internal memory of the CPU for storing data, program and program result. It is read/write memory. It is called random access memory (RAM). Since access time in RAM is independent of the address to the word that is, each storage location inside the memory is as easy to reach as other location & takes the same amount of time. We can reach into the memory at random & extremely fast but can also be quite expensive. RAM is volatile, i.e., data stored in it is lost when we switch off the computer or if there is a power failure. Hence, a backup uninterruptible power system (UPS) is often used with computers. RAM is small, both in terms of its physical size and in the amount of data it can hold. RAM is of two types:

Static RAM (SRAM) Dynamic RAM (DRAM)

Static RAM (SRAM)


The word static indicates that the memory retains its contents as long as power remains applied. However, data is lost when the power gets down due to volatile nature. SRAM chips use a matrix of 6transistors and no capacitors. Transistors do not require power to prevent leakage, so SRAM need not have to be refreshed on a regular basis. Because of the extra space in the matrix, SRAM uses more chips than DRAM for the same amount of storage space, thus making the manufacturing costs higher. Static RAM is used as cache memory needs to be very fast and small. Characteristics of the Static RAM:

It has long data lifetime There is no need to refresh Faster Used as cache memory Large size Expensive High power consumption

SEMIT

ADALPURA (SHITLA DHAM)

MIRZAPUR

SEMIT

31

SEMIT

Dynamic RAM (DRAM)


DRAM, unlike SRAM, must be continually refreshed in order for it to maintain the data. This is done by placing the memory on a refresh circuit that rewrites the data several hundred times per second. DRAM is used for most system memory because it is cheap and small. All DRAMs are made up of memory cells. These cells are composed of one capacitor and one transistor. Characteristics of the Dynamic RAM:

It has short data lifetime Need to refresh continuously Slower as compared to SRAM Used as RAM Lesser in size Less expensive Less power consumption

Computer - ROM
ROM stands for Read Only Memory. The memory from which we can only read but cannot write on it. This type of memory is non-volatile. The information is stored permanently in such memories during manufacture. A ROM stores such instructions as are required to start computer when electricity is first turned on, this operation is referred to as bootstrap. ROM chip are not only used in the computer but also in other electronic items like washing machine and microwave oven.

Following are the various types of ROM:

MROM (Masked ROM)


The very first ROMs were hard-wired devices that contained a pre-programmed set of data or instructions. These kinds of ROMs are known as masked ROMs. It is inexpensive ROM.
SEMIT ADALPURA (SHITLA DHAM) MIRZAPUR

SEMIT

32

SEMIT

PROM (Programmable Read only Memory)


PROM is read-only memory that can be modified only once by a user. The user buys a blank PROM and enters the desired contents using a PROM programmer. Inside the PROM chip, there are small fuses, which are burnt open during programming. It can be programmed only once and is not erasable.

EPROM (Erasable and Programmable Read Only Memory)


The EPROM can be erased by exposing it to ultra-violet light for a duration of up to 40 minutes. Usually, an EPROM eraser achieves this function. During programming, an electrical charge is trapped in an insulated gate region. The charge is retained for more than ten years because the charge has no leakage path. For erasing this charge, ultra-violet light is passed through a quartz crystal window (lid). This exposure to ultra-violet light dissipates the charge. During normal use the quartz lid is sealed with a sticker.

EEPROM (Electrically Erasable and Programmable Read Only Memory)


The EEPROM is programmed and erased electrically. It can be erased and reprogrammed about ten thousand times. Both erasing and programming take about 4 to 10 Ms (mile second). In EEPROM, any location can be selectively erased and programmed. EEPROMs can be erased one byte at a time, rather than erasing the entire chip. Hence, the process of re-programming is flexible but slow.

Advantages of ROM

Non-volatile in nature These cannot be accidentally changed Cheaper than RAMs Easy to test More Reliable than RAMs These are static and do not require refreshing Its contents are always known and can be verified

SEMIT

ADALPURA (SHITLA DHAM)

MIRZAPUR

SEMIT

33

SEMIT

Computer - Memory Units


It is the amount of data that can be stored in the storage unit. The storage capacity are expressed in terms of Bytes. Following are the main memory storage units:

Sr. No. Unit

Description

Bit (Binary Digit)

A binary digit is logical 0 & 1 representing a passive or an active state of a component in an electric circuit.

Nibble

A group of 4 bits is called nibble.

Byte

A group of 8 bits is called byte. A byte is the smallest unit, which can represent a data item or a character.

Word

A computer word like a byte, is a group of fixed number of bits processed as a unit which varies from computer to computer but is fixed for each computer. The length of a computer word is called word-size or word length and it may be as small as 8 bits or may be as long as 96 bits. A computer stores the information in the form of the computer words.

SEMIT

ADALPURA (SHITLA DHAM)

MIRZAPUR

SEMIT

34

SEMIT

Few higher storage units are the following:

Sr. No. Unit

Description

Kilobyte (KB)

1 KB = 1024 Bytes

Megabyte (MB)

1 MB = 1024 KB

Gigabyte (GB)

1 GB = 1024 MB

Terabyte (TB)

1 TB = 1024 GB

Petabyte (PB)

1 PB = 1024 TB

SEMIT

ADALPURA (SHITLA DHAM)

MIRZAPUR

SEMIT

35

SEMIT

HARDWARE AND SOFTWARE


Hardware - Physical components that make up a computer system

Software - Computer programs and related data that provide the instructions for telling computer hardware what to do and how to do it

Hardware and Software have a symbiotic relationship, this means that without software hardware is very limited; and without hardware, software wouldn't be able to run at all. They need each other to fulfil their potential. Standard hardware components The relationship between Hardware and Software

Hardware of a modern personal computer, can you name all the components?

A layer structure showing the relationship between various layers of software and hardware

SEMIT

ADALPURA (SHITLA DHAM)

MIRZAPUR

SEMIT

36

SEMIT

CLASSIFICATON OF SOFTWARE
You have probably used a lot of software over the years, here we are going to study the different classifications (types) of software that are out there.

Software can perform many different tasks

SEMIT

ADALPURA (SHITLA DHAM)

MIRZAPUR

SEMIT

37

SEMIT

The two main classifications of software that all programs fit under are:

System software Application software Whatever you do don't use brand names in answer questions about software types. Writing Microsoft Word will get you no marks, writing word processor will!

Without software, most hardware would sit there doing nothing or perform specific tasks. To make most hardware run we need to use software, and your task here is to select the correct type of software for each job.

SEMIT

ADALPURA (SHITLA DHAM)

MIRZAPUR

SEMIT

38

SEMIT

System software
We should know by now that system software is software that helps a computer to run. We will now look at the different types of system software out there and why each is needed: Contents

1 Operating system software 2 Utility programs 3 Library programs 4 Translator software Operating system software An operating system (OS) is a set of programs that manage computer hardware resources and provide common services for application software. The operating system is the most important type of system software in a computer system. Without an operating system, a user cannot run an application program on their computer (unless the application program is self-booting).

Xfce Graphical User Interface to a Linux operating system Time-sharing operating systems schedule tasks for efficient use of the system and may also include accounting for cost allocation of processor time, mass storage, printing, and other resources. For hardware functions such as input/output and main memory management, the operating system acts as an middleman between application programs and the computer hardware, although the application code is usually executed directly by the hardware it will frequently call the OS or be interrupted by it. Operating systems can be found on almost any device that contains a computer, from mobile phones and video game consoles to supercomputers and web servers. Examples of popular modern operating systems include android, iOS, Linux, Mac OS X and Microsoft Windows, but don't use these names in the exam!

SEMIT

ADALPURA (SHITLA DHAM)

MIRZAPUR

SEMIT

39

SEMIT

Extension: Open vs Closed Source operating systems

You might hear the words Open Source when you read about operating systems. Linux is the most well-know well-known Closed Source OS. So what does this mean?

Open Source programs are programs where you can see the code (the source), you can edit it, copy it and use source license. You can even sell it, but the person would be welcome to acquire the code for free if they want one person or one company but uses code developed by thousands of people, working for different organisat many different versions (known as distributions) of Linux out there including Ubuntu, Slack ware and Fedor

Closed Source software doesn't allow people to look at the code or adapt it. Companies normally sell closed s of Windows. Currently about 83% of desktops run the Windows OS.

Utility programs
Utility software is a type of system software designed to help analyse, configure, optimize and maintain the computer. A single piece of utility software is usually called a utility or tool. Utility software should be contrasted with application software, which allows users to do things like creating text documents, playing games, listening to music or surfing the web. Rather than providing these kinds of user-oriented or output-oriented functionality, utility software usually focuses on how the computer infrastructure (including the computer hardware, operating system, and application software and data storage) operates. Due to this focus, utilities are often rather technical and targeted at people with an advanced level of computer knowledge.

KDE System Guard monitoring the CPU usage, processes and memory usage Examples of utility software include:

Virus scanner - to protect your system from Trojans and viruses Disk defragmenter - to speed up your hard disk System monitor - to look at your current system resources File managers - to add, delete, rename and move files and folders

Library programs
Library programs are collections of resources used to develop software. These include pre-written code and subroutines.

SEMIT

ADALPURA (SHITLA DHAM)

MIRZAPUR

SEMIT

40

SEMIT

Illustration of an application which uses libvorbisfile to play an OQQ Vorbismedia file Library programs contain code and data that provide services to other programs such as interface (look and feel), printing, network code and even the graphic engines of computer games. If you have ever wondered why all Microsoft Office programs have the same look and feel, that is because they are using the same graphical user interface libraries. For computer games a developer might not have the time and budget to write a new graphics engine so they often buy graphical libraries to speed up development, this will allow them to quickly develop a good looking game that runs on the desired hardware. For example Battlefield 3 and Need for Speed both use the same Frostbite engine.

The history of game engine development Most programming languages have a standard set of libraries that can be used, offering code to handle input/output, graphics and specialist maths functions. You can also create your own custom libraries and when you start to write lots of programs with similar functionality you'll find them very useful. Below is an example of how you might import libraries into VB.NET: 'Imports the libraries allowing a program to send emails Imports System.Net.Mail 'Imports the libraries allowing a program to draw in 2D Imports System.Drawing.Drawing2D

Translator software
The final type of system software that you need to know is translator software. This is software that allows new programs to be written and run on computers, by converting source code into machine code. There are three types that we'll cover in a lot more detail shortly: Assembler - converts assembly code into machine code Interpreter - converts 3rd generation languages such as JavaScript into machine code one line at a time
SEMIT ADALPURA (SHITLA DHAM) MIRZAPUR

SEMIT

41

SEMIT

APPLICATION SOFTWARE
General purpose application software General purpose application software is a type of software that can be used for a variety of tasks. It is not limited to one particular function. For example a word processor could be classed as general purpose software as it would allow a user to write a novel, create a restaurant menu or even make a poster.

Impress presentation software inLiber Office 3.3.0 Examples of General purpose application software include: Word processors, Spreadsheet and Presentation software. Whatever you do, do not use brand names! Special purpose application software Special purpose application software is a type of software created to execute one specific task. For example a camera application on your phone will only allow you to take and share pictures. Another example would be a chess game, it would only allow you to play chess.

Chromium web browser Other examples of special purpose application software are web browsers, calculators, media players, calendar programs etc. Again, make sure that you don't use brand names!

Bespoke application software


Bespoke application software is tailor made for a specific user and purpose. For example a factory may require software to run a robot to make cars, however, it is the only factory making that car in the world, so the software required would have to be specially build for the task. Other examples might include software for the military, missile/UAV operations, software for hospitals and medical equipment, software being written inside banks and other financial institutions. There are several things to consider before purchasing bespoke software, on the plus side: Software is built for and will meet your precise needs
SEMIT ADALPURA (SHITLA DHAM) MIRZAPUR

SEMIT

42

SEMIT

However, you must also consider Software will be expensive as you have to cover all of the production costs It may take some time to develop the software, when special purpose software could be brought straight away The software is more likely to be buggy as it probably won't have thousands of clients using and testing it

SEMIT

ADALPURA (SHITLA DHAM)

MIRZAPUR

SEMIT

43

SEMIT

GENARATION OF PROGRAMING LANGUGAES There are many types of programming languages out there and you might already have heard of a few of them, for example: C++, VB.NET, HTML, Python, and Assembly. We will now look at the history of how these languages came about and what they are still useful for. In all cases keep in mind that the only thing a computer will execute is machine code or object code when it has been converted from a language to run on a processor. Generation First Second Third Fourth Body. Top{colour:red; font-style:italic }

LDA 34 1010101001100010 ADD #1 Code example 1001101010000001 STO 34 1111111110100010 (LOW) Machine Code (LOW) Assembly Code one to one

x=x+1

Language Relation to Object Code (generally)

(HIGH) Visual Basic, C, python etc.

(HIGH) SQL, CSS, Haskell etc.

--

one to many

one to many

Contents

1 First generation 2 Second generation programming 3 Third generation (High Level Languages) 4 Fourth generation First generation

The Colossus Mark 2 was the world's first electronic digital programmable computer. Operators had to write the machine code directly by setting switches. The first generation program language is pure machine code, that is just ones and zeroes, e.g. . Programmers have to design their code by hand then transfer it to a computer by using a punch card, punch tape or flicking switches. There is no need to translate the code and it will run straight away. This may sound rather archaic, but there are benefits:
SEMIT ADALPURA (SHITLA DHAM) MIRZAPUR

SEMIT

44

SEMIT

Code can be fast and efficient Code can make use of specific processor features such as special registers And of course drawbacks Code cannot be ported to other systems and has to be rewritten Code is difficult to edit and update Second generation programming As you can imagine, writing in 1s and 0s all day will leave you prone to mistakes. Secondgeneration programming languages are a way of describing Assembly code which you may have already met. By using codes resembling English programming becomes much easier. The use of these mnemonic codes such as LDA for load and STA for store means the code is easier to read and write. To convert an assembly code program into object code to run on a computer requires an Assembler and each line of assembly can be replaced by the equivalent one line of object (machine) code: Assembly Code LDA A ADD #5 STA A JMP #3 Object Code 000100110100 001000000101 -> Assembler -> 001100110100 010000000011

Assembly code has similar benefits to writing in machine code, it is a one to one relationship after all. This means that assembly code is often used when writing low level fast code for specific hardware. Until recently machine code was used to program things such as mobile phones, but with the speed and performance of languages such as C being very close to Assembly, and with C's ability to talk to processor registers, Assembly's use is declining. As you can hopefully see there are benefits to using Second-Generation Languages over FirstGeneration, plus a few other things that makes Assembly great: Code can be fast and efficient Code can make use of specific processor features such as special registers As it is closer to plain English, it is easier to read and write when compared to machine code And of course drawbacks Code cannot be ported to other systems and has to be rewritten

SEMIT

ADALPURA (SHITLA DHAM)

MIRZAPUR

SEMIT

45

SEMIT

Third generation (High Level Languages) Even though Assembly code is easier to read than machine code, it is still not straightforward to perform loops and conditionals and writing large programs can be a slow process creating a miss-mash of go to statements and jumps. Third-generation programming languages brought many programmerfriendly features to code such as loops, conditionals, classes etc. This means that one line of third generation code can produce many lines of object (machine) code, saving a lot of time when writing programs. Imperative languages - code is executed line by line, in a programmer defined sequence Third generation (High Level Languages) codes are imperative. Imperative means that code is executed line by line, in sequence. For example: 1. dim x asinteger 2. 3. x = 3 4. 5. dim y asinteger 6. 7. y = 5 8. 9. x = x + y 10. 11. console.writeline(x) 12. Would output: 8 Third generation languages can be platform independent, meaning that code written for one system will work on another. To convert a 3rd generation program into object code requires a Compiler or an Interpreter, we'll look into these in more detail very soon. To summarise: Hardware independence, can be easily ported to other systems and processors Time saving programmer friendly, one line of 3rd gen is the equivalent of many lines of 1st and 2nd gen However Code produced might not make the best use of processor specific features unlike 1st and 2nd gen Extension: Programming Paradigms There are several types of Third-generation languages that you will cover in more detail at A2. They include:

Object Orientated Event driven

Fourth generation
SEMIT ADALPURA (SHITLA DHAM) MIRZAPUR

SEMIT

46

SEMIT

Fourth-generation languages are designed to reduce programming effort and the time it takes to develop software, resulting in a reduction in the cost of software development. They are not always successful in this task, sometimes resulting in inelegant and hard to maintain code. Languages have been designed with a specific purpose in mind and this might include languages to query databases (SQL), languages to make reports (Oracle Reports) and languages to construct user interface (XUL). An example of 4th generation programming type is the declarative language --an example of a Structured Query Language (SQL) to select criminal details from a database SELECT name, height,DOBFROM criminals WHERE numScars =7; Declarative languages - describe what computation should be performed and not how to perform it. Not imperative!

An example of a declarative language is CSS which we'll learn more about when completing the web design unit /*code to change the headings on a page to green and the paragraphs to red and italic*/ h1 {color:#00FF00;} P{color:#FF0000;font-style:italic}

Types of program translator Assembler


An assembler translates assembly language into machine code. Assembly language consists of mnemonics for machine opposed so assemblers perform a 1:1 translation from mnemonic to a direct instruction. For example: LDA #4 converts to 0001001000100100 Conversely, one instruction in a high level language will translate to one or more instructions at machine level.

Advantages of using an Assembler:


Very fast in translating assembly language to machine code as 1 to 1 relationship Assembly code is often very efficient (and therefore fast) because it is a low level language Assembly code is fairly easy to understand due to the use of English-like mnemonics

Disadvantages of using Assembler:


Assembly language is written for a certain instruction set and/or processor Assembly tends to be optimised for the hardware it's designed for, meaning it is often incompatible with different hardware Lots of assembly code is needed to do relatively simple tasks, and complex programs require lots of programming time

SEMIT

ADALPURA (SHITLA DHAM)

MIRZAPUR

SEMIT

47

SEMIT

Compiler
A Compiler is a computer program that translates code written in a high level language to a lower level language, object/machine code. The most common reason for translating source code is to create an executable program (converting from a high level language into machine language).

Advantages of using a compiler


Source code is not included, therefore compiled code is more secure than interpreted code Tends to produce faster code than interpreting source code Produces an executable file, and therefore the program can be run without need of the source code

Disadvantages of using a compiler


Object code needs to be produced before a final executable file, this can be a slow process The source code must be 100% correct for the executable file to be produced

Interpreter
An interpreter program executes other programs directly, running through program code and executing it line-by-line. As it analyses every line, an interpreter is slower than running compiled code but it can take less time to interpret program code than to compile and then run it this is very useful when prototyping and testing code. Interpreters are written for multiple platforms, this means code written once can be run immediately on different systems without having to recompile for each. Examples of this include flash based web programs that will run on your PC, MAC, games console and Mobile phone.

Advantages of using an Interpreter


Easier to debug (check errors) than a compiler Easier to create multi-platform code, as each different platform would have an interpreter to run the same code Useful for prototyping software and testing basic program logic

Disadvantages of using an Interpreter


Source code is required for the program to be executed, and this source code can be read making it insecure Interpreters are generally slower than compiled programs due to the per-line translation method

SEMIT

ADALPURA (SHITLA DHAM)

MIRZAPUR

SEMIT

48

SEMIT

Computer Networks
... One of the most exciting and important technological fields of our time.

What is a computer network? A computer network is a group of interconnected computers. Networks may be classified according to a wide variety of characteristics. This article provides a general overview of some types and categories and presents the basic components of a network.

Network Classification:1 Scale Based on their scale, networks can be classified as 1 - Local Area Network (LAN) 2 - Wide Area Network (WAN) 3 - Metropolitan Area Network (MAN) 4 - Area Network (PAN)

SEMIT

ADALPURA (SHITLA DHAM)

MIRZAPUR

SEMIT

49

SEMIT

2 - Connection method
Computer networks can also be classified according to the hardware and software technology that is used to interconnect the individual devices in the network, such as Optical fiber, Ethernet, Wireless LAN, HomePNA, or Power line communication. Wireless LAN technology is designed to connect devices without wiring. These devices use radio waves or infrared signals as a transmission medium.

3 - Functional relationship (Network Architectures)


Computer networks may be classified according to the functional relationships which exist among the elements of the network, e.g., Active Networking, Client-server and Peer-to-peer.

4 - Network topology
Computer networks may be classified according to the network topology upon which the network is based, such as Bus network, Star network, Ring network, Mesh network, Star-bus network, Tree or Hierarchical topology network, Network Topology signifies the way in which devices in the network see their logical relations to one, network topology is independent of the "physical" layout of the network. Even if networked computers are physically placed in a linear arrangement, if they are connected via a hub, the network has a Star topology, rather than a Bus Topology. In this regard the visual and operational characteristics of a network are distinct; the logical network topology is not necessarily the same as the physical layout.

Types of networks:1 - Personal Area Network (PAN)


A personal area network (PAN) is a computer network used for communication among computer devices close to one person. Some examples of devices that are used in a PAN are printers, fax machines, telephones and scanners. The reach of a PAN is typically about 20-30 feet. Personal area networks may be wired with computer buses such as USB and FireWire. A wireless personal area network (WPAN) can also be made possible with network technologies such as IrDA and Bluetooth.

2 - Local Area Network (LAN)


A network covering a small geographic area, like a home, office, or building. Current LANs are most likely to be based on Ethernet technology.

SEMIT

ADALPURA (SHITLA DHAM)

MIRZAPUR

SEMIT

50

SEMIT

3 - Campus Area Network (CAN)


A network that connects two or more LANs but that is limited to a specific and contiguous geographical area such as a college campus, industrial complex, office building, or a military base. A CAN may be considered a type of MAN (metropolitan area network), but is generally limited to an area that is smaller than a typical MAN.

4 - Metropolitan Area Network (MAN)


A Metropolitan Area Network is a network that connects two or more Local Area Networks or Campus Area Networks together but does not extend beyond the boundaries of the immediate town/city. Routers, switches and hubs are connected to create a Metropolitan Area Network.

5 - Wide Area Network (WAN)


A WAN is a data communications network that covers a relatively broad geographic area

6 - Global Area Network (GAN)


Global area networks (GAN) specifications are in development by several groups, and there is no common definition. In general, however, a GAN is a model for supporting mobile communications across an arbitrary number of wireless LANs, satellite coverage areas, etc.

SEMIT

ADALPURA (SHITLA DHAM)

MIRZAPUR

SEMIT

51

SEMIT

7 - Internetwork
Two or more networks or network segments connected using devices that operate at layer 3 (the 'network' layer) of the OSI Basic Reference Model, such as a router. Any interconnection among or between public, private, commercial, industrial, or governmental networks may also be defined as an internetwork. In modern practice, the interconnected networks use the Internet Protocol. There are at least three variants of internetwork, depending on who administers and who participates in them:

Intranet Extranet Internet

Protocols
A protocol is a set of rules for the exchange of data between a terminal and a computer or between two computers. A protocol is embedded in the network software. Think of protocol as a sort of precommunication to make sure everything is in order before a message or data is sent. Protocols are handled by software related to the network, so that users need only worry about their own data. Different protocols perform different functions so it is difficult to generalize the properties of the protocols. There are some basic properties of most of the protocols. Detection of the physical (wired or wireless connection) Handshaking How to format a message. How to send and receive a message. Negotiation of the various connections Correction of the corrupted or improperly formatted messages. Termination of the session.

Protocol Communications
two devices must be able to ask each other questions (Are you ready to receive a message? Did you get my last message? Is there trouble at your end?) And to keep each other informed (I am sending data now). In addition, the two devices must agree on how data is to be transferred, including data transmission speed and duplex setting. But this must be done in a formal way. When communication is desired among computers from different vendors (or even different models from the same vendor), the software development can be a nightmare because different vendors use different protocols. Standards would help.

SEMIT

ADALPURA (SHITLA DHAM)

MIRZAPUR

SEMIT

52

SEMIT

Network Infrastructure
In addition to the servers and their clients, a network will usually include other electronic devices connected to the network signal cabling. Some of this infrastructure is concerned with moving the data through the network, from the source machine to its destination. o o o o o o Hubs Routers Gateways Bridges Switches Terminal Servers

Some of this infrastructure is concerned with maintaining dedicated databases of network information and providing that information to the clients and servers so that they can communicate. o o o Domain Name Server DHCP Server WINS Server to support Microsoft Network Clients (like DNS)

SEMIT

ADALPURA (SHITLA DHAM)

MIRZAPUR