COA Mod1

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 12

Module: 1

BASIC STRUCTURE OF COMPUTERS - Functional units – Basic operational

concepts – Bus structures. Memory locations and addresses – memory


operations – instructions and instruction sequencing – addressing modes.
Basic processing unit -Fundamental concepts –instruction cycle -
execution of a complete instruction –single bus and multiple bus organization.

WHY COMPUTER ORGANIZATION AND ARCHITECTURE?


Computer architecture is a key component of computer engineering and it is concerned

with all aspects of the design and organization of the central processing unit and the
integration of the CPU into the computer system itself.

Architecture extends upward into computer software because a processor’s architecture

must cooperate with the operating system and system software. It is difficult to design
an operating system well without knowledge of the underlying architecture.

Moreover, the computer designer must have an understanding of software in order to

implement the optimum architecture.

Difference between computer organization and computer architecture


Architecture describes what the computer does and organization describes how it
does it.
Computer organization:
Computer organization is concerned with the way the hardware components operate
and the way they are connected together to form computer system. It includes
Hardware details transparent to the programmer such as control signal and peripheral. It
describes how the computer performs. Example: circuit design, control signals, memory
types this all are under computer organization.

Computer Architecture:

Computer architecture is concerned with the structure and behavior of computer system
as seen by the user. It includes information, formats, instruction set and techniques
for addressing memory. It describes what the computer does.

FUNCTIONAL UNITS:

The computer system is divided into five separate units for its operation.

 Input Unit.
 ALU.
 Control Unit.
 Memory Unit.
 Output Unit.

1.Input & Output unit

The method of feeding data and programs to a computer is accomplished by an input


device. Computer input devices read data from a source, such as magnetic disks, and
translate that data into electronic impulses [ADC] for transfer into the CPU.

Some typical input devices are a keyboard, a mouse, scanner, etc.

Computer output devices converts the electronic impulses [DAC] into human
readable form. Output unit sends processed results to the outside world. Examples:
Display screens, Printers, plotters, microfilms, synthesizers, high-tech blackboards,
film recorders, etc.
2.Memory Unit (MU)

A Memory Unit is a collection of storage cells together with associated circuits needed
to transfer information in and out of storage. Data storage is a common term for archiving
data or information in a storage medium for use by a computer. It’s one of the basic yet
fundamental functions performed by a computer. It’s like a hierarchy of comprehensive
storage solution for fast access to computer resources.

A computer stores data or information using several methods, which leads to different

levels of data storage. Primary storage is the most common form of data storage which
typically refers to the random access memory (RAM). It refers to the main storage of the
computer because it holds data and applications that are currently in use by the
computer. Then, there is secondary storage which refers to the external storage devices
and other external media such as hard drive and optical media.

3.Arithmetic Logical Unit (ALU)

Arithmetic Logical Unit performs the actual processing of data and instruction. The
major operations performed by the ALU are addition, subtraction, multiplication,
division, logic and comparison.

Data is transferred to ALU from storage unit when required. After processing, the
output is returned back to storage unit for further processing or getting stored.

4.Control Unit
Control unit controls and coordinates the entire operations of the computer system.

The control unit determines the sequence in which computer programs and
instructions are executed. Things like processing of programs stored in the main
memory, interpretation of the instructions and issuing of signals for other units of
the computer to execute them..Control Unit coordinates the activities of computer’s
peripheral equipment as they perform the input and output. Therefore it is the manager
of all operations.

5.Central Processing Unit (CPU)

The Arithmetic Logical Unit (ALU), Control Unit (CU) and Memory Unit (MU) of a

computer system are jointly known as the central processing unit. We may call CPU as
the brain of any computer system. It is just like a human brain that takes all major
decisions, makes all sorts of calculations and directs different part of the computer by
activating and controlling the operations.

BASIC OPERATIONAL CONCEPTS

To perform a given task, an appropriate program consisting of a list of


instructions is stored in the memory. Individual instructions are brought from
the memory into the processor, which executes the specified operations. [Load
– Transfers data to register. Store – Transfers data to memory.] A typical
instruction might be
Load LOC, R2: The operand at LOC is fetched from the memory into the processor.

The operand is stored in register R2.

Add R1, R2, R3: Adds the contents of registers R1 and R2, then stores their sum into
register R3.
Store R4, LOC: This instruction copies the operand in register R4 to memory
location
Add R1, R0: Add contents of R1, R0 and place the sum to R0.
Connection between the processor and memory

The processor contains a number of registers used for different purposes.


a. The PC (Program Counter) contains the memory address of the first or the next
instruction to be executed. During execution, the contents of the PC are updated
to point to the next instruction. Every time that an instruction is to be executed, the
program counter releases its contents to the internal bus and sends it to the
memory address register.
b. The MAR (Memory Address Register) holds the address of the location from
which data are to be transferred. As can be seen from the figure above, the
connection of the MAR to the main memory is one-way or unidirectional.
c. The MDR (Memory Data Register) contains the data to be written or read out of
the addressed location. During the fetch operation, the MDR contains the
instruction to be executed or data needed during execution. In write operation,
MDR contains the data to be written into the main memory.
d. The IR (Instruction Register) contains the instruction that is being executed.
Before the IR executes the instruction it needs to be decoded first. As soon as the
content of the MDR is transferred to the IR, the decoding process commences.
After decoding, execution of the instruction will take place.
Operating Steps
 Programs reside in the memory through input devices.
 PC is set to point to the first instruction.
 The contents of PC are transferred to MAR. A read signal is sent to the
memory ∙
 The first instruction is read out and loaded into MDR.
 The contents of MDR are transferred to IR.
 Decode and execute the instruction. Get operands for ALU (Address to
MAR – Read – MDR to ALU).
 Perform operation in ALU and Store the result back to general purpose register. ∙
Transfer the result to memory (address to MAR, result to MDR – Write).
 During the execution, PC is incremented to the next instruction.

In addition to transferring data between the memory and the processor,


the computer accepts data from input devices and sends data to output
devices.

In order to respond immediately to some instruction, execution of


the current program must be suspended. To cause this, the device raises an
interrupt signal, which is a request for service by the processor. The
processor provides the requested service by executing a program called an
interrupt-service routine.
BUS STRUCTURES

A bus is a collection of electrical pathways or conductors that carry


data, addresses, and control signals between different hardware components. A
bus's width refers to the number of parallel data lines it contains, which
defines how much data can be sent simultaneously.
 Data Lines
Data lines coordinate in transferring the data among the system
components. The data lines are collectively called data bus. A data bus
may have 32 lines, 64 lines, 128 lines, or even more lines. The number of
lines present in the data bus defines the width of the data bus. The number
of data lines in a data bus determines how many bits it can transfer at a
time. The performance of the system also depends on the width of the
data bus.
 Address Lines
The content of the address lines of the bus determines the source or
destination address of the data present on the data bus. The number of
address lines together is referred to as the address bus. The number of
address lines in the address bus determines its width. The width of the
address bus determines the memory capacity of the system.
 Control Lines
The address lines and data lines are shared by all the components of the
system, so there must be some means to control the use and access of data
and address lines. The control signals placed on the control lines control
the use and access to the address and data lines of the bus. The control
signal consists of the command and timing information. Here the
command in the control signal specifies the operation that has to be
performed. And the timing information over the control signals specifies
when the data and address information is valid.

When I/O devices and the memory share the same address space, the arrangement is
called memory-mapped I/O. For example, if the input device is a keyboard and if
DATAIN is its data register and DATAOUT may be the data register of a display device
interface.
Load DATAIN , R2,: reads the data from DATAIN and stores them into processor
register R2
Store R2, DATAOUT: Sends the contents of register R2 to location DATAOUT.
Big-endian and little-endian
The term endianness describes the order in which computer memory stores a sequence
of bytes.
Big endian is an order in which the big end (MSB) is stored first.
Little endian is an order in which the little end ( LSB) is stored first

Big-endian Little-endian

INSTRUCTIONS AND INSTRUCTION SEQUENCING

A computer must have instructions capable of performing four types of operations:

• Data transfers between the memory and the processor registers

• Arithmetic and logic operations on data

• Program sequencing and control

• I/O transfers
INSTRUCTION NOTATIONS

i) Register Transfer Notation

The contents of any location are denoted by placing square brackets around
its name

R1 ← [LOC]

Thus, this expression means that the contents of memory location LOC are
transferred into processor register R1.

R3 ← [R1] + [R2]

Here the operation that adds the contents of registers R1 and R2, and places their
sum into register R3.

ii) Assembly-Language Notation


Used to represent machine instructions and programs.

Move LOC, R1
This instruction causes the transfer of data from memory location
LOC to processor register R1
Add R1, R2, R3
add two numbers contained in processor registers R1 and R2 and
placing their sum in R3

BASIC INSTRUCTION TYPES

i) One Address Instructions


These instructions specify one operand or address, which typically refers to a
memory location or register. The instruction operates on the contents of that
operand, and the result may be stored in the same or a different location. For
example, a one-address instruction might load the contents of a memory
location into a register. This uses an implied ACCUMULATOR register for
data manipulation. One operand is in the accumulator and the other is in
the register or memory location. Implied means that the CPU already
knows that one operand is in the accumulator so there is no need to specify
it.

Example: LOAD C

Load the content in C to the Accumulator register

ADD B

Add the content in B with the accumulator register

ii) Two Address Instructions


These instructions specify two operands or addresses, which may be
memory locations or registers. The instruction operates on the contents of
both operands, and the result may be stored in the same or a different
location. For example, a two-address instruction might add the contents of two
registers together and store the result in one of the registers.

Example: ADD R1,R2

iii) Three Address Instructions


These instructions specify three operands or addresses, which may be memory
locations or registers. The instruction operates on the contents of all three
operands, and the result may be stored in the same or a different location.
Example ADD R1,R2,R3
Here the contents in register R1 and R2 are added together and the result is
stored in to the register R3

You might also like