Search This Blog

Saturday, January 30, 2010

Computer Language and Program

Computer Languages

Human languages are those which we use to communicate to one another. Similarly computers have different languages so that the user can communicate with them to give instruction to carry out any desired task.

Computer languages can generally be classified into the following categories.

I. Machine languages
II. Assembly languages
III. High-level languages

I) Machine languages:

Machine languages are those which the computer can directly understand. The commands in machine language will be binary form. For example, the machine language command for adding two numbers may be some thing like 10110011. These commands will generally be written in hexadecimal form (Base 16 numbers. The hexadecimal representation for the above binary number is ‘B3’. The machine language commands will be different for different computers.

II) Assembly languages:

The assembly language is one step forward from the machine language. In the assembly language the machine language commands are represented as understandable words. For example the command for adding a number to another might look like ‘Add B’, and the command to increment a number by 1 like ‘INC D’, etc. These commands will then be translated into machine language commands by a software called the Assembler. Assembly language programs are also machine dependent, i.e., the programs written for one type of computer may not execute in another type of computer.

III) High Level languages:

High level languages are those in which we can use English like commands to instruct the computer. These languages are easy to learn. They can be used on any computer independent of the hardware type. Examples for high level languages are BASIC, FORTRAN, COBOL, Pascal, C, etc. The programs that convert these High-level language commands into machine language commands are compilers and interpreters.

Compilers:

Compilers are those which convert the high level language program directly into machine language commands. To execute the program we only need the COMPILED version of our program. Examples for compilers are FORTRAN, COBOL, Pascal, C, etc.

Interpreters:

Interpreters are those which convert the high level language programs into an intermediate form. To execute the program we will need both the program and the interpreter. BASIC language is one example for the interpreted languages.

Program

A program is set of instructions for performing a particular task. These instructions are just like English words. The computer processes the instructions as 1s and 0s.

Source Program

A program can be written in assembly language as well as high-level language. This written program is called ‘source program’.

Object Program

The source program is to be converted to the machine language, which is called ‘object program’.

Either an interpreter or compiler will do this activity.

a) Interpreters: An interpreter reads only one line of a source program at a time and converts it to the object codes. In case of errors, the same will be indicated instantly. The program written with an interpreter can easily be read and understood by other users. Therefore security is not provided. Anyone can modify the source code. Hence, it is easier than compilers. However, the disadvantage is that it consumes more time for converting a source program to an object program.

Compilers: Compiler reads the entire program and converts it to the object code. It provides errors not of one line but errors of the entire program. Only error-free programs are executed. It consumes little time for converting a source program to an object program. When the program length for any application is large, compilers are preferred.

Friday, January 29, 2010

Software & Hardware

Software & Hardware

Software:

Software is a set of instruction that a computer executes to carry out any task. Without software the computer is an use less machine. People used to call software as the soul of the computer.

Software can be broadly classified into two categories.

System Software:

System softwares are those which are used to maintain the computer or to create other softwares. Example for the system softwares are operating system, language compilers, and the programs that control the input an output devices such as printer and mouse (device drivers).

Application software:


Application softwares are those which we use to perform out operations like, typing a letter or to maintain an address list. Word processing, spreadsheet, packages, database management softwares, graphics packages, and accounting softwares are a few examples for the application softwares.

Hardware:

Hardware on the other hand is the bare machine which consists of the Processing unit, input/output devices, storage devices, etc. In a microcomputer the processing unit consists the motherboard, input/output controller ( I/O controller ), display controller, disk drives, and the power system. The motherboard will contain the microprocessor, memory chips, math coprocessor, and expansion slots for the other cards. I/O controller and the display controller will be inserted in the expansion slots in the motherboard.
Introduction to microprocessors

The CPU built into a single IC is called a microprocessor.

Evolution of Microcomputer:

Intel Corporation, U.S.A introduced the first microprocessor, the Inter 4004 in 1971 which was a 4-bit microprocessor. In 1972, Intel introduced the first 8-bit microprocessor, the Intel 8008. Other 8-bit microprocessors introduced during the same time were National IMP-8 and Rockwell International PPS-8. The microprocessors introduced in the years 1971 and 1972 were the first-generation microprocessors.

In 1973, second-generation 8-bit microprocessors evolved. They were Intel 8080/8085, Fair Child F-8, Motorolla 6800, National CMP-8 and Z-80.

After 1978, the third-generation microprocessors were introduced. The processors are 16-bit wide and include typical processors such as Intel 8086 / 8088 / 80186 / 80286, Motorolla 68000 / 68010 and Zilog Z8000.

Fourth-generation microprocessors evolved in the year 1981. Intel introduced the first commercial 32-bit microprocessor Intel 432. Since 1985, more 32 - bit microprocessors have been introduced. These include Motorolla 68020, 68030 and Intel 80286. In 1989, Intel introduced the 32-bit microprocessor Intel 80486. Recently Intel has introduced a 64-bit microprocessor Intel 80586 (Pentium).

( The central processing chip in a microcomputer. Common microprocessors include the Motorola 68000, 68030, 68040 used in Macintoshes, and the Intel 286, 386, 486, and Pentium chips used in PCs. The microprocessor controls most of the core functions of the computer but can be enhanced with coprocessor chips. )

Microprocessor Architecture: (Peripherals of Microcomputer)


A microprocessor has general purpose and special purpose registers. The general purpose registers are used for storing intermediate data and operands. The special purpose registers are: the Accumulator, Program Counter and the stack pointer.

The Accumulator is used to store operands and/or to store the result of operations.

The program counter and stack pointer registers are used to keep track of the memory location from where the next instruction is to be fetched and the location of the most recent stack entry, respectively.

The Arithmetic Logic Unit in the microprocessor can add an operand in the Accumulator to an operand in another register or add an operand in the accumulator with data specified by the program. It can also Carry out Boolean Logic operations and Shift operations.

The control circuitry in the microprocessor is responsible for issuing signals to control the functions of various components within as well as external to the microprocessor as per the instructions executed. All the operations are coordinated by clock signals.

Wednesday, January 27, 2010

Block Diagram of Computer


Block diagram of a typical microcomputer is shown below


Input Unit:

This unit is used to give input to the computer. The input can be given to the computer through various ways. This determines the media. In the earlier days rectangular punched cards were used to give input. Now a days the common way to give input through the keyboard. Mouse is also becoming a famous input device which is used to give graphical data.

Control Unit:

The control unit controls the other units such as arithmetic logic unit, memory unit to carry out instructions.

Memory Unit:

The instructions and data used in the computer are stored in the memory unit. They are retrieved as and when required by the control unit to do other operations.

Arithmetic Logic Unit:

The arithmetic and logic unit does the arithmetic operations like addition, subtraction and logical operations such as comparisons and many other operations.

Output Unit:

This unit is used to get processed information from the computer. Solved output devices are used for getting the output; common one is monitor and printer.

Memory in the computer is broadly divided into

Main memory (Primary memory)
Secondary memory


The main memory holds all data, instructions, and results temporarily. The memory consists of hundreds of thousands of cells called ‘storage locations’ each capable of storing one word of information. The purpose of secondary memories is to retain data and program for future use.

Main memory:

For main memory relatively high speed memories like semi-conductor memories were used. But for the secondary memories magnetic memories were used because of their low speed, high storage capacity and low cost.

Semi conductor memories includes RAM, ROM, PROM, EPROM and EEPROM.

RAM – Random Access memory (Read/Write Memory)
ROM - Read Only Memory
PROM - Programmable Read Only Memory
EPROM - Erasable Programmable Read Only Memory
EEPROM - Electrically Erasable Programmable Read Only Memory

Secondary Memory:

Secondary Memories includes Floppy disk, Hard disk, Magnetic Tape, and Compact disk.

Floppy Disk:

The most common storage medium used on small computers today is a floppy disk. It is a flexible plastic disk coated with magnetic material. Information can be recorded or read by inserting it into a disk drive connected to the computer. The disks are permanently encased in stiff paper jackets for protection and easy handling.

Different standard size and different storage capacity of floppy disks are available in 8 inch, 5 ¼ inch, 3 ½ inch and 360 KB, 1.2 MB, 1.44 MB respectively.

Hard disk:

To storage large amount of information hard disk is used, it is also known as ‘winchester disk’. A hard disk consists of two or more magnetic plates fixed to a spindle, one below the other with a set of read/write heads. The disk pack is permanent by sealed inside a casting to protect it from dust and other contaminations, thus increasing its operational reliability and data integrity. In various capacities this is available like 40MB, 80MB, 120MB, 200MB, 260MB and 560MB. According to this capacity the disk the cost also vary.

Some advantages of hard disk is
Fast read/write speed
They can capable of storing huge amount of information.
Hard disks are not susceptible to dust and static electricity.


Magnetic tapes:

Very high storage capacity at a relatively lower cost. A standard 2,400 feet tape can store about 40 million characters and can be read at a speed of 1,60,000 characters per second. It is a sequential device and therefore one has to read all the previous records to reach a particular one. They are mainly used as back up storage.

Input devices:

Input devices present data to the processing unit in machine-readable form. The keyboard is a common input device for a small computer. System may support one or more of the input devices. They are

Keyboard
Mouse
Magnetic ink character recognizer (MICR)
Optical character reader (OCR)
Joy-stick
Light pen
Digitizer
Scanner
Micro phone
Punched card reader
Punched tapes

Keyboard:

Keyboard is mainly used input device. Keyboards are of different varieties depending on the number of keys on them. 81/84 key keyboards are used in PCs and PC/XTs. 101 key keyboard used for PC/ATs. Usually the keyboard consists of four parts.

Alphanumeric keys
Special function keys
Cursor control keys
Numeric keys

Output devices

Output devices receive information from the CPU and present it to the user in the desired form. List of some output devices shown below.

Monitor
Printer
Plotter
Speaker

Monitors:
Monitor is an output device. It is the most commonly used interactive peripheral. It consists of a keyboard and a CRT, with a processing circuit. Sometimes a VDU is a simply a terminal. A VDU mostly used in the multi-user environment.

There are two types of monitor namely,

Monochrome monitor
Colour Monitor

Monochrome monitor provides only one color on the other hand color monitors have wide range of colors. The quality of monitors is often judged by the resolution (pixels/inch).

Monitors are equipped with a display card. There are varieties of display card available. Some of there are.

MDU – Monochrome Display Adapter
HGA – Hercules Graphics Adaptor
CGA – Colour Graphics Adapter
EGA – Enhanced Graphics Adapter
VGA – Video Graphics Adapter
SVGA – Super Video Graphics Adapter

The size of the monitor may be different for different monitors. Standard sizes are 15 inches to 18 inches.

The character displays in a monitor is often limited by the size is 80 characters and totally 20 row in will be displayed at time in the screen.

Printers:

Printers can be broadly be subdivided into two categories;

Impact printers
Non-impact printers

Impact Printers:

Impact printers can be described as printers which utilizes some from of striking device to transfer ink from an inked ribbon onto the paper being printed to form images or characters. Some of other printer falls into this category are,

Dot Matrix
Chain printer
Drum Printer
Daisy Wheel Printer


Non-Impact printers:

Main concept of non-impact printer is no direct contact between printer head and the paper. But in the Impact printer case, direct contact between printer head and the paper. Some of the important non-impact printers available in market are,

Laser Printer
Ink Jet Printer
Thermal Printer
Electro Static Printer

Non-Impact printers are comparatively high cost and the quality of output is also high. Speeds of these printers are high.

Plotters:

Plotters are used to produce output containing graphics or diagrams. With the availability of multi-colour plotters, they are increasingly used for preparing financial documents, annual reports and engineering drawings. Three types of plotters are available. They are,

Drum plotters
Flat bed plotters
Injection plotters

In the drum plotter, both paper and pen move, i.e. Paper move up and down in the rollers, the pen move left and right in the bar so that, the graphics picture is created.

In the flat bed Plotter, paper is fixed in the drawing pad, the pen is fixed in the bar just up to the drawing pad. To create drawing in the paper, pen bar move left to right, and pen move up and down in the bar on the paper.

In the Injection Plotter, ink nozzle sprays the ink with different colors and is able to produce large drawings containing many colors. Quality of the drawing from the Injection plotters in high as its price.

Types of computer ,classification of Computer

Types of computers:
Based on the operating principles, computers can be classified into one of the following types.
1. Analog computers
2. Digital computers
3. Hybrid computers
1.
Analog computers

Analog computers operate by measuring rather than by counting. The name, which is derived from the Greek word analog, denotes that the computer functions by establishing similarities between two quantities that are usually expressed as voltages or currents. Analog computers are powerful tools to solve differential equations.
2. Digital computers

Digital computers operate essentially by counting. All quantities are expressed as discrete digits or numbers. Digital computers are useful for evaluating arithmetic expressions and manipulations of data ( such as preparation of bills, ledgers, solution of simultaneous equation, etc.,

3. Hybrid computers

Computers which combine features of both analog and digital types are called hybrid computers.

Types of digital computers: ( Classification of computers)

Computers are also available in different sizes and with different capabilities. They are categorized as

1. Micro Computers:
2. Mini Computers
3. Mainframes
4. Super Computers

1.Micro Computers:

The micro computer is the smallest general-purpose processing system. Micro computers are self-contained units and usually designed for use by one person at a time. Since microcomputers can be easily linked to large computers, they form a very important segment of the integrated information system.

2.Mini Computers:

A mini computer is a medium-sized computer that is more costly and powerful than a micro computer. An important distinction between a micro and a minicomputer is that a mini computer is usually designed to serve multiple users simultaneously. A system that supports multiple users is called multiterminal, time-sharing system. Mini computers are the popular data processing systems.

3. Mainframe Computers:
Computers with large storage capacities and very high speed of processing (compared to micro or minicomputers) are known as mainframe computers. They support a large number of terminals for use by a variety of users simultaneously. They are also used as the central host computer in distributed data processing systems.
4.Super Computers:

These are extremely large storage capacities and computing speeds which are atleast 10 times faster than other computers. While the speed of traditional computers is measured in terms of millions of instructions per second(mips), a super computer is rated in terms of millions of operations per second(mops); an operation is made up of numerous instructions. Typically, the super computer is used for large scale numerical problems in scientific and engineering disciplines. These include applications in electronics, petroleum engineering, weather forecasting, structural analysis, chemistry, medicine and physics.

Tuesday, January 26, 2010

basic computer

What is computer?
Computer is a faster working electronic, programmable, data processing device. Computer cannot do anything independently. It acts on the instructions from the user and processes it, gives the result in the desired form.
Application of computer
Some of the applications of the computer are given below.
Maintenance of accounts and producing reports.
Purchasing and stock control in super markets and factories.
Library book issue management and information retrieval.
Computer aided diagnosis of diseases.
Bank accounts and instant customer service.
Organization of examinations and tabulation of results.
Computer aided design of building, plants, and machinery.
Weather forecasting.
Computer controlled machines.
Computer aided learning.
Word processing and desk top publishing.
Crime detection – finger print processing and image processing.

Computer system characteristics:

Perform complex and repetitive calculations rapidly and accurately.
Storage large amounts of data and information for subsequent manipulations.
Hold a program of a model which can be explored in many different ways.
Make decisions.
Provide information to the user.
Automatically correct or modify – by providing signals – certain parameters of a system under control.
Draw and print graphs, and
Converse with users through terminals.
Computer Generations
First generation computers: 1947-1958

The first electronic computer was completed in 1946 by a team led by J. Prosper Eckert and John Mauchly. This computer was called ENIAC ( Electronic Numerical Integrator and Calculator). It used high-speed vacuum tube switching devices. Some other computers also developed in this period.
All the first generation computers possessed the following characteristics as compared to the later models:
Large in size
Slow operating speeds
Restricted computing capacity
Limited programming capabilities
Short life span
Complex maintenance schedules
Second generation computers: 1959 – 1965
In the second generation computers, there were used transistors instead of vacuum tubes. These transistors were made of germanium semi-conductor material. These computers were much faster and more reliable than their earlier counterparts. Further they occupied less space, required less power, and produced much less heat.
Third generation computers: 1965 – 1976
In this generation computers, the chief improvement was the replacement of germanium, transistors by silicon transistors. A single chip of silicon had on it integrated circuits consisting of transistors, resistors and capacitors. The single chip eliminated the need for wired interconnections between components, from small scale integrated circuits (SSI) which had only about 100 transistors, technology developed to medium scale integrated circuits with 1000 transistors per chip.
Consequently, the switching speed of the circuits went up, reliability increased, power dissipation decreased and the machine became much smaller. The effect of these was the emergence of extremely powerful CPUs with the capacity of carrying out one million instructions per second.
Forth generation computers: 1976 – present
The fourth generation computers use micro-processor chips. Very large scale integrated (VLSI) circuits packing about 10000 to 100000 transistors on a single chip have come into existence. A large number of microprocessors are being manufactured now.
Disk memory has become very large in size. Secondary storage devices like floppy disks and tapes provide low cost and high capacity peripheral memory. Networks of computers have been developed.
Programming languages also have become more powerful. Many new languages have emerged.
Fifth generation computers: ( under research )
Japan and many other countries are working on systems what are known as expert systems which will considerably improve the man-machine interaction. In it the artificial intelligence technology is used. Fifth generation computers are nothing but robot. These systems are very expensive.