We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 31
UNIT II COMPUTER FUNDAMENTALS
Functional Units of a Digital Computer: Von Neumann Architecture - Operation
and Operands of Computer Hardware Instruction - Instruction Set
Architecture (ISA): Memory Location, Address and Operation ~ Instruction and
Instruction Sequencing - Addressing Modes, Encoding of Machine Instruction ~
Interaction between Assembly and High Level Language.
Explain the components of a computer system withthe block diagram in
detail (Apr/May 21)
Components of a computer system
A computer consists of five functionally independent main parts. They are
1. Input
2. Memory
3. Arithmetic and logic unit
4. Output
5. Control unit
Basic functional units of a computer
Central Processing Unile>U)
Sar
aa Conte Unit aaa
MEMORY
MAIN MEMORY
‘SECONDARY MEMORY
Fig 3.1 The basic components of computer systemThe computer accepts programs and the data through an input and stores
them in the memory. The stored data are processed by the arithmetic and logic unit
under program control. The processed data is delivered through the output unit. All
above activities are directed by control unit.
a, Inputunit
The computer accepts coded information through input unit. The input can be
from human operators; electromechanical devices such as keyboards or from other
computer over communication lines.
Examples of input devices are Keyboard, joysticks; trackballs and mouse are used
as graphic input devices in conjunction with display.
+ Itisacommon input device.
‘+ Whenever a key is pressed; the corresponding letter or digit is automatically
translated into its corresponding binary code and transmitted over cable to
the memory of the computer.
b. Memory unit
Memory unit is used to store programs as well as data. Memory is classified
into primary and secondary storage.
Primary Storage
It also called main memory. It operates at high speed and it is expensive. It is
made up of large number of semiconductor storage cells, each capable of storing one
bit of information. These cells are grouped together in a fixed size called word. This
facilitates reading and writing the content of one word (n bits) in single basic
operation instead of reading and writing one bit for each operation.
Secondary Storage
Itis slow in speed. It is cheaper than primary memory. Its capacity is high. It is
used to store information that is not accessed frequently. Various secondary devices
are magnetic tapes and disks, optical disks (CD-ROMs), floppy etc.e. Arithmetic and Logic Unit
Arithmetic and logic unit (ALU)
Actual execution of most computer operations take
of the processor. Example: Suppose two numbers
added. They are brought into the processor, and the
the ALU.
and control unit together form a processor.
¥ place in arithmetic and logic unit
located in the memory are to be
actual addition is carried out by
elements available in the processor. Each
Registers are high speed storag
cessor
register can store one word of data. When operands are brought into the pro¥
for any operation, they are stored in the registers. Accessing data from register is
faster than that of the memory.
Output unit
“The function of output unitis to produce processed result to theoutside world
in human understandable form. Examples of output devices are Graphical display,
Printers such as inkjet, laser, dot matrix and so on. The laser printer works faster.
e. Control unit
Control unit coordinates the operation of memory, arithmetic and logic unit,
input unit, and output unit in some proper way. The control unit issues control
signals that cause the CPU (and other components of the computer) to fetch the
instruction to the IR (Instruction Register) and then execute the actions dictated by
the machine language instruction that has been stored there. Control units are well
defined, physically separate unit that interact with other parts of the machine. A set
of control lines carriesthe signals used for timing and synchronization of events in all
units Example: Data transfers between the processor and the memory are controlled
by the control unit through timing signals. Timing signals are the signals that
determine when a given action is to take place.Componente of Von. Neumann Anchittbcb se
Basic Operational Concept
F cw Mata memory
System :
Cua) fee ei
Te noe] Sei
a
a b
Program counter
Imran repiter
Memory addres reghter
Slemory botierrepiice
Tnpotbet put ndaren register
5 Inputlstbat batter react
Fig 3.2 Computer Components
Computer Components:
Top-Level view
PC the program counter contains the address of the assembly language
instruction to be executed next. IR the instruction register contains the binary word
corresponding to the machine language version of the instruction currently being
executed,
MAR the memory address register contains the address of the wordin main
memory that is being accessed, The word being addressed contains either data or a
machine language instruction to be executed.
MBR the memory buffer register (also called MDR for memory data register)
is the register used to communicate data to and from the memory.
The operation of a processor is characterized by a fetch-decode- execute cycle.
In the first phase of the cycle, the processor fetches an instruction from memory. The
address of the instruction to fetch is stored in an internal register named the program
counter, or PC. As the processor is waiting for the memory to respond with the
instruction, it increments the PC. This means the fetch phase of the next cycle will
fetch the instruction in the next sequential location in memory. In the decode phase
the processor stores the information returned by the memory in another internal
register, known as the instruction register, or IR. The IR now holds anary number. The processor decodes the
single machine instruction encoded as a bi c
tions to performin the next stage.
value in the IR in order to figure out which opera stage.
In the execution stage the processor actually carries out the instruction. This
step often requires further memory operations; for example, the instruction may
direct the processor to fetch two operands from memory, add them, and store the
result in a third location (the addresses of the operands and the result are also
encoded as part of the instruction). At the end of this phase the machine starts the
cycle over again by entering the fetch phase for the next instruction. The CPU
exchanges data with memory. For this purpose, it typically makes use of two internal
(to the CPU) register:
+ Amemory address register (MAR), which specifies the address inmemory for
thenext read or write, and
* A memory buffer register (MBR), which contains the data to bewritten into
memoryor receives the data read from memory.
‘An 1/0 addresses register (I/OAR) specifies a particular 1/0 device.
‘An 1/0 buffer (1/OBR) register is used for the exchange of data between an 1/0
module and the CPU.A memory module consists of a set of locations, defined by
sequentially numbered address. Each location contains a binary number that can be
interpreted as either an instruction or data. An 1/0 module transfers data from
external devices to CPU and memory, and vice versa.
It contains internal buffers for temporarily holding these data until they can be
sent on. Instructions can be classified as one of three major types: arithmetic/logic,
data transfer, and control. Arithmetic and logic instructions apply primitive functions
of one or two arguments, for example addition, multiplication, or logical AND.
Von Neumann Architecture
Von Neumann architecture was first published by John von Neumann in 1945. His
computer architecture design consists of a Control Unit, Arithmetic and Logic Unit
(ALU), Memory Unit, Registers and Inputs/Outputs.Von Neumann architecture is based on the stored-program computer concept, where
instruction data and program data are stored in the same memory. This design is still
used in most computers produced today.
Central Processing Unit
Control Unit
Avithmetic / Logic Unit output
Device
Fig 3.3 Von Neumann architecture
Central Processing Unit (CPU)
‘The Central Processing Unit.(CPU) is the electronic circuit responsible for executing the
instructions of a computer program. It is sometimes referred to as the
microprocessoror processor. The CPU contains the ALU, CU and a variety of registers.
Registers
Registers are high speed storage areas in the CPU. All data must be stored in a register
before it can be processed.