0% found this document useful (0 votes)
538 views

Unit - 1 (PPS)

The document discusses the stored program architecture of computers. It describes how modern computers are based on the stored-program concept introduced by John Von Neumann, where programs and data are stored in memory and treated the same. This novel idea meant computers could be reprogrammed more easily. The basic units of a stored program computer are described as the central processing unit (CPU), main memory unit, and input/output devices.

Uploaded by

MOHAMMAD ANISH
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
538 views

Unit - 1 (PPS)

The document discusses the stored program architecture of computers. It describes how modern computers are based on the stored-program concept introduced by John Von Neumann, where programs and data are stored in memory and treated the same. This novel idea meant computers could be reprogrammed more easily. The basic units of a stored program computer are described as the central processing unit (CPU), main memory unit, and input/output devices.

Uploaded by

MOHAMMAD ANISH
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

Stored program architecture of computers

Historically there have been 2 types of Computers:

1. Fixed Program Computers – Their function is very specific and they couldn’t be
programmed, e.g. Calculators.
2. Stored Program Computers – These can be programmed to carry out many different tasks,
applications are stored on them, hence the name.
The modern computers are based on a stored-program concept introduced by John Von
Neumann. In this stored-program concept, programs and data are stored in a separate storage
unit called memories and are treated the same. This novel idea meant that a computer built with
this architecture would be much easier to reprogram.

It is also known as IAS computer and is having three basic units:


1. The Central Processing Unit (CPU)
2. The Main Memory Unit
3. The Input/Output Device

Let’s consider them in details.

 Control Unit –
A control unit (CU) handles all processor control signals. It directs all input and output
flow, fetches code for instructions, and controls how data moves around the system.
 Arithmetic and Logic Unit (ALU) –
The arithmetic logic unit is that part of the CPU that handles all the calculations the CPU
may need, e.g. Addition, Subtraction, Comparisons. It performs Logical Operations, Bit
Shifting Operations, and Arithmetic operations.

Figure – Basic CPU structure, illustrating ALU


Main Memory Unit (Registers) –
1. Accumulator: Stores the results of calculations made by ALU.
2. Program Counter (PC): Keeps track of the memory location of the next instructions to be
dealt with. The PC then passes this next address to Memory Address Register (MAR).
3. Memory Address Register (MAR): It stores the memory locations of instructions that
need to be fetched from memory or stored into memory.
4. Memory Data Register (MDR): It stores instructions fetched from memory or any data
that is to be transferred to, and stored in, memory.
5. Current Instruction Register (CIR): It stores the most recently fetched instructions while
it is waiting to be coded and executed.
6. Instruction Buffer Register (IBR): The instruction that is not to be executed immediately
is placed in the instruction buffer register IBR.

 Input/Output Devices – Program or data is read into main memory from the input
device or secondary storage under the control of CPU input instruction. Output devices are
used to output the information from a computer. If some results are evaluated by computer
and it is stored in the computer, then with the help of output devices, we can present them
to the user.
 Buses – Data is transmitted from one part of a computer to another, connecting all major
internal components to the CPU and memory, by the means of Buses. Types:
1. Data Bus: It carries data among the memory unit, the I/O devices, and the processor.
2. Address Bus: It carries the address of data (not the actual data) between memory and
processor.
3. Control Bus: It carries control commands from the CPU (and status signals from other
devices) in order to control and coordinate all the activities within the computer.

Von Neumann bottleneck –

Whatever we do to enhance performance, we cannot get away from the fact that instructions
can only be done one at a time and can only be carried out sequentially. Both of these factors
hold back the capability of the CPU. This is commonly referred to as the ‘Von Neumann
bottleneck’. We can provide a Von Neumann processor with more cache, more RAM, or faster
components but if original gains are to be made in CPU performance then an influential
inspection needs to take place of CPU configuration.
This architecture is very important and is used in our PCs and even in Super Computers.

Storage device- Primary memory, and Secondary storage

What is a Storage Device? Definition, Types, Examples


A storage unit is a part of the computer system which is employed to store the information and
instructions to be processed. A storage device is an integral part of the computer hardware which
stores information/data to process the result of any computational work. Without a storage
device, a computer would not be able to run or even boot up. Or in other words, we can say that
a storage device is hardware that is used for storing, porting, or extracting data files. It can also
store information/data both temporarily and permanently. Computer storage is of two types:

 Primary Storage Devices: It is also known as internal memory and main memory. This is a
section of the CPU that holds program instructions, input data, and intermediate results. It is
generally smaller in size. RAM (Random Access Memory) and ROM (Read Only Memory)
are examples of primary storage.
 Secondary Storage Devices: Secondary storage is a memory that is stored external to the
computer. It is mainly used for the permanent and long-term storage of programs and data.
Hard Disk, CD, DVD, Pen/Flash drive, SSD, etc, are examples of secondary storage.

Storage Devices

Now we will discuss different types of storage devices available in the market. These storage
devices have their own specification and use. Some of the commonly used storage devices are:

1. Primary storage devices

(i) RAM: It stands for Random Access Memory. It is used to store information that is used
immediately or we can say that it is a temporary memory. Computers bring the software installed
on a hard disk to RAM to process it and to be used by the user. Once, the computer is turned off,
the data is deleted. With the help of RAM, computers can perform multiple tasks like loading
applications, browsing the web, editing a spreadsheet, experiencing the newest game, etc. It
allows you to modify quickly among these tasks, remembering where you’re in one task once
you switch to a different task. It is also used to load and run applications, like your spreadsheet
program, answer commands, like all edits you made within the spreadsheet, or toggle between
multiple programs, like once you left the spreadsheet to see the email. Memory is nearly always
being actively employed by your computer. It ranges from 1GB – 32GB/64GB depending upon
the specifications. There are different types of RAM, although they all serve the same purpose,
the most common ones are :
 SRAM: It stands for Static Random Access Memory. It consists of circuits that retain stored
information as long as the power is supply is on. It is also known as volatile memory. It is
used to build Cache memory. The access time of SRAM is lower and it is much faster as
compared to DRAM but in terms of cost, it is costly as compared to DRAM.
 DRAM: It stands for Dynamic Random Access Memory. It is used to stores binary bits in
the form of electrical charges that are applied to capacitors. The access time of DRAM is
slower as compare to SRAM but it is cheaper than SRAM and has a high packaging density.
 SDRAM: It stands for Synchronous Dynamic Random Access Memory. It is faster than
DRAM. It is widely used in computers and others. After SDRAM was introduced, the
upgraded version of double data rate RAM, i.e., DDR1, DDR2, DDR3, and DDR4 was
entered into the market and widely used in home/office desktops and laptops.
(ii) ROM: It stands for Read-Only Memory. The data written or stored in these devices are non-
volatile, i.e, once the data is stored in the memory cannot be modified or deleted. The memory
from which will only read but cannot write it. This type of memory is non-volatile. The
information is stored permanently during manufacture only once. ROM stores instructions that
are used to start a computer. This operation is referred to as bootstrap. It is also used in other
electronic items like washers and microwaves. ROM chips can only store few megabytes (MB)
of data, which ranges between 4 and 8 MB per ROM chip.
There are two types of ROM:

 PROM: PROM is Programmable Read-Only Memory. These are ROMs that can be
programmed. A special PROM programmer is employed to enter the program on the PROM.
Once the chip has been programmed, information on the PROM can’t be altered. PROM is
non-volatile, that is data is not lost when power is switched off.

 EPROM: Another sort of memory is that the Erasable Programmable Read-Only Memory.
It is possible to erase the info which has been previously stored on an EPROM and write new
data onto the chip.

 EEPROM : (electrically erasable programmable read-only memory) is user-modifiable read-


only memory (ROM) that allow users to erase and reprogram stored data repeatedly in
an application. In contrast to EPROM chips, EEPROM memory does not need to be removed
from the computer in order to modify the data.
2. Magnetic Storage Devices

(i) Floppy Disk: It is also known as a floppy diskette. It is generally used on a personal computer
to store data externally. A Floppy disk is made up of a plastic cartridge and secures with a
protective case. Nowadays floppy disk is replaced by new and effective storage devices like
USB, etc.

(ii) Hard Disk: It is a storage device (HDD) that stores and retrieves data using magnetic
storage. It is a non-volatile storage device that can be modified or deleted n number of times
without any problem. Most of the computers and laptops have HDDs as their secondary storage
device. It is actually a set of stacked disks, just like phonograph records. In every hard disk, the
data is recorded electromagnetically in the concentric circles or we can say track present on the
hard disk, and with the help of a head just like a phonograph arm(but fixed in a position) to read
the information present on the track. The read-write speed of HDDs is not so fast but decent. It
ranges from a few GBs to a few and more TB
.
(iii) Magnetic Card: It is a card in which data is stored by modifying or rearranging the
magnetism of tiny iron-based magnetic particles present on the band of the card. It is also known
as a swipe card. It is used like a passcode(to enter into house or hotel room), credit card, identity
card, etc.
(iv) Tape Cassette: It is also known as a music cassette. It is a rectangular flat container in
which the data is stored in an analog magnetic tape. It is generally used to store audio recordings.
(v) SuperDisk: It is also called LS-240 and LS-120. It is introduced by Imation corporation and
it is popular with OEM computers. It can store data up to 240 MB.
3. Flash memory Devices
It is a cheaper and portable storage device. It is the most commonly used device to store data
because is more reliable and efficient as compare to other storage devices. Some of the
commonly used flash memory devices are:

(i) Pen Drive: It is also known as a USB flash drive that includes flash memory with an
integrated USB interface. We can directly connect these devices to our computers and laptops
and read/write data into them in a much faster and efficient way. These devices are very portable.
It ranges from 1GB to 256GB generally.
(ii) SSD: It stands for Solid State Drive, a mass storage device like HDDs. It is more durable
because it does not contain optical disks inside like hard disks. It needs less power as compared
to hard disks, is lightweight, and has 10x faster read and write speed as compared to hard disks.
But, these are costly as well. While SSDs serve an equivalent function as hard drives, their
internal components are much different. Unlike hard drives, SSDs don’t have any moving parts
and thus they’re called solid-state drives. Instead of storing data on magnetic platters, SSDs store
data using non-volatile storage. Since SSDs haven’t any moving parts, they do not need to “spin
up”. It ranges from 150GB to a few and more TB.
(iii) SD Card: It is known as a Secure Digital Card. It is generally used with electronic devices
like phones, digital cameras, etc. to store larger data. It is portable and the size of the SD card is
also small so that it can easily fit into electronic devices. It is available in different sizes like
2GB, 4GB, 8GB, etc.
(iv) Memory Card: It is generally used in digital cameras. printers, game consoles, etc. It is also
used to store large amounts of data and is available in different sizes. To run a memory card on
a computer you require a separate memory card reader.
(v) Multimedia Card: It is also known as MMC. It is an integrated circuit that is generally used
in-car radios, digital cameras, etc. It is an external device to store data/information.
4. Optical Storage Devices
Optical Storage Devices is also a secondary storage device. It is a removable storage device.
Following are some optical storage devices:

(i) CD: It is known as Compact Disc. It contains tracks and sectors on its surface to store data.
It is made up of polycarbonate plastic and is circular in shape. CD can store data up to 700MB.
It is of two types:
 CD-R: It stands for Compact Disc read-only. In this type of CD, once the data is written can
not be erased. It is read-only.
 CD-RW: It stands for Compact Disc read Write. In this type of CD, you can easily write or
erase data multiple times.
(ii) DVD: It is known as Digital Versatile Disc. DVDs are circular flat optical discs used to store
data. It comes in two different sizes one is 4.7GB single-layer discs and another one is 8.5GB
double-layer discs. DVDs look like CDs but the storage capacity of DVDs is more than as
compared to CDs. It is of two types:
 DVD-R: It stands for Digital Versatile Disc read-only. In this type of DVD, once the data is
written can not be erased. It is read-only. It is generally used to write movies, etc.
 DVD-RW: It stands for Digital Versatile Disc read Write. In this type of DVD, you can
easily write or erase data multiple times.
(iii) Blu-ray Disc: It is just like CD and DVD but the storage capacity of blu ray is up to 25GB.
To run a Blu-ray disc you need a separate Blu-ray reader. This Blu-ray technology is used to
read a disc from a blue-violet laser due to which the information is stored in greater density with
a longer wavelength.

5. Cloud and Virtual Storage


Nowadays, secondary memory has been upgraded to virtual or cloud storage devices. We can
store our files and other stuff in the cloud and the data is stored for as long as we pay for the
cloud storage. There are many companies that provide cloud services largely Google, Amazon,
Microsoft, etc. We can pay the rent for the amount of space we need and we get multiple benefits
out of it. Though it is actually being stored in a physical device located in the data centers of the
service provider, the user doesn’t interact with the physical device and its maintenance. For
example, Amazon Web Services offers AWS S3 as a type of storage where users can store data
virtually instead of being stored in physical hard drive devices. These sorts of innovations
represent the frontier of where storage media goes.
Sr.No. Primary memory Secondary memory

Secondary memory is
1. Primary memory is temporary. permanent.

Secondary memory is not


Primary memory is directly directly accessible by the
2. accessible by Processor/CPU. CPU.

Nature of Parts of Primary


memory varies, RAM- volatile It’s always Non-volatile in
3. in nature. ROM- Non-volatile. nature.

Secondary memory devices


Primary memory devices are are less expensive when
more expensive than compared to primary memory
4. secondary storage devices. devices.

The memory devices used for The secondary memory


primary memory are devices are magnetic and
5. semiconductor memories. optical memories.

Primary memory is also known Secondary memory is also


as Main memory or Internal known as External memory
6. memory. or Auxiliary memory.

Examples: RAM, ROM, Cache


memory, PROM, EPROM, Examples: Hard Disk, Floppy
7. Registers, etc. Disk, Magnetic Tapes, etc.
Memory Access Methods

These are 4 types of memory access methods:

1. Sequential Access:-
In this method, the memory is accessed in a specific linear sequential manner,
like accessing in a single Linked List. The access time depends on the location
of the data.

Applications of this sequential memory access are magnetic tapes, magnetic


disk and optical memories.

2. Random Access:-
In this method, any location of the memory can be accessed randomly like
accessing in Array. Physical locations are independent in this access method.
Applications of this random memory access are RAM and ROM.

3. Direct Access:-
In this method, individual blocks or records have a unique address based on
physical location. access is accomplished by direct access to reach a general
vicinity plus sequential searching, counting or waiting to reach the final
destination. This method is a combination of above two access methods. The
access time depends on both the memory organization and characteristics
of storage technology. The access is semi-random or direct.
Application of thus direct memory access is magnetic hard disk, read/write
header.

S.NOHigh Level Language Low Level Language

It is programmer friendly
1. language. It is a machine friendly language.

High level language is less Low level language is high


2. memory efficient. memory efficient.

3. It is easy to understand. It is tough to understand.

It is complex to debug
4. It is simple to debug. comparatively.

It is complex to maintain
5. It is simple to maintain. comparatively.

6. It is portable. It is non-portable.

7. It can run on any platform. It is machine-dependent.

It needs compiler or
8. interpreter for translation. It needs assembler for translation.
It is used widely for It is not commonly used now-a-
9. programming. days in programming.

Algorithm

Algorithm can be defined as: “A sequence of activities to be processed for getting desired
output from a given input.”

Webopedia defines an algorithm as: “A formula or set of steps for solving a particular
problem. To be an algorithm, a set of rules must be unambiguous and have a clear stopping point”.
There may be more than one way to solve a problem, so there may be more than one algorithm for
a problem. Now, if we take definition of algorithm as: “A sequence of activities to be processed
for getting desired output from a given input.” Then we can say that:

1. Getting specified output is essential after algorithm is executed.

2. One will get output only if algorithm stops after finite time.

3. Activities in an algorithm to be clearly defined in other words for it to be unambiguous


Flowchart Symbols

There are 6 basic symbols commonly used in flowcharting of assembly language


Programs: Terminal, Process, input/output, Decision, Connector and Predefined Process. This is
not a complete list of all the possible flowcharting symbols, it is the ones used most often in the
structure of Assembly language programming
Problem1: Find the area of a circle of radius r.

Problem 2: Convert temperature Fahrenheit to Celsius.


Problem3 : Flowchart for an algorithm which gets two numbers and prints
sum of their value

Problem4 : Flowchart for the problem of printing even numbers between 9


and 100
Advantages of using Flowcharts
As we discussed flow chart is used for representing algorithm in pictorial form. This pictorial
representation of a solution/system is having many advantagrs.These advantages are as follows:

1) Communication: A Flowchart can be used as a better way of communication of the logic of a


system and steps involve in the solution, to all concerned particularly to the client of system.
2) Effective analysis: A flowchart of a problem can be used for effective analysis of the problem.
3) Documentation of Program/System: Program flowcharts are a vital part of a good program
documentation. Program document is used for various purposes like knowing the components in
the program, complexity of the program etc.
4) Efficient Program Maintenance: Once a program is developed and becomes operational it needs
time to time maintenance. With help of flowchart maintenance become easier.
5) Coding of the Program: Any design of solution of a problem is finally converted into computer
program. Writing code referring the flowchart of the solution become easy.

You might also like