Introduction to Computer Application
Hardware & Software
Ahsan Abbas (Lecturer)
What is CPU or Microprocessor?
CPU (Central Processing Unit)
CPU is also called Microprocessor or processor. It is the brain of computer. It has a set
of pins through which all it communicates with the other devices. CPU consists of three
units
1. Control Unit (CU).
2. Arithmetic and Logic Unit (ALU)
3. Memory Unit(MU)
CPU
CU MU
ALU
1. Control Unit (CU)
● Control Unit is also called supervisor of the computer
● Control unit does not perform execution
● It is used to analyze the instructions
● It interprets the instructions and invokes the appropriate circuit to perform
execution
2. Arithmetic & Logic Unit (ALU)
The part of CPU where data processing takes place is called arithmetic and logic
unit. All arithmetic and logical operations are performed in arithmetic and logic unit.
Arithmetic Operations
Arithmetic operations include:
● Addition operation (+)
● Subtraction operation (-)
● Multiplication operation (*)
● Division operation etc. (/)
Logic Operations
Logic operations include:
● Less than operation (<)
● Greater than operation (>)
● Equal to operation (==)
● Not equal to operation etc. (!=)
3. Memory Unit or CPU Registers (MU)
It is also called registers. It is small and fast memory inside the CPU. It is used by CU
and ALU.
There are two types of registers (special purpose registers and general purpose
registers)
These registers are available in different sizes.
There are following types on registers:
i. Special purpose registers
ii. General purpose registers
iii. Address or segment registers
iv. Index or Pointer Registers
i) Special Purpose Registers
These registers are used by control unit
Special purpose registers are used to receive the instructions from memory and
send them for execution.
These registers are:
PC (Program Counter)
IR (Instruction Register)
MAR (Memory Address Register)
MBR (Memory Buffer Register)
SP (Stack Pointer Register)
ii) General Purpose Registers:
These registers are used by arithmetic ad logical unit to perform different operations.
These registers are from 1 to 4 bytes in size.
These registers are:
AX (Accumulator Register)
BX (Base Register)
CX (Counter Register)
DX (Data Register)
iii) Address or Segment Registers
These registers are used to read data from memory and after execution writes the
instruction back to main memory
These Registers are:
CS (Code Segment)
DS (Data Segment)
ES (Extra Segment)
SS (Stack Segment)
iv) Index or Pointer Registers
These registers are used to help address or segment registers.
These registers are:
IP (Instruction Pointer)
DI (Destination Index)
SI (Source Index)
Random Access Memory (RAM)
● It is a silicon chip and called user memory
● It is made up of cells. Each cell is a combination of 8 bits or byte
● Each cell has its own unique address
● It is temporary or volatile memory of the computer
● Data and programs can be stored in it when the computer is on and when it is
switched off the data and programs of Ram Lost
● Data only stored on ram when it is used by CPU
Features of RAM
● It is volatile
● It is temporary
● It has unique addresses of data
● It has high capacity as compared to RAM
● It is easier to replace
Types of RAM
1. Dynamic RAM
2. Static RAM
DRAM (Dynamic Random Access Memory)
● It has a transistor and a capacitor for every bit
● It has to be refreshed hundreds of time in a second.
● Its consumes more power
● It is less expansive.
● Its speed is slower than SRAM.
SRAM (Static Random Access Memory)
● It has five transistors for every bit
● It does not need to be refreshed.
● Its consumes less power
● It is very expensive.
It is very fast.
Interaction of CPU & RAM
CPU interacts with RAM as follows
Each instruction in CPU must load into memory
CPU reads the instruction from main memory
CU decodes the instructions and after execution returns the instructions back to
main memory.
Fetch, Decode, Execute and Store Cycle/ Machine Cycle
An instruction cycle (sometimes called a fetch–decode–execute cycle) is the basic
operational process of a computer. It is the process by which a computer retrieves a
program instruction from its memory, determines what actions on the instruction to be
performed, and carries out those actions. This cycle is repeated continuously by a
computer's central processing unit (CPU),
CPU follows a fetch decode execute cycle which has the following steps.
Fetch
In this step CU fetches the instruction from RAM and stores it in the register.
Decode
In this step CU interprets (translate) the instruction.
Execute
In this step CU send signals to other components to perform the task.
Store
In this step the result generated is stored in the RAM.
What is Input Devices?
Input
Anything which we have given to the computer for processing is called input.
It can be any text, numeric, image, audio or video.
Input devices
The device through which we can communicate with the computer is called an input
device. We enter data with the help of input devices
There are three types of input devices
i) Keyboard
ii) Source data entry devices
iii) Pointing or draw devices
The details of these are as follow.
Keyboard
The most common device for transferring data to the computer is keyboard. It is used for
typing instructions the button on the keyboard are called keys. It has 101 keys. There are
different types of keys available which are as follows
● Alphabet keys (A-Z, a-z)
● Number keys (0-9)
● Function keys (F1 ….. F12)
● Special character keys (@, %, $,!, &)
● Editing keys etc. (Del, Shift, BKSP,CTRL)
Source Data Entry Devices
The devices which are used to directly enter the data to the computer are called source
data entry devices.
Source data entry devices are: Image scanner, Microphone, Camera, Bar code reader,
Fax machine, MICR, OCR, OMR, Magnetic strip card, Smart card.
Image Scanner
A scanner uses laser technology to scan and copy an image. It scans one line at a time
and transfers it to the computer. The image scanned is translated into an electronic
format. It works like a photocopy machine.
Camera
Cameras are used to input image or video to the computer.
Camera takes input and converts it into digital form
Video cards used to convert data into digital form
There are two types of video card.
i) frame grabber video card
ii) full motion video card
Digital Camera
It allows you to take digital photographs. It can send images straight to a computer instead of
storing it on a camera film.
Bar Code Reader
Bar codes are vertical zebra stripped lines which have information about a product. Bar
code reader is used to read bar codes translate it into digital form and transfer it to the
computer.
Magnetic strip card Magnetic strip card has a magnetic strip on its back which has
magnetically encoded data. A credit card reader reads it and transmits it to the computer. Example
of magnetic strip card is ATM card and driving card.
Smart card
Smart card contains a small silicon chip that has its own microprocessor and memory.
It is used for deduct purchasing from bank account and update the record.
Microphone
It is used for audio input. It records the analog sound and converts it into digital form.
Sound card is required to connect it with the computer.
MICR
MICR stands for magnetic ink character recognition. It is used to recognize the
magnetic ink that is available on the Bank checks.
OCR
it stands for optical character recognition. It is used to scan the documents and convert
data into digital form. It is mostly used to scan the utility bills, price tags etc.
OMR
It stands for optical mark recognition. It is used to scan the exam papers with light beam.
E.g. paper marking.
Pointing devices
These devices are used in Graphical User Interface (GUI) environment. These devices
help in positioning the cursor easily. Following are point and draw devices
Mouse
The mouse is a small device which moves the cursor when it is moved. It has two or three
buttons on it. Now they have a scroll wheel on it and now they laser to sense the direction
of the mouse movement. There are two types of mouse.
i) Mechanical mouse
It has a ball on its back. Mouse is moved to move the ball and cursor move
accordingly. It requires smooth surface.
ii) Laser Mouse
It has a laser technology instead of ball.
Joystick
The joystick is a stick that moves the screen cursor in the direction the stick is pushed. It
is used for playing games.
Trackball
The trackball is a ball in a small external box or fixed on the keyboard. The ball is rolled
to move the cursor. This is mostly used in Laptops.
Touch pad
It has no moving parts. It is a small flat touch sensitive surface. Simply move your finger
on it to move the screen cursor. It is mostly used in Laptops.
Light Pen
Mouse pen works like a mouse but its shape is like a pen. The light emits from the pen
and use to control the movement of cursor on screen.
Pointing Stick
Pointing stick is a device which is look like a pencil eraser and located between the G, H
and B keys on the keyboard. We can move the stick with finger to control the cursor
movement.