Sei sulla pagina 1di 14

COA

Chapter 1 for MST 1


1. Basic concepts :
1.1 Digital computer with its block diagram
1.2 Computer hardware components
1.2.1 ALU
1.2.2 Registers
1.2.3 Memory
1.2.4 System bus structure
a. data
b. address
c. control bus

----------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------

TOPIC 1: Basic Concepts with Some Definitions:


A. Computer Architecture: Computer Architecture is concerned with the structure
and behaviour of computer as seen by the user. Computer Architecture is the
field of study of selecting and interconnecting hardware components to create
computers that satisfy functional performance and cost goals. Computer
Architecture includes attributes/concepts such as Instruction Set, Addressing
Modes(techniques for addressing memory), Data Formats, Processor Register,
Number of bits used to represent data types (e.g., number, characters etc.,).

B. Computer organization: Computer Organisation refers to the operational units and


their interconnection that realize the architectural specifications. In other words,
Computer Organisation is concerned with the way the hardware components operate
and the way they are connected together to form the computer system. Hardware
details transparent to programmer such as Control Signals, Interface between
Computer and Peripherals, and the memory technology used etc.

C. Computer Design: Computer design is concerned with the hardware design of


the computer. Once the computer specifications are formulated, it is the task of
the designer to develop hardware for the system. Also, Computer design is
concerned with the determination of what hardware should be used and how the
parts should be connected. This aspect of computer hardware is sometimes
referred to as computer implementation. Eg. Processor, memory hardware etc.

So in summary, having a multiple instructions in an architecture issue but how to


implement the instruction is an organization issue and how fast to process the
multiplications is a design issue.
----------------------------------------------------------------------------------------------------------------

TOPIC 2: Digital computer with its block diagram


A. Digital Computer: A digital computer is considered to be a calculating device that
can perform arithmetic operations at enormous speed. It is defined as a device that
operates upon information/data. To be able to process data the computer is made of
various functional units to perform its specified task.
B. Input Unit: The data and instructions are inputted into the computer using keyboard
which is one of the most commonly used input devices. Other commonly used input
devices are mouse, floppy disk drive, magnetic tape etc. Thus, we can conclude that, all
the input devices accepts the data and instruction from outside world, convert it to a form
that the computer can understand, supply the converted data to the computer system for
further processing.
C. Storage Unit: The storage unit of a computer holds data and instructions that are entered
through the input unit, before they are processed. It stores programs, data
as well as intermediate results and results for output. Its main function
is to store information. The various storage devices can be divided into two main
categories:
(a) Primary Storage (Main Memory): This memory is generally used to hold
the program being currently executed in the computer, the data being received from input
device, the intermediate and final results of a program. The primary memory is temporary
in nature. The data is lost when the computer is switched off. The data is electronically
represented in the main memory chip’s circuitry and while it remains in the main
memory, central processing unit (CPU) can access it directly at a very fast speed. Primary
storage has limited storage capacity because it is very expensive and generally made up of
semiconductor devices.
(b) Secondary Storage (Auxiliary Memory): It is used like an archive. It stores
operating system, data files, compilers, assemblers, application programs etc. The
Program and data if needed by central processing unit (CPU) are first transferred from the
secondary memory to main memory. The results are also stored in secondary memory to
main memory. It is a mass storage memory, slower but cheaper. It is non-volatile in
nature i.e. data is not lost even if the power supply is switched off. Some of the most
commonly used secondary storage devices are Hard Disk, Compact Disk etc. Their access
time is in milliseconds.
D. Central Processing Unit (CPU) : The control unit and arithmetic logic unit of computer
are together known as central processing unit (CPU). The CPU is like brain and performs
following functions: It performs all calculations, it takes all decisions, and it controls all
units of a computer.A personal computer may have CPU-IC such as Intel 8088, 80386,
80486, Celeron, Pentium, Pentium Pro, Pentium II, III, IV, Dual Core, AMD etc. Main
components in CPU as following:
(a) Control Unit: It controls all other units in a computer. The control unit
instructs the input unit where to store the data after receiving it from user. It controls the
flow of data and instructions from the storage unit to Arithmetic logic unit (ALU), it does
not perform any actual processing of data. It manages and coordinates the entire computer
system and synchronizes its working, thus referred to as “Central Nervous System” or
“Brain of the Computer”. Hardwired Control Unit Control unit consist of:
o Instruction Register
o Number of Control Logic Gates
o Two Decoders
o 4-bit Sequence Counter
o Functionality: An instruction read from memory is placed in the
instruction register (IR). Hardwired Control Unit First 12-bits (0-11)
are applied to the control logic gates. The operation code bits (12 – 14)
are decoded with a 3 x 8 decoder. The eight outputs ( D0 through D7)
from a decoder goes to the control logic gates to perform specific
operation. Last bit 15 is transferred to a I flip-flop designated by
symbol I. The 4-bit sequence counter SC can count in binary from 0
through 15. The counter output is decoded into 16 timing pulses T0
through T15. The sequence counter can be incremented by INR input
or clear by CLR input synchronously. The instruction register is
divided into three parts: the I bit, operation code, and address part.
First 12-bits (0-11) to specify an address, next 3-bits specify the
operation code (opcode) field of the instruction and last left most bit
specify the addressing mode I (I=0 for direct nad I=1 indirect).

(b) Arithmetic and Logic Unit: The function of an Arithmetic logic unit (ALU)
is to perform arithmetic and logical operations such as addition, subtraction,
multiplication, division,AND, OR, NOT, Exclusive OR etc. It also performs increment,
decrements, shift and clear operations. It is the place where the actual execution of
instructions takes place during processing operation. To be precise, all calculations and
comparisons are made in the Arithmetic and Logical Unit (ALU).
(c) Registers: It is a special temporary storage location within the CPU.
Registers quickly, accept, store and transfer data and instructions that are being used
immediately (main memory hold data that will be used shortly, secondary storage
holds data that will be used later). To execute an instruction, the control unit of the
CPU retrieves it from main memory and places it onto a register.
(d) Bus: The term Bus refers to an electrical pathway through which bits are
transmitted between the various computer components. Depending on the design of
the system, several types of buses may be present. The most important one is the data
bus, which carries the data through out the central processing unit. Types of buses:
• Address Bus- The address bus is used to specify memory locations for the data
being transferred.
• Data Bus- The data bus, which is a bidirectional path, carries the actual data
between the processor, the memory and the peripherals.
• Control Bus- The control bus carries the control, timing and coordination
signals to manage the various functions across the system.

(e) Output Unit: An output unit performs the reverse operation of that of an input unit. As
computers, work with binary code the results produced are also in binary form. So before
applying results to the outside world it must be converted to human acceptable (readable)
form. So, it supplies information obtained from processing to outside world. Units called
output interfaces accomplish this task.

E. Characteristics of Digital Computers: A Digital Computer of present generation has


the following characteristics:
(i) It is capable of executing the instruction stored in its memory.
(ii) It is versatile, in the sense that it can perform commercial jobs such as
preparation of pay bill, inventory report etc., and also solve technical
problems such as stress-analysis, network analysis etc.
(iii) It gives the results with high precision and the error-rate, as compared
to humans, is extremely low
(iv) It is very fast. Even complicated and large calculations are performed
in a digital computer not only accurately, but also at a very high speed.

------------------------------------------------------------------------------------------------------------------

TOPIC 3: Computer hardware components: ALU


A. ALU: The function of an Arithmetic logic unit (ALU) is to perform arithmetic and
logical operations such as addition, subtraction, multiplication, division,AND, OR, NOT,
Exclusive OR etc. It also performs increment, decrements, shift and clear operations. It is
the place where the actual execution of instructions takes place during processing
operation. To be precise, all calculations and comparisons are made in the Arithmetic and
Logical Unit (ALU).
 Instead of having individual registers performing the microoperations directly,
computer systems employ a number of storage registers connected to a common
operational unit called an arithmetic logic unit, abbreviated ALU.
 To perform a microoperation, the contents of specified registers are placed in the
inputs of the common ALU. The ALU performs an operation and the result of the
operation is then transferred to a destination register. The ALU is a
combinational circuit, so that the entire register transfer operation from the source
registers through the ALU and into the destination register can be performed
during one clock pulse period. The shift microoperations are often overall in a
separate unit, but sometimes the shift unit is made part of the overall ALU.
 The arithmetic, logic, and shift circuits can be combined into one ALU with
common selection variables. One stage of an arithmetic logic shift unit is shown in
Fig.
 The subscript i designates a typical stage. Inputs A1 and B1 are applied to both the
arithmetic and logic units.
 A particular microoperation is selected with inputs S1 and S0. A 4 x 1 multiplexer at
the output chooses between an arithmetic output in Ei and a logic output in Hi. The
data in the multiplexer are selected with inputs S3 and S2. The other two data inputs
to the multiplexer receive inputs Ai - 1 for the shift-right operation and Ai + 1 for the
shift-left operation. Note that the diagram shows just one typical stage. The circuit of
Fig. 4-13 must be repeated n times for an n-bit ALU. The output carry Ci + 1 of a
given arithmetic stage must be connected to the input carry Ci of the next stage in
sequence. The input carry to the first stage is the input carry Cin, which provides a
selection variable for the arithmetic operations.
 The circuit whose one stage is specified in Fig. 4-13 provides eight arithmetic
operation, four logic operations, and two shift operations. Each operation is selected
with the five variables S3, S2, S1, S0, and Cin The input carry Cin is used for selecting
an arithmetic operation only.
 Table lists the 14 operations of the ALU. The first eight are arithmetic operations and
are selected with S3S2 = 00. The next four are logic operations and are selected with
S3S2 = 01. The input carry has no effect during the logic operations and is marked
with don't-care x's. The last two operations are shift operations and are selected with
S3S2 = 10 and 11. The other three selection inputs have no effect on the shift.
--------------------------------------------------------------------------------------------------------------
TOPIC 4: Computer hardware components: System Bus

 System Buses: A bus is a common pathway through which information flows from
one computer component to another. This pathway is used for communication
purpose and it is established between two or more computer components. A typical
example is the communication bus between a processing unit and memory unit. A
bus structure implies multiple communication lines or pathways and in a physical
representation, it will be constructed from multiple wires or signal lines. Each line
carries a single bit of information; the more lines the bus is made of, the more
information it can address. This is called the width or size of a bus and it determines
how much data can be transmitted at one time. An 8 bit bus will be able to transmit 8
bits of data.
 Depending on the bus type, the information can be transmitted either serial, which
means a sequence of bits will be transmitted using a single line, or parallel, which
means several lines will be used to transmit bits simultaneously.
 Types of Buses:
o Address Bus- The address bus is used to specify memory locations for the data
being transferred.
o Data Bus- The data bus, which is a bidirectional path, carries the actual data
between the processor, the memory and the peripherals.
o Control Bus- The control bus carries the control, timing and coordination
signals to manage the various functions across the system.

• Address Bus: Address bus carries address information. It is a set of wires which
connects to CPU and memory. Whenever the processor needs data from the memory,
it places the address of the data on the address bus. The address is carried to the
memory where the data from the requested address is fetched and placed on the data
bus. The data bus then carries the data to the CPU. It is unidirectional between the
main memory and processor and bidirectional between the processor and I/O system.
Address bus is also known as memory bus. It transfers the memory addresses for read
and write operations. CPU reads/writes data from the memory by addressing a unique
location; outputs the location of the data (i.e. address) on the address bus; memory
uses this address to access the proper data. Each I/O device (such as monitor, keypad,
etc) has a unique address as well (or a range of addresses); when accessing a I/O
device, CPU places its address on the address bus. Each device will detect if it is its
own address and act accordingly.
• Data Bus: This is the most common bus which carries the data. It is a an electrical
path that connects the CPU, Memory, Input/output devices. This bus contains group
of parallel lines and these number of lines affect the speed at which the data travels
between the different components of the system. When the CPU fetches data from
memory, it first outputs the address on the address bus, then the memory outputs the
data onto the data bus; the CPU reads the data from data bus. When writing data onto
the memory, the CPU outputs first the address on the address bus, then outputs the
data onto the output bus; memory then reads and stores the data at the proper location.
The data bus is bi-directional which allows the transfer of data in both directions.
• Control Bus: The control bus carries control information(i.e. commands,
instructions) from the control unit to the other units such as I/O devices, secondary
storage etc. It is used to direct the activities of all units. Address and data buses
consist of n lines, which combine to transmit one n bit value; control bus is a
collection of individual control signals. These signals indicate whether the data is to
be read into or written out the CPU, whether the CPU is accessing memory or an IO
device, and whether the I/O device or memory is ready for the data transfer.

---------------------------------------------------------------------------------------------------
TOPIC 5: Computer hardware components: REGISTERS
A. Registers : A register is a very small amount of very fast memory that is built into the
CPU (central processing unit) in order to speed up its operations by providing quick
access to commonly used values. Registers refers to semiconductor devices whose
contents can be accessed (i.e., read and written to) at extremely high speeds but which
are held there only temporarily (i.e., while in use or only as long as the power supply
remains on).
 Registers are the top of the memory hierarchy and are the fastest way for the system
to manipulate data. Registers are normally measured by the number of bits they can
hold, for example, an 8-bit register means it can store 8 bits of data or a 32-bit register
means it can store 32 bit of data. Registers are used to store data temporarily during
the execution of a program. Some of the registers are accessible to the user through
instructions. Data and instructions must be put into the system. So we need registers
for this.
 Data Register (DR): A register used in computers to temporarily store data
being transmitted to or from a peripheral. Data registers can be assigned to a
variety of functions by the programmer. In some cases, they are general purpose in
nature and can be used with any machine instruction that performs operations on data.
Often, however, there are restrictions. For example, there may be dedicated registers
for floating-point operations.
 Address Register (AR): AR contains main memory addresses of data and
instructions, or they contain a portion of the address that is used in the calculation of
the complete address. The number of bits in the register determines the amount of
memory that can be addressed. For example, a 32 bit AR can address 4GB. Address
registers may be somewhat general purpose, or they may be devoted to a particular
addressing mode. Examples include the following:
 Accumulator (AC): The accumulator is the special register of the computer. A
register is a special memory location that allows very fast access. Here, the
accumulator is a temporary memory location that stores values of all arithmetic and
logical calculations that are being carried out by the CPU. The increments of values
occur in the accumulator for programming calculations.
 Instruction Register (IR): it is the part of a CPU's control unit that holds the
instruction currently being executed or decoded. In simple processors each instruction
to be executed is loaded into the instruction register which holds it while it is decoded,
prepared and ultimately executed, which can take several steps.
 Program Counter (PC): A program counter is a register in a computer processor that
contains the address (location) of the instruction being executed at the current time.
As each instruction gets fetched, the program counter increases its stored value by 1.
Program counter (PC) , also called instruction pointer . A branch provides that the
next instruction is fetched from somewhere else in memory. A subroutine call not
only branches but saves the preceding contents of the PC somewhere. A return
retrieves the saved contents of the PC and places it back in the PC, resuming
sequential execution with the instruction following the subroutine call. A program
counter is also known as an instruction counter, instruction pointer, instruction
address register or sequence control register. It is a digital counter needed for faster
execution of tasks as well as for tracking the current execution point.
 Temporary Register (TR): It is 16 bit non programmable resister used to hold data
during an arithmetic and logic operation (temporary resister is used to hold
intermediate result). The result is stored in the accumulator, and the flags( flip-flops)
are set or reset according to the result of the operation.
 Input Register (INPR): It is an 8-bit register that holds the input character received
from an input device and delivered it to the Accumulator.
 Output Register (OUTR): It is an 8-bit register that holds the output character
received from Accumulator and deliver it to the output device.
 Memory Buffer Register (MBR): This register holds the contents of data or
instruction read from, or written in memory. The contents of instruction placed in this
register are transferred to the Instruction Register, while the contents of data are
transferred to the accumulator or I/O register. In other words you can say that this
register is used to store data/instruction coming from the memory or going to the
memory. A Memory Buffer Register (MBR) is the register in a computers processor,
or in CPU, that stores the data being transferred to and from the immediate access
store. It acts as a buffer allowing the processor and memory units to act independently
without being affected by minor differences in operation. The basic use of memory
buffer register is to store the data that would be used in next clock cycle. The basic
idea is that the memory units and processors have different speed so to remove this
difference a buffer is used which can produce a continuous supply.
 Memory Address Register (MAR): This register holds the address of memory
where CPU wants to read or write data. When CPU wants to store some data in the
memory or reads the data from the memory, it places the address of the required
memory location in the MAR.
 Memory Data Register (MDR): The Memory Data Register (MDR) contains the
data value being fetched or stored. The MDR is a two-way register. When data is
fetched from memory and placed into the MDR, it is written to go in one direction.
When there is a write instruction, the data to be written is placed into the MDR from
another CPU register, which then puts the data into memory.
----------------------------------------------------------------------------------------------------------------

TOPIC 6: Computer hardware components: MEMORY

• Memory: It is used to store data and instructions. Computer memory is the


storage space in the computer, where data is to be processed and instructions
required for processing are stored. The memory is divided into large number
of small parts called cells. Each location or cell has a unique address, which
varies from zero to memory size minus one.
• For example, 64K bytes of memory is the same as 65,536 (1,024 × 64 =
65,536) bytes.
• Types of memory :

• Cache Memory: Cache memory is a very high speed semiconductor memory
which can speed up the CPU. It acts as a buffer between the CPU and the main
memory.
o Characteristics:
1. It is used to hold those parts of data and program which are
most frequently used by the CPU.
2. The parts of data and programs are transferred from the disk to
cache memory by the operating system, from where the CPU
can access them.
o Advantages:
a. Cache memory is faster than main memory.
b. It consumes less access time as compared to main memory.
c. It stores the program that can be executed within a
short period of time.
d. It stores data for temporary use.
o Disadvantages
1. Cache memory has limited capacity.
2. It is very expensive.

• Primary memory: Primary memory holds only those data and instructions on which
the computer is currently working. Like cache memory, main memory is also
semiconductor memory. But the main memory is relatively slower memory. We have
to first bring the information (whether it is data or program), to main memory. CPU
can work with the information available in main memory only.
o Characteristics:
1. It has a limited capacity and data is lost when power is switched off.These
memories are not as fast as registers.
2. The data and instruction required to be processed resides in the main
memory.
3. These are volatile memory means data is lost in case power is switched
off.
4. These are faster than secondary memories.
o Types :
1. Internal memories are semiconductor memory. Semiconductor
memories are categorized as volatile memory and non-volatile
memory.
2. RAM: Random Access Memories are volatile in nature. As soon as
the computer is switched off, the contents of memory are also lost.
Types:
a. DRAM (Dynamic Random Access Memory) – The term dynamic
indicates that the memory must be constantly refreshed or it will
lose its contents. DRAM is typically used for the main memory in
computing devices.
b. SRAM (Static Random Access Memory) – While DRAM is
typically used for main memory, today SRAM is more often used
for system cache. SRAM is said to be static because it doesn't need
to be refreshed, unlike dynamic RAM, which needs to be refreshed
thousands of times per second. As a result, SRAM is faster than
DRAM. However, both types of RAM are volatile, meaning that
they lose their contents when the power is turned off.
3. ROM: Read only memories are non volatile in nature. The storage
is permanent, but it is read only memory. We can not store new
information in ROM. The permanent information are kept in ROM
and the user space is basically in RAM. Several types of ROM are
available:
a. PROM: Programmable Read Only Memory; it can be programmed
once as per user requirements.
b. EPROM: Erasable Programmable Read Only Memory; the
contents of the memory can be erased and store new data into the
memory. In this case, we have to erase whole information.
c. EEPROM: Electrically Erasable Programmable Read Only
Memory; in this type of memory the contents of a particular
location can be changed without effecting the contents of other
location.

• Secondary memory: This type of memory is also known as external memory or non-
volatile. It is slower than the main memory. These are used for storing
data/information permanently. CPU directly does not access these memories, instead
they are accessed via input-output routines. The contents of secondary memories are
first transferred to the main memory, and then the CPU can access it. For example,
disk, CD-ROM, DVD, etc. These are used for storing data/information permanently.
o Characteristics:
1. These are magnetic and optical memories.
2. It is known as the backup memory.
3. It is a non-volatile memory.
4. Data is permanently stored even if power is switched off.
5. It is used for storage of data in a computer.
6. Slower than primary memories.

----------------------------------------------------------------------------------------------------------------

TOPIC 7: Von Neumann Architecture vs Harvard architecture :

o
------------------------------------------------------------------------------------------------

Potrebbero piacerti anche