CAO Unit 1
CAO Unit 1
CC
D. Memory Unit:
Memory unit is used to store the data and program. CPU can work with the information
stored in memory unit. This memory unit is termed as primary memory or main memory
module. These are basically semiconductor memories.
There are two types of semiconductor memories –
a. Volatile Memory : RAM (Random Access Memory).
b. Non-Volatile Memory : ROM (Read only Memory), PROM
(Programmable ROM) EPROM (Erasable PROM), EEPROM (Electrically
Erasable PROM)
Secondary Memory :
There is another kind of storage device, apart from primary or main memory, which is
known as secondary memory.
Secondary memories are non volatile memory and it is used for permanent storage of data
and program.
Example of secondary memories:
Hard Disk, Floppy Disk, Magnetic Tape------ These are magnetic devices,
CD-ROM------ is optical device
Thumb drive (or pen drive) ------ is semiconductor memory.
COMPUTER ARCHITECTURE
Computer Architecture refers to those attributes of a system visible to a programmer and have a
direct effect on the execution of a program.
Computer Architecture is the field of study of selecting and interconnecting hardware
components to create computers that satisfy functional performance and cost goals.
It refers to those attributes of the computer system that are visible to a programmer Computer
Architecture Concerns Machine Organization, interfaces, application, technology, measurement
& simulation that Includes:
Instruction set
Data formats
Principle of Operation (formal description of every operation)
Features (organization of programmable storage, registers used, interrupts mechanism,
etc.)
In short, it is the combination of Instruction Set Architecture, Machine Organization and the
related hardware.
COMPUTER ORGANIZATION
Computer Organization refers to the operational units and their interconnections that realize the
architectural specifications.
Computer organization is how features are implemented with the specific building blocks visible
to designer, such as control signals, interfaces, memory technology, etc.
Computer architecture and organization are closely related, though not exactly the same.
A stored program computer has the following basic units:
Processor -- center for manipulation and control
Memory -- storage for instructions and data for currently executing programs
I/O system -- controller which communicate with "external" devices: secondary memory,
display devices, networks
Data-path & control -- collection of parallel wires, transmits data, instructions, or control
signal
Computer organization defines the ways in which these components are interconnected and
controlled. It is the capabilities and performance characteristics of those principal functional
units.
STRUCTURE AND FUNCTION
The hierarchical nature of complex systems is essential to both their design and their description.
The designer need only deal with a particular level of the system at a time. At each level, the
system consists of a set of components and their interrelationships.
The behavior at each level depends only on a simplified, abstracted characterization of the
system at the next lower level. At each level, the designer is concerned with structure and
function:
• Structure: The way in which the components are interrelated
• Function: The operation of each individual component as part of the structure.
Function
Both the structure and functioning of a computer are, in essence, simple. Figure 1.1 depicts the
basic functions that a computer can perform. In general terms, there are only four:
• Data processing
• Data storage
• Data movement
• Control
The computer must be able to process data. The data may take a wide variety of forms, and the
range of processing requirements. However, there are only a few fundamental methods or types
of data processing.
It is also essential that a computer store data. Even if the computer is processing data on the fly
(i.e., data come in and get processed, and the results go out immediately), the computer must
temporarily store at least those pieces of data that are being worked on at any given moment.
Thus, there is at least a short-term data storage function. Equally important, the computer
performs a long-term data storage function. Files of data are stored on the computer for
subsequent retrieval and update.
When data are received from or delivered to a device that is directly connected to the computer,
the process is known as input–output (I/O), and the device is referred to as a peripheral. When
data are moved over longer distances, to or from a remote device, the process is known as data
communications.
Finally, there must be control of these three functions. Ultimately, this control is exercised by the
individual(s) who provides the computer with instructions. Within the computer, a control unit
manages the computer’s resources and orchestrates the performance of its functional parts in
response to those instructions.
At this general level of discussion, the number of possible operations that can be performed is
few.
Figure 1.2 depicts the four possible types of operations.
The computer can function as a data movement device (Figure 1.2a), simply transferring data
from one peripheral or communications line to another.
It can also function as a data storage device (Figure 1.2b), with data transferred from the external
environment to computer storage (read) and vice versa (write).
The final two diagrams show operations involving data processing, on data either in storage
(Figure 1.2c) or in route between storage and the external environment (Figure 1.2d).
STRUCTURE
The computer interacts in some fashion with its external environment. In general, all of its
linkages to the external environment can be classified as peripheral devices or communication
lines. We will have something to say about both types of linkages.
There are four main structural components:
• Central processing unit (CPU): Controls the operation of the computer and performs its data
processing functions; often simply referred to as processor.
• Main memory: Stores data.
• I/O: Moves data between the computer and its external environment.
• System interconnection: Some mechanism that provides for communication among CPU, main
memory, and I/O. A common example of system interconnection is by means of a system bus,
consisting of a number of conducting wires to which all the other components attach.
There may be one or more of each of the aforementioned components. Traditionally, there has
been just a single processor. In recent years, there has been increasing use of multiple processors
in a single computer.
Its major structural components are as follows:
• Control unit: Controls the operation of the CPU and hence the computer
• Arithmetic and logic unit (ALU): Performs the computer’s data processing functions
• Registers: Provides storage internal to the CPU
• CPU interconnection: Some mechanism that provides for communication among the control
unit, ALU, and registers.
COMPUTER COMPONENTS
von Neumann architecture is based on three key concepts:
• Data and instructions are stored in a single read–write memory.
• The contents of this memory are addressable by location, without regard to the type of data
contained there.
• Execution occurs in a sequential fashion (unless explicitly modified) from one instruction to the
next.
Hardwired program.
There is a small set of basic logic components that can be combined in various ways to store
binary data and to perform arithmetic and logical operations on that data. If there is a particular
computation to be performed, a configuration of logic components designed specifically for that
computation could be constructed. We can think of the process of connecting the various
components in the desired configuration as a form of programming. The resulting “program” is
in the form of hardware and is termed a hardwired program.
Suppose we construct a general-purpose configuration of arithmetic and logic functions. This set
of hardware will perform various functions on data depending on control signals applied to the
hardware. In the original case of customized hardware, the system accepts data and produces
results (a). With general-purpose hardware, the system accepts data and control signals and
produces results. Thus, instead of rewiring the hardware for each new program, the programmer
merely needs to supply a new set of control signals
Software
The entire program is actually a sequence of steps. At each step, some arithmetic or logical
operation is performed on some data. For each step, a new set of control signals is needed. Let us
provide a unique code for each possible set of control signals, and let us add to the general-
purpose hardware a segment that can accept a code and generate control signals (b).
Programming is now much easier. Instead of rewiring the hardware for each new program, all we
need to do is provide a new sequence of codes. Each code is, in effect, an instruction, and part of
the hardware interprets each instruction and generates control signals. To distinguish this new
method of programming, a sequence of codes or instructions is called software.
COMPUTER FUNCTION
• Memory buffer register (MBR): Contains a word to be stored in memory, or is used to receive a
word from memory.
• Memory address register (MAR): Specifies the address in memory of the word to be written
from or read into the MBR.
• Instruction register (IR): Contains the 8-bit opcode instruction being executed.
• Program counter (PC): Contains the address of the next instruction-pair to be fetched from
memory.
The basic function performed by a computer is execution of a program, which consists of a set of
instructions stored in memory. The processor does the actual work by executing instructions
specified in the program.
In its simplest form, instruction processing consists of two steps:
The processor reads (fetches) instructions from memory one at a time and executes each
instruction.
Program execution consists of repeating the process of instruction fetch and instruction
execution. The instruction execution may involve several operations and depends on the nature
of the instruction.
The processing required for a single instruction is called an instruction cycle. Using the
simplified two-step description given the instruction cycle. The two steps are referred to as the
fetch cycle and the execute cycle. Program execution halts only if the machine is turned off,
some sort of unrecoverable error occurs, or a program instruction that halts the computer is
encountered.
At the beginning of each instruction cycle, the processor fetches an instruction from memory. In
a typical processor, a register called the program counter (PC) holds the address of the
instruction to be fetched next. Unless told otherwise, the processor always increments the PC
after each instruction fetch so that it will fetch the next instruction in sequence.
The fetched instruction is loaded into a register in the processor known as the instruction register
(IR). The instruction contains bits that specify the action the processor is to take.
The processor interprets the instruction and performs the required action. In general, these
actions fall into four categories:
• Processor-memory: Data may be transferred from processor to memory or from memory to
processor.
• Processor-I/O: Data may be transferred to or from a peripheral device by transferring between
the processor and an I/O module.
• Data processing: The processor may perform some arithmetic or logic operation on data.
• Control: An instruction may specify that the sequence of execution be altered.
INTERCONNECTION STRUCTURES
A computer consists of a set of components or modules of three basic types (processor, memory,
I/O) that communicate with each other. In effect, a computer is a network of basic modules.
Thus, there must be paths for connecting the modules. The collection of paths connecting the
various modules is called the interconnection structure. The design of this structure will depend
on the exchanges that must be made among modules.
COMPUTER ARCHITECTURE & ORGANIZATION-UNIT 1 MAYURI KULKARNI
11
CC
Figure 3.15 suggests the types of exchanges that are needed by indicating the major forms of
input and output for each module type:
• Memory: Typically, a memory module will consist of N words of equal length. Each word is
assigned a unique numerical address (0,1,...,N – 1).A word of data can be read from or written
into the memory. The nature of the operation is indicated by read and write control signals. The
location for the operation is specified by an address.
• I/O module: From an internal (to the computer system) point of view, I/O is functionally
similar to memory. There are two operations, read and write. Further, an I/O module may control
more than one external device. We can refer to each of the interfaces to an external device as a
port and give each a unique address (e.g.,0,1,...,M – 1).
In addition, there are external data paths for the input and output of data with an external device.
Finally, an I/O module may be able to send interrupt signals to the processor.
• Processor: The processor reads in instructions and data, writes out data after processing, and
uses control signals to control the overall operation of the system. It also receives interrupt
signals.
The preceding list defines the data to be exchanged. The interconnection structure must support
the following types of transfers:
• Memory to processor: The processor reads an instruction or a unit of data from memory.
• Processor to memory: The processor writes a unit of data to memory.
• I/O to processor: The processor reads data from an I/O device via an I/O module.
• Processor to I/O: The processor sends data to the I/O device.
• I/O to or from memory: For these two cases, an I/O module is allowed to exchange data directly
with memory, without going through the processor, using direct memory access (DMA).
BUS INTERCONNECTION
A bus is a communication pathway connecting two or more devices. A key characteristic of a
bus is that it is a shared transmission medium. Multiple devices connect to the bus, and a signal
transmitted by any one device is available for reception by all other devices attached to the bus.
If two devices transmit during the same time period, their signals will overlap and become
garbled. Thus, only one device at a time can successfully transmit.
Computer systems contain a number of different buses that provide pathways between
components at various levels of the computer system hierarchy. A bus that connects major
computer components (processor, memory, I/O) is called a system bus. The most common
computer interconnection structures are based on the use of one or more system buses.
Bus Structure
Bus the lines can be classified into three functional groups:
data,
address, and
control lines.
The data lines provide a path for moving data among system modules. These lines,
collectively, are called the data bus. The data bus may consist of 32,64,128, or even more
separate lines, the number of lines being referred to as the width of the data bus. Because
each line can carry only 1 bit at a time, the number of lines determines how many bits can
be transferred at a time. The width of the data bus is a key factor in determining overall
system performance.
The address lines are used to designate the source or destination of the data on the data
bus. For example, if the processor wishes to read a word (8, 16, or 32bits) of data from
memory, it puts the address of the desired word on the address lines. Clearly, the width of
the address bus determines the maximum possible memory capacity of the system.
The control lines are used to control the access to and the use of the data and address
lines. Because the data and address lines are shared by all components, there must be a
means of controlling their use. Control signals transmit both command and timing
information among system modules. Timing signals indicate the validity of data and
address information. Command signals specify operations to be performed. Typical
control lines include
• Memory write: Causes data on the bus to be written into the addressed location
• Memory read: Causes data from the addressed location to be placed on the bus
• I/O write: Causes data on the bus to be output to the addressed I/O port • I/O read:
Causes data from the addressed I/O port to be placed on the bus
• Transfer ACK: Indicates that data have been accepted from or placed on the bus
• Bus request: Indicates that a module needs to gain control of the bus
• Bus grant: Indicates that a requesting module has been granted control of the bus
• Interrupt request: Indicates that an interrupt is pending
• Interrupt ACK: Acknowledges that the pending interrupt has been recognized
• Clock: Is used to synchronize operations
• Reset: Initializes all modules
The operation of the bus is as follows. If one module wishes to send data to another, it
must do two things:
(1) obtain the use of the bus, and
(2) transfer data via the bus.
If one module wishes to request data from another module, it must (1) obtain the use of
the bus, and (2) transfer a request to the other module over the appropriate control and
address lines. It must then wait for that second module to send the data.