Introduction to Computers

Basic Components

What Is a Computer?

•     machine for processing data

•     raw data given as input

•     output is information

–   what is the difference?

•     extracting desired information from data

•     what is the information required?

•     how should it be found from the given data?

•     specified by the user

What Is Programming?

•     information extracted by performing operations on data

•     operations to be performed specified by a sequence of instructions, called program

•     a few basic instructions are available

•     task of finding an appropriate sequence of basic instructions to get desired output is programming

What Is Utilization?

•     computer is a tool

•     unless used for some purpose, by itself, it does not achieve anything

•     use of a computer in different domains

•     originally intended only for numerical calculations in science and engineering

–   also the main emphasis of this course

•     commercial applications now dominate

Block Diagram of a Computer

CPU

•     cpu stands for central processing unit

•     heart (and/ or brain) of the computer

•     controls functioning of all components

•     ALU , arithmetic-logic unit which performs arithmetic and other operations

•     instruction decoder which decodes what operation is to be performed on what data and where the result should be sent

•     program counter decides the next instruction

Main Memory

•     main memory stores all instructions and data

•     contains many “locations”, each having an integer address

•     no distinction between instruction and data

•     location accessed directly using its address, called random access memory (RAM)

•     data access is  very fast (nanoseconds)

•     all data is lost when power is switched off

Data Representation

•     all data and instructions are stored in bits

–   bits is short form of binary digit 0 or 1

–   easy to implement as an electronic switch

–   each location typically contains 32 bits

–   number of locations typically > 10 million

•     data and instructions encoded in bits

•     all operations reduced to operations on bits

•     may vary from one computer to another

Main Memory

Peripherals

•     all other components are called peripherals

•     peripherals are external devices which allow users to interact with a computer

•     controlled by the CPU

•     hard disk or secondary memory

–   stores data in “permanent form”

•     keyboard

–   allows users to enter data in the computer

 

 

Peripherals

•     visual display unit  (VDU)

–   displays data on a screen

•     floppy disk

–   stores data in “portable” form

•     printers

–   print data on paper

•     network connections

–   connect to other computers

 Functioning of a Computer

•     program is stored in main memory

•     CPU reads instruction to be executed from location specified by program counter

•     instruction contains addresses of locations containing data and the result

•     CPU decodes and executes instruction

•     program counter updated to next instruction

•     continues till a special HALT instruction

Operating System

•     operating system (OS) is a program “permanently” resident in main memory

•     controls execution of all other programs

•     controls input-output from peripheral devices

•     acts as interface between users and machine

•     allows sharing of machine resources

•     many standard OS available

–   unix, linux, windows, dos etc

Summary

•     basic idea of computers and programming

•     main components of a computer

–   CPU and main memory

•     peripherals

–   hard disk, keyboard, VDU, printer etc

•     basic functioning of a computer

•     role of an operating system