Unit_I_Stored Program_Memory_IO-2
Unit_I_Stored Program_Memory_IO-2
The Hardware
The term hardware refers to all of the physical devices, or components, that a computer is
made of. The hardware is the machinery itself. It is made up of the physical parts or
devices of the computer system like the electronic Integrated Circuits (ICs), magnetic
storage media and other mechanical devices like input devices, output devices etc. All
these various hardware are linked together to form an effective functional unit.
The Software
The computer hardware itself is not capable of doing anything on its own. It has to be
given explicit instructions to perform the specific task. The computer program is the one
which controls the processing activities of the computer. The computer thus functions
according to the instructions written in the program. Software is a collection of programs
which utilize and enhance the capability of the hardware.
Von Neumann architecture was first published by John von Neumann in 1945. Von
Neumann architecture is based on the stored-program computer concept, where
instruction data and program data are stored in the same memory. His computer
architecture design consists of a Control Unit, Arithmetic and Logic Unit (ALU),
Memory Unit, Registers and Inputs/Outputs. The key elements of von Neumann
architecture are:
Data and instructions are both stored as binary digits
Data and instructions are both stored in primary storage
Instructions are fetched from memory one at a time and in order (serially)
The processor decodes and executes an instruction, before cycling around to
fetchthe next instruction
The cycle continues until no more instructions are available.
Output Unit
The output devices give the results of the process and computations to the outside world.
The output units accept the results produced by the computer, convert them into a human
readable form and supply them to the users.
Word Length
The word length of the processor in a computer refers to the maximum number of bits it
can take as input. "Word size" refers to the number of bits processed by a computer's
CPU in one go (these days, typically 32 bits or 64 bits). Data bus size, instruction size,
address size are usually multiples of the word size. The length of the important registers
in the ALU (Arithmetic and Logic Unit) like “Program counter’, “Accumulator” are defined
by the word size. 16 bit word size means the register can store 16 ones and zeros in it,
and the biggest number is the decimal equivalent of that binary number. (2 raised to 16).
PRIMARY STORAGE
Primary storage is characterized by faster access time, less storage capacity and higher
costs as compared to secondary storage units. Primary storage or main memory is that
part of the computer system which stores the programs, data and intermediate results
during the program execution.
The primary storage is volatile. Whenever the power is turned off the data is lost.
Primary storage is also called Random Access Memory (RAM). RAM means it is
possible to randomly select and use any storage location for storage and retrieval of data.
RAM is also called a read/write memory because data can both be read from and written
onto these units. When the power is switched off the data stored in the RAM is lost.
Primary Memory
RAM ROM
SRAM: SRAM (Static Random-Access Memory) is a type of RAM used to store static
data in the memory. It means to store data in SRAM remains active as long as the
computer system has a power supply.
ROM
ROM is Read Only Memory. In this type of memory the data is permanently stored. The
information can only be read and new data cannot be written onto this memory. However
the contents of the ROM are not lost even when the power is turned off i.e. this memory is
non-volatile.
PROM: PROM is Programmable Read Only Memory. These are ROMs which can be
programmed. Once the chip has been programmed, information on the PROM cannot be
altered.
EPROM: Another type of memory is the Erasable Programmable Read Only Memory. It
is possible to erase the data which has been previously stored on an EPROM and write
new data onto the chip.
Flash ROM: Flash memory is a non-volatile storage memory chip that can be
programmed in small units called Block or Sector. Flash Memory is an EEPROM form of
computer memory, and the data cannot be lost when the power source is turned off.
Cache Memory
This is a very special type of high speed memory. This memory cannot be accessed by
the user. The main function of this cache memory is to make the programs and data
available to the CPU very fast. Access time of memory is generally very high as compared
to the execution time of the GPU. Therefore a cache, which is a very small but fast
memory, is used between the CPU and the main memory.
A cache stores those segments of programs and data which are frequently needed. It
makes available this data to the CPU at a very fast rate thus increasing the efficiency.
Registers
Registers are used to retain information temporarily. These are special memory units
which are not actual parts of the main memory, but allow efficient movement of
information between the various units of the computer system. The registers receive
information, hold it temporarily and make it available as and when required.
A computer uses a number of registers, where each register performs a specific function.
Some of the common registers are:
Memory Address Register (MAR): The function of this register is to hold the
address of the current or active memory location.
Memory Buffer Register (MBR): This register holds the contents of the address
from which data is read or to which data has been written.
Program Control Register: It holds the address of the next instruction to be
executed.
Accumulator Register: It holds the initial data, the intermediate results and the
final data of the program under execution.
Instruction Register: This register holds the current instruction being executed.
Input/output Register: The function of this register is to communicate with the
Input/output devices.
RAM ROM
It is a temporary memory of the computer. It is the permanent memory of the computer.
It is a read-write memory. The data can be It is a read only memory. The data can only
written and read. be read.
Stores the files even when the power is
Stores the files as long as the computer is turned off, such as game cartridge and BIOS
on and working. programs stored in the memory of a
computer, etc.
Data stored in RAM can be retrieved and We can only read the data stored in ROM. It
altered. cannot be altered.
It is faster than ROM as it is a high speed
It is slower than the RAM.
memory.
The data stored in RAM is used by the CPU The data stored in ROM is used by CPU only
in real-time to run the computer. when it is transferred to RAM.
It temporarily stores the files and data that It stores the BIOS program on the
the CPU needs to process the current motherboard of a computer, which is needed
instructions or work. to bootstrap the computer.
It is costlier than ROM. It is cheaper than RAM.
Examples: It is used as CPU cache, primary Examples: It is used as Firmware by micro-
memory in a computer. controllers.
Types: DRAM, SRAM Types: PROM, EPROM, EEPROM etc.