Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 107

Introduction to Computer

By:

Jehangir Rahman

OCP

MS(CS)

BIT
Parts of the Computer System
 A computer is a collection of parts, which are categorized
according to the kinds of work they do

 A complete computer system consists of five parts


 Hardware
 Software
 Data
 Procedures
 User
Parts of the Computer System (Cont.)
Parts of the Computer System (Cont.)
 Hardware
 The mechanical devices that make up the computer are called hardware
 The physical components of the system are called hardware
 Hardware is any part of the computer you can touch

 Software
 Software is a set of instructions that makes the computer perform tasks
 Or Software tells the computer what to do
 The term program refers to any piece of software
 Thousands of different software programs are available
Parts of the Computer System (Cont.)
 Data
 Data consist of individual facts or pieces of information
 A computer’s primary job is to process these tiny pieces of data in various
ways, converting them into useful information
 For example, the company annual sale report is the data or information
etc.

 Procedures
 Set of Instructions, rules, steps to use the computer

 Users
 People are the computer operators, also known as users
 Users operate the computer
Information Processing Cycle
 Using all parts together, a computer converts data
into information by performing various actions on
the data

 Information processing cycle is a set of steps the


computer follows to receive data, process data,
display the resulting information to the user, and
store the results
Information Processing Cycle (Cont.)

 Steps followed to process data


1. Input
2. Processing
3. Output
4. Storage
Information Processing Cycle (Cont.)
Essential Computer Hardware
 A computer’s hardware devices fall into following
categories:
 Input Devices
 Output Devices
 Memory
 Processor
 Motherboard
 Storage
Input Devices
 If you think of the CPU as a computer’s brain, then
you might think of the input devices as its sensory
organs– the eyes, ears, and fingers
 A personal computer would be useless if you could
not interact with it because the machine could not
receive instructions
 Data and instructions must enter the computer system
before any computation can be performed on the
supplied data
 The input unit that links the external environment
with the computer system performs this task
Input Devices (Cont.)
 An input unit performs the following three
functions:

 It accepts the list of instructions and data from the


outside world
 It converts these instructions and data in computer
acceptable form
 It supplies the converted instructions and data to
the computer system for further processing
Input Devices (Cont.)
 Keyboard

 Mouse

 Trackballs
 Track pads

 Joystick

 Touch Screen

 Scanner and OCR software

 Voice Recognition Devices

 Machine Vision System


Input Devices (Cont.)
 Keyboard
 The keyboard was one of the first peripherals to be used with
computers, and it is still the primary input device for entering
text and numbers
 A standard keyboard includes about 100 keys; each key sends a
different signal to the CPU
 There are six groups of keys
• Alphanumeric Keys (A-Z, 0-9, tab, capslock, enter, backspace)
• Modifier Keys (Shift, ALT (Alternate), CTRL (Control)
• Numeric Keyboard (10 digits and +, - , *, /, Num Lock)
• Function Keys (F1- F12)
• Cursor-Movement Keys (Four Arrows)
• Special-Purpose Keys (Start, Shortcut, Insert, Delete etc.)
Input Devices (Cont.)
 Mouse
 A mouse is an input device that you can move around on a flat surface and controls the
pointer

 The pointer is an on-screen object, usually an arrow, that is used to select text, access
menus, and interact with program that appear on the screen

 Mechanical Mouse contains a small rubber ball that rolls inside the case when you
move the mouse around on a flat surface

 Optical Mouse emits a beam of light from its underside


Input Devices (Cont.)
 Trackballs
 A trackball is a pointing device that works like an upside-down mouse

 It has a ball on the top and one can roll the ball directly with the finger to move the
pointer around the screen, and it is normally used with the laptops
Input Devices (Cont.)
 Track pad
 A track pad (also called touchpad) is a stationary pointing device that many people find
less tiring to use than a mouse or trackball

 The movement of a finger across a small touch-sensitive surface is translated into


pointer movement on the screen

 Track pads include two or three buttons that perform the same functions as mouse
buttons

 Laptop computers use a touchpad in front of the keyboard


Input Devices (Cont.)
Input Devices (Cont.)
 Touch Screen
 Touch screens accept input by allowing the user to place a fingertip directly on the
computer screen

 Touch screen have long been used in military applications

 Today because they have been less expensive, touch screens are found in many
applications such as ATM
Input Devices (Cont.)
Input Devices (Cont.)
 Scanners and Optical Character Recognition
 Image Scanners convert any printed image into electronic form by shining light onto
the image and sensing the intensity of the light’s reflection at every point

 When a scanner first creates an image from a page, the image is stored in the
computer’s memory as a bitmap

 OCR is a software that is used to translate the image into text that you can edit

 OCR software is extremely complex and not always 100 percent reliable
Input Devices (Cont.)
Input Devices (Cont.)
 Voice Recognition System
 Voice recognition is one of the newest, most complex input techniques used to
interact with the computer
 Microphones are used to input the voice and then the software recognizes the human
voice
Input Devices (Cont.)
 Machine Vision System
 The simulation of human senses, especially vision, is extremely complex

 Computers need cameras for their eyesight

 A camera digitizes the images of the entire object then stores the images into
computer’s database

 When a new image is seen the system compares the digitized images with its database

 The computer identifies the image by matching the structure


Input Devices (Cont.)
Output Devices
 The job of the output unit is the reverse of that of an
input unit

 It supplies information and results of computations


to the outside world

 The output that is obtained from a computer system


can be categorized into two main forms

 Hard Copy
 Soft Copy
Output Devices (Cont.)
 An output unit performs the following three
functions:
 It accepts the result from the computer (CPU)
 It converts these coded results to human
readable form (HRF)
 It supplies the converted result to the outside
world
Output Devices (Cont.)
 Following are some of the output
devices:
 Monitors
 Speakers
 Printers
 Plotters
Output Devices (Cont.)
 Monitors

 All computers have a display screen to show the


results of processing, as it is produced by CPU
 This part of the computer is known as Visual
Display Unit or Monitor
 Two types of monitors are used with PCs
• CRT Monitors

• Flat-Panel Monitors
Output Devices (Cont.)
 CRT Monitors
 This type of monitor uses a large vacuum tube
called a Cathode Ray Tube (CRT)
 Near the back of a monitor’s housing is an
electron gun
 The gun shoots a beam of electrons through a
magnetic coil (Yoke) and yoke guides the streams
of electrons at the front of the monitor
 The back of the monitor’s screen is coated with
phosphors, a substance that emits light when they
are struck by the electron beam
CRT Monitor
Output Devices (Cont.)
 CRT Monitors
 The screen’s phosphor coating is organized into a
grid of dots
 The smallest number of phosphor dots that the gun
can focus on is called a pixel
 In a color monitor, each pixel includes three
phosphors—red, green, and blue (RGB)—arranged
in a triangle
 When the beams of each of these guns are
combined and focused on a pixel, the phosphors
light up
Output Devices (Cont.)
 CRT Monitors

 There are two major disadvantages of CRT


monitors which are:
• CRT monitors are big, they take up desktop
space and can be difficult to move
• CRT monitors require a lot of power to run;
therefore, they are not practical for use with
notebook computers
CRT Monitor
Output Devices (Cont.)
 Flat-Panel Monitors
 Flat-panel monitors are used with portable
computers as well as with desktop computers
 These new monitors provide the same viewable
area as CRT monitors
 But they take up less desk space and run cooler
than traditional CRT monitors
 The most common flat-panel monitor is the Liquid
Crystal Display (LCD) monitor
Output Devices (Cont.)
 LCD Monitors
 The LCD monitor creates images with a special kind of liquid crystal that is normally
transparent but becomes opaque (not transparent) when charged with electricity

 Liquid Crystal is a substance that behaves like both a liquid and a solid

 Liquid crystals retain their dual liquid and solid nature only over a certain range of
temperatures and pressures
Output Devices (Cont.)
 LCD Monitors
 Liquid crystal can appear as a solid at low temperatures and high pressures

 Liquid crystal can appear as a liquid at high temperatures and low pressures
LCD Monitor
Output Devices (Cont.)
 LCD Monitors

 There are some disadvantages of LCD monitors


which are:
• Images of LCD monitors can be difficult to see
in bright light

• A bigger disadvantage of LCD monitors is their


limited Viewing Angle—that is, the angle from
which the display’s image can be viewed clearly
Output Devices (Cont.)
 Sound System
 Microphones are now important input devices, and speakers and their associated
technologies are key output systems

 Sound systems are especially useful to people who use their computer to create or
use multimedia products, watch videos or listen to music

 The most complicated part of a computer’s sound system is the sound card

 A computer’s sound card is a circuit board that converts sound from analog to digital
form, and vice versa, for recording or playback
Output Devices (Cont.)
 Sound System
 To listen the audio, the sound card accepts digital sounds and translates it into the
electric current that is sent to the speakers, which are connected to the card’s output
jacks
Speakers
Output Devices (Cont.)
 Printers

 A printer is an output device that can convert


electrical signals into printed characters on papers
 The results that we get through printer is called
printout or hard copy
 Generally, printers fall into two categories
• Impact

• Non-Impact
Output Devices (Cont.)
 Impact Printers
 An impact printer creates an image by using pins or hammers to
press an inked ribbon against the paper

 A simple example of an impact printer is a typewriter, which uses


small hammers to strike the ribbon

 The most common type of impact printer is the dot matrix printer
 A dot matrix printer creates an image by using a mechanism called a
print head

 Print head contains a cluster of short pins arranged in one or more


columns
Output Devices (Cont.)
 Non-impact Printers
 Non-impact printers use other means to create an image

 Examples of non-impact printers are Ink Jet Printers and Laser Printers

 Ink Jet Printers create an image directly on the paper by spraying ink
through tiny nozzles

 Laser Printers utilize a laser beam to form characters and work like
photocopiers and their print quality is higher

 Laser Printers are more expensive and faster than ink jet printers
Output Devices (Cont.)
 Plotters
 A plotter is a special kind of output device that
gives very neat and best quality of graphic designs
 It is like a printer because it produces images on
paper
 But the plotter is typically used to print large-
format images, such as construction drawings
created by an architect
 Plotters are very much useful for engineers,
architects, and designers
Plotter
Computer Memory
 The CPU contains the basic instructions needed to
operate the computer
 But the CPU cannot store entire programs or large
sets of data permanently
 The CPU needs to have millions of bytes of space
where it can quickly read or write programs and data
while they are being used
 This area is called memory, and it consists of chips
either on the motherboard or on a small circuit board
attached to the motherboard
Computer Memory (Cont.)
 There are two major classes of computer memory:
 Volatile (Nonpermanent)

 Nonvolatile (Permanent)

 If the data is lost when the computer loses power,


the memory is said to be volatile

 Memory chips that retain the data they hold, even


when the power is shut off are said to be nonvolatile
Computer Memory Hierarchy
Volatile Memory
 Volatile memory requires power to store data
 The volatile memory in a computer are of two types:
 Random Access Memory (RAM)
 Cache

 RAM’s job is to hold programs and data while they are


in use
 Physically , RAM consists of chips on a small circuit
board
 RAM is designed to be instantly accessible by the CPU
or programs
Volatile Memory (Cont.)
 The ‘Random’ in RAM implies that any portion of
RAM can be accessed at any time
 This helps make RAM very fast
 A computer does not have to search its entire memory
each time it needs to find data
 Because the CPU uses a memory address to store and
retrieve each piece of data
 A memory address is a number that indicates a
location on the memory chips
 Memory addresses start at 0 and go up to one less
than the number of bytes of memory in the computer
Random Access Memory
Volatile Memory (Cont.)
 The memory between the RAM and the CPU is called Cache
memory
 Cache memory is used to store temporary segments of
programs currently being executed and/or data frequently
needed in the present calculation
 Cache memory is similar to RAM except that it is extremely
fast compared to normal memory
 The high-speed memory chip generally used for caching is
called SRAM (Cache)
 Caching, in PC terms, is the holding of a recently used or
frequently used code or data in a special memory location for
rapid retrieval
Cache Memory
Volatile Memory (Cont.)
 Difference between SRAM and DRAM
 SRAM is static while DRAM is dynamic

 SRAM is faster compared to DRAM

 SRAM consumes less power than DRAM

 SRAM uses more transistors per bit of memory compared to DRAM

 SRAM is more expensive than DRAM

 Cheaper DRAM is used in main memory while SRAM is commonly used in cache
memory
Non-Volatile Memory
 Nonvolatile chips hold data even when the computer is unplugged

 Putting data permanently into this kind of memory is called


“burning in the data” and it is usually done at the factory

 During normal use, the data in these chips is only read and used–
not changed– so the memory is called read-only memory (ROM)

 There are different types of Nonvolatile memory, which are:


 ROM (Read Only Memory)
 PROM (Programmable Read Only Memory)
 EPROM (Erasable Programmable Read Only Memory)
 EEPROM (Electrically Erasable Programmable Read Only Memory)
 Flash Memory
Non-Volatile Memory (Cont.)
 ROM (Read Only Memory)
 As the name implies the contents of the ROM can only be
read, data cannot be written into it

 ROM contains a set of start-up instructions called the basic


input output system (BIOS) for a computer

 The ROM contents are called firmware


Non-Volatile Memory (Cont.)
 PROM (Programmable Read Only Memory)
 PROM in the beginning are empty chips which have
nothing programmed or recorded on them

 The data is recorded on PROM with special hardware


called a PROM programmer

 PROMs are normally programmed by the manufacturer

 PROM chips are often found on hard drives and printers


Non-Volatile Memory (Cont.)
 EPROM (Erasable Programmable Read Only
Memory)
 EPROMs are nonvolatile memory chips that are
programmed after they are manufactured

 EPROMs differ from PROMs in that they can be erased,


generally by removing a protective cover from the top of
the chip package and exposing the semiconductor
material to ultraviolet light

 And then the data is recorded on EPROM with special


programming device
EPROM
Non-Volatile Memory (Cont.)
 EEPROM (Electrically Erasable Programmable Read
Only Memory)
 This memory chip can be erased and reprogrammed
electrically so there is no need to remove it from the
circuit as with an EPROM

 EEPROM chip is costly than other ROM chips


Non-Volatile Memory (Cont.)
 Flash Memory
 Flash memory is a special type of nonvolatile memory
 It is often used in portable digital devices for storage
 Digital cameras, USB keychain storage devices and MP3
players all use flash memory
Types of Secondary Storage Devices
 The purpose of a storage device is to hold data--even
when the computer is turned off--so the data can be used
whenever it is needed
 Secondary storage is also known as auxiliary storage or
long-term storage
 Storage involves two processes:
 Writing: Recording the data so it can found later for use
 Reading: Retrieving of the stored data

 The physical materials on which data is stored are called


storage media
Types of Secondary Storage Devices (Cont.)
 The hardware components that write data to, and read
data from storage media are called storage devices
 There are two main categories of storage devices:
 Magnetic Storage
• Magnetic Tape
• Floppy Disk
• Hard Disk
 Optical Storage
• CD-ROM
• DVD-ROM
Magnetic Storage
 Magnetic Tape

 The first form of PC mass storage was the magnetic tape


drive and it was introduced in 1957
 Magnetic tape is a plastic tape (Magnetizable)
 Tape drives read and write data to the surface of a tape the
same way an audio-cassette recorder does
 The difference is, that a computer tape drive writes digital
data rather than analog data
 Tape proved a good medium for storing large amounts
of data, but it had some significant limitations
Magnetic Storage (Cont.)
 Magnetic Tape

 Gaining access to the data was slow due to the way data is
organized on tape, as a long stream of ones and zeroes, an
arrangement known as "sequential"

 Because tapes were hundreds of feet long, users often had


to run the entire length of the tape to find the data they
were seeking
Magnetic Storage (Cont.)
 Floppy Disk

 By providing random access (the ability to go directly to any


point on the data surface), floppy disks were the major
improvement over tape
 IBM developed the first floppy disk drives for its System 370
machines, which came out around 1972
 Floppy disks were included in personal computers before hard
disk drives, mostly out of economic considerations
 Floppy disks are made of flexible plastic and coated
with a magnetic material
 To protect the disk from dust and physical damage, it
is packaged in a plastic jacket
Magnetic Storage (Cont.)
 Floppy Disk

 To read and write data from/to a diskette, one must place


it into a floppy disk drive
 A diskette stores data on both sides of its disk (numbered
as side 0 and side 1), and each side has its own read/write
head
 There are two known types of diskettes
• One is 5.25 inch disk capable of storing 1.2 MB data
• Other is 3.5 inch capable of storing 1.44 MB data
Magnetic Storage (Cont.)
Magnetic Storage (Cont.)
 Hard Disk
 The original concept behind the hard disk drive was to
provide a storage medium that held large amounts of
data and allowed fast (random) access to that data

 Data on a hard drive can be accessed directly, without


requiring the user to start at the beginning and read
everything until finding the data sought

 Hard disk drives are mass storage devices


 Almost all of today's computers have at least one hard
disk drive
Magnetic Storage (Cont.)
 Hard Disk
 The first hard disk was invented by IBM in 1954 and its
capacity was 5 MB
 Then in 1981, IBM introduced the XT (X-tended
Technology) personal computer with a 10-MB hard
drive
 Today, a new hard disk drive can fit in your pocket and
hold over 300 GB of data or even more
 In 2010, the SEAGATE and WESTERN DIGITAL
introduced the first 3.0 TB hard drive
Magnetic Storage (Cont.)
 Hard Disk
 A hard disk includes one or more platters, usually
made of an aluminum alloy, mounted on a central
spindle

 Each platter is covered with a magnetic coating, and


the entire unit is encased in a sealed chamber
 Unlike floppy disks, where the disk and drive are separate, the hard disk and drive are
a single unit

 It includes the hard disk, the motor that spins the platters, and a set of read/write
heads
Magnetic Storage (Cont.)
Magnetic Storage (Cont.)
 Heads
 The number of heads is relative to the total number of sides of all the platters used to
store data

 If a hard disk drive has four platters, it can have up to eight heads
Magnetic Storage (Cont.)
 Organizing Data on Disk
 Just as you need an organization scheme to file documents in a
file cabinet so you can find them later, the disk also needs one

 The PC and disk drive must have an organization technique


that helps them place and find data stored on the media

 The following are the building blocks of disk media


organization and some basic disk storage terms
• Tracks
• Sectors
• Clusters
• Cylinders
Magnetic Storage (Cont.)
 Tracks
 A track is a concentric circular area of the disk that is discrete to all other tracks

 A length of a track is one circumference of the disk

 On a hard drive, there may be more than 1000 tracks

 The tracks are numbered from the outermost circle to the innermost, starting with 0
Magnetic Storage (Cont.)
Magnetic Storage (Cont.)
 Sectors
 A sector is a single segment of a disk created by cross-sectioning divisions that
intersect all the tracks

 A hard disk drive is cut into tens of thousands of small arcs, like a pie

 Each arc is called a sector and holds 512 bytes of data

 Data can be addressed by its track and sector numbers


Magnetic Storage (Cont.)
Magnetic Storage (Cont.)
 Cylinders
 A cylinder is a logical grouping of the same track on each disk surface in a disk unit

 Or a set of tracks (all of the same diameter) through each head is called a cylinder

 All of the tracks with the same track number on all of the hard drive’s surfaces form a
cylinder
Magnetic Storage (Cont.)
Magnetic Storage (Cont.)
 Clusters
 The term clusters (also called allocation units) refers to minimum area that a file can
take up on the hard drive

 An operating system uses blocks, which are in fact groups of sectors (between 1 and
16 sectors)

 A small file may occupy multiple sectors (a cluster)


Magnetic Storage (Cont.)
 Formatting Hard Disk
 Before the computer can use a magnetic disk to store data, the disk’s surface must be
magnetically mapped

 So that the computer can go directly to a specific point on it without searching through
data

 The process of mapping a disk is called formatting or initializing

 There are two level of formatting, which are:

• Low-Level Formatting (Physical)

• High-Level Formatting (Logical)


Magnetic Storage (Cont.)
 Low-Level Formatting
 Low-level formatting means to create all the sectors, tracks, and cylinders information
on the drive

 Low-level formatting is usually done at the factory


Magnetic Storage (Cont.)
 High-Level Formatting

 Logical formatting occurs after the low-level formatting

 It creates a file system on the disks that will allow an Operating


System (DOS, Windows 95, Linux, OS/2, Windows NT, ...) to use
the disk space to store and access files

 The high-level format is simply called "format" (the program used to


perform a high-level format is called FORMAT.COM)

 The high-level format performs two major functions:

• It creates and configures the file allocation tables (FATs)

• It creates the root directory, which is the foundation upon which


files and subdirectories are built
Magnetic Storage (Cont.)
 File System
 The file system is actually the interface between operating system and drives

 When the user software, such as MS Word, asks to read a file from the hard disk, the
operating system (Windows 95/98 or NT) asks the file system (FAT or NTFS) to open
the file

 The file system knows where files are saved. It finds and reads the relevant sectors and
delivers the data to the operating system
Magnetic Storage (Cont.)
 File System
 File system is the way in which files are named and where they are placed logically for
storage and retrieval

 The DOS, Windows, OS/2, Macintosh, and UNIX-based operating systems all have file
systems in which files are placed somewhere in a hierarchical (tree) structure

 A file is placed in a directory (folder in Windows) or subdirectory at the desired place


in the tree structure
Magnetic Storage (Cont.)
 File System
 File systems specify conventions for naming files

 These conventions include the maximum number of characters in a name, which


characters can be used

 A file system also includes a format for specifying the path to a file through the
structure of directories

 Formatting can be compared to starting a library

 You must install the book shelves and the catalogue system before any books are put in
place
Magnetic Storage (Cont.)
 File System
 Once the library is ready, bring on the books! Similarly with a disk

 When we format it, we "burn in" a file system to make it ready to receive data (files)

 Following are some of the File System:

1. FAT (File Allocation Table)


2. FAT32 (File Allocation Table)
3. NTFS (New Technology File System)
4. HPFS (High Performance File System)
Magnetic Storage (Cont.)
 FAT or FAT16
 File Allocation Table was developed in 1981 for DOS system

 FAT16 was designed to handle floppies

 FAT16 can handle a maximum of 2 GB Volume size

 Maximum file size can be 2 GB

 Maximum number of files can be 65000

 No File Compression and No Encryption


Magnetic Storage (Cont.)
 FAT32
 FAT 32 is an extension of Fat 16

 FAT 32 introduced in service pack 2 of Windows 95, and also supported by Windows
98, Windows Me, Windows 2000 and Windows XP

 FAT32 can handle a maximum of 2 TB Volume size

 Maximum file size can be 4 GB

 The number of files on a single volume is nearly unlimited

 No File Compression and No Encryption


Magnetic Storage (Cont.)
 NTFS
 NTFS stands for new technology file system or network technology file system used by
Windows NT, Windows XP and 2000

 In NTFS partition size can be of 2 TB or more

 Maximum file size is limited by Volume size

 The number of files on a single volume is nearly unlimited

 Compression and Encryption facility is provided

 Maximum file length can be up to 255 characters


Magnetic Storage (Cont.)
 HPFS
 High Performance File System is used by OS/2 from IBM

 Maximum file size can be 2 GB

 Maximum number of files on a single volume are unlimited

 HPFS can handle a maximum of 64 GB Volume size

 No Compression and No Encryption


Optical Storage
 The most popular alternatives to magnetic storage
systems are optical storage

 Optical storage devices use lasers to read data from


or write data to the reflective surface of an optical
disc

 The most common types of Optical storage are:


 CD-ROM (Compact Disc-Read Only Memory)

 DVD-ROM (Digital Versatile Disk-Read Only Memory)


Optical Storage (Cont.)
 CD-ROM
 A CD-ROM drive reads digital data from a spinning disc by focusing a laser on the
disc's surface

 Some areas of the disc reflect the laser light into a sensor, and other areas scatter the
light

 A spot that reflects the laser beam into the sensor is interpreted as a 1, and the
absence of a reflection is interpreted as a 0

 CD-ROM can store up to 650MB or 700MB of data


CD-ROM
Optical Storage (Cont.)
 DVD-ROM
 Many of today's new PCs contain a built-in digital versatile disc-read only memory
(DVD-ROM) drive

 DVD-ROM is a high-density medium capable of storing 4.7 GB of data by using


special data-compression technology and small tracks for storing data

 The latest generation of DVD-ROM disc actually uses layers of data tracks, effectively
doubling their capacity

 Dual-layer DVD-ROM discs can hold 17 GB of data


DVD-ROM
Central Processing Unit
 The processor, which is short for both microprocessor
and central processing unit (CPU)
 CPU is the brain of the computer, the place where data
is manipulated
 CPU consists of several million tiny electronic switches
called transistors
 In large computer systems, such as supercomputers and
mainframes, there are several processors
 But in the average microcomputer, the entire CPU is a
single unit, called a microprocessor
Central Processing Unit (Cont.)
 Microprocessors are usually divided into two
subsystems
 Control Unit (CU)

 Arithmetic Logic Unit (ALU)


Central Processing Unit (Cont.)
 Control Unit (CU)
 All the computer’s resources are managed from the control unit

 Control unit works like the traffic signal directing the flow of data through the CPU, as
well as to and from other devices
Central Processing Unit (Cont.)
 Arithmetic Logic Unit (ALU)
 Because all computer data is stored as numbers, much of the
processing that takes place involves comparing numbers or
carrying out mathematical operations
 So the computer can perform two types of operations
• Arithmetic Operations
• Logical Operations

 Arithmetic operations include addition (+), subtraction (-),


multiplication (*), and division (/)
 Logical Operations include comparisons, such as equal to (=),
greater than (>), less than (<)
Central Processing Unit (Cont.)
 Arithmetic Logic Unit (ALU)
 The ALU includes a group of registers– high-speed memory locations built into the
CPU that are used to hold the data currently being processed

 Registers are just like the scratchpad

 The control unit tell the ALU to load the data into registers from the memory

 Then ALU performs the calculation and stores the result in other registers
Machine Cycle
 Each time the CPU executes an instruction, it takes
a series of steps

 The completed series of steps is called a machine


cycle

 A machine cycle itself can be broken down into two


smaller cycles
 Instruction Cycle

 Execution Cycle
Machine Cycle (Cont.)
 Instruction Cycle
 During the instruction cycle, the CPU takes two steps:

• Fetching
• Decoding

 Execution Cycle
 During this CPU also takes two steps:

• Executing
• Storing

You might also like