2. Microprocessor and Memory Basics.pptx
2. Microprocessor and Memory Basics.pptx
Memory Basics
Computer System Architecture
2
Architecture of Computer System
■ Computer is an electronic machine that makes performing any
task very easy.
■ In computer, the CPU executes each instruction provided to it, in a
series of steps, this series of steps is called Machine Cycle, and
is repeated for each instruction.
■ Machine cycle involves fetching of instruction, decoding the
instruction, transferring the data, executing the instruction.
■ Computer system has five basic units that help the computer to
perform operations, which are given below:
1) Input Unit
- connects the external environment with internal computer system.
- It provides data and instructions to the computer system. Commonly
used input devices are keyboard, mouse, magnetic tape etc.
- Input unit perform following tasks:
✔ Accept the data and instructions from the outside environment.
✔ Convert it into machine language.
✔ Supply the converted data to computer system. 3
Architecture of Computer System
2. Output Unit
- It connects the internal system of a computer to the external
environment.
- It provides the results of any computation, or instructions to the outside
world.
- Some output devices are printers, monitor etc.
3. Storage Unit
- This unit holds the data and instructions.
- It also stores the intermediate results before these are sent to the output devices.
- It also stores the data for later use.
- The storage unit of a computer system can be divided into two categories:
Primary Storage: This memory is used to store the data which is being
currently executed. It is used for temporary storage of data. The data is lost,
when the computer is switched off. RAM is used as primary storage memory.
Secondary Storage: The secondary memory is slower and cheaper than
primary memory. It is used for permanent storage of data. Commonly used
secondary memory devices are hard disk, CD etc.
4
Architecture of Computer System
3. Arithmetic Logical Unit
- All the calculations are performed in ALU of the computer system.
- The ALU can perform basic operations such as addition, subtraction, division,
multiplication etc.
- Whenever calculations are required, the control unit transfers the data from
storage unit to ALU. When the operations are done, the result is transferred back
to the storage unit.
4. Control Unit
- It controls all other units of the computer.
- It controls the flow of data and instructions to and from the storage unit to ALU.
Thus it is also known as central nervous system of the computer.
5. CPU
- It is Central Processing Unit of the computer.
- The control unit and ALU are together known as CPU. CPU is the brain of
computer system.
- It performs following tasks:
■ It performs all operations.
■ It takes all decisions.
■ It controls all the units of computer.
5
Instruction Execution
The CPU goes through the following steps to execute a machine
instruction (the fetch-execute cycle).
■ Fetch
■ Fetch an instruction from memory
■ Execute
■ Perform the operation on the data
RAM ROM
Definition RAM is a form of data storage that Read-only memory or ROM is also a form
can be accessed randomly at any of data storage that can not be easily
time, in any order and from any altered or reprogrammed. Stores
physical location., allowing quick instructions that are not necessary for
access and manipulation. re-booting up to make the computer
operate when it is switched off.
Stands for Random Access Memory Read-only memory
Use RAM allows the computer to ROM stores the program required to
read data quickly to run initially boot the computer. It only allows
applications. It allows reading and reading.
writing.
Volatility RAM is volatile i.e. its contents are It is non-volatile i.e. its contents are
lost when the device is powered off. retained even when the device is
powered off.
Types The two main types of RAM are The types of ROM include PROM, EPROM
static RAM and dynamic RAM. and EEPROM.
PROM EPROM
Programmable Read Only
Erasable Programmable Read Only Memory
Memory
PROM is not reusable. While EPROM is reusable multiple times.
PROM is inexpensive. While it is costlier than PROM.
The processes of PROMS is
irreversible, means it’s memory Whereas EPROM’s processes can be reversed.
is permanent.
The storage of PROM is high. While EPROM’s storage of EPROM is less than PROM.
PROM is the type of ROM is While EPROM is also the type of ROM is read and written
written only. optically.
10
Buses
■ In isolation, the microprocessor, the memory and the input/output
ports are interesting components, but they cannot do anything
useful.
■ In combination, they can form a complete system if they can
communicate with each other.
■ This communication is accomplished over bundles of signal wires
(known as buses) that connect the parts of the system together.
■ There are normally three types of bus in any processor system:
■ Address bus: this determines the location in memory that
the processor will read data from or write data to. It is
uni-directional.
■ Data bus: this contains the contents that have been read
from the memory location or are to be written into the memory
location. It is bi-directional.
■ Control bus: this manages the information flow between
components indicating whether the operation is a read or a
write and ensuring that the operation happens at the right time.
Bi-directional
How Bus Works?
■ To read the contents of a memory location, the CPU places the
address of the memory location on the address bus.
■ And it receives the data, sent by the memory circuits, on the data
bus.
■ A control signal is required to inform the memory to perform a read
operation. The CPU sends the control signal on the control bus.
■ Assembly Language
■ An assembly language is a programming language that can be used to
directly tell the computer what to do.
■ An assembly language is almost exactly like the machine code that a
computer can understand, except that it uses words in place of numbers.
■ A computer cannot really understand an assembly program directly. However,
it can easily change the program into machine code by replacing the words of
the program with the numbers that they stand for. A program that does that is
called an assembler.
13
Programming Language
■ Advantages Assembly Language:
■ Efficiency: Assembly Language has the same efficiency of execution as the machine
level language. Because this is one-to-one translator between assembly language
program and its corresponding machine language program.
■ A well written assembly language program produces a faster, shorter machine language
program.
■ It is easier to correct errors and modify program instructions.
■ The another reason for learning assembly language is it possible to gain a feeling for
the way the computer “thinks” and why certain things the way they do inside the
computer.
■ High-Level Language
■ A high-level language (HLL) is a programming language such as C, FORTRAN,
or Pascal that enables a programmer to write programs that are more or less
independent of a particular type of computer.
■ Such languages are considered high-level because they are closer to human languages
and further from machine languages.
■ Advantage of High-Level Language
■ The main advantage of high-level languages over low-level languages is that they are
easier to read, write, and maintain.
■ Ultimately, programs written in a high-level language must be translated into machine
language by a compiler or interpreter. C, C++, JAVA, C# these are example of high level
language.
14
End
15