0% found this document useful (0 votes)
12 views52 pages

UNIT - 1 Digital

Digital computers utilize a binary system to process and store information, comprising essential components such as input devices, CPU, memory, storage, and more. The document outlines the architecture and organization of computers, distinguishing between hardware and software, and detailing the roles of various components like registers and buses. Additionally, it covers microoperations, register transfer language, and arithmetic operations, providing a comprehensive overview of digital computer systems.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views52 pages

UNIT - 1 Digital

Digital computers utilize a binary system to process and store information, comprising essential components such as input devices, CPU, memory, storage, and more. The document outlines the architecture and organization of computers, distinguishing between hardware and software, and detailing the roles of various components like registers and buses. Additionally, it covers microoperations, register transfer language, and arithmetic operations, providing a comprehensive overview of digital computer systems.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 52

Digital computers

Digital computers:
Digital computers are the cornerstone of modern technology and have revolutionized
the way we process, store, and manipulate information. These electronic devices use a
binary system, which consists of two symbols (0 and 1), to represent and work with
data.

Block diagram of Digital Computer:

A block diagram of a digital computer typically represents the major components and
their interactions. Please note that the specific configuration and components may
vary depending on the type and purpose of the computer, but I can provide a general
overview of the common components you would find in a typical digital computer:

1. Input Devices: These are the devices that allow users to input data into the
computer. Examples include keyboards, mice, touchscreens, and microphones.

2. Central Processing Unit (CPU): The CPU is the brain of the computer. It performs
arithmetic and logical operations, executes instructions, and controls the operation of
other components. Modern computers often have multiple cores or processors.
3. Memory (RAM): Random Access Memory (RAM) is used to temporarily store data
that the CPU is actively using. It provides fast access to data and instructions required
by the CPU.

4. Storage Devices: These devices store data and programs for the long term.
Examples include hard disk drives (HDDs), solid-state drives (SSDs), and optical
drives (CD/DVD/Blu-ray).

5. Motherboard: The motherboard is the main circuit board of the computer. It


contains the CPU, RAM, and other essential components. It also provides the
interconnections between these components.

6. Input/Output (I/O) Controllers: These controllers manage communication


between the CPU and various input and output devices. They ensure data transfer and
synchronization.

7. Graphics Processing Unit (GPU): The GPU is responsible for rendering graphics
and performing parallel processing tasks. It is particularly important for gaming and
graphical applications.

8. Power Supply Unit (PSU): The PSU provides electrical power to the computer's
components.

9. Cooling System: To prevent overheating, computers are equipped with cooling


systems, including fans and heatsinks.

10. Expansion Slots: These slots allow for the addition of various expansion cards,
such as graphics cards, sound cards, and network cards.

11. Network Interface Card (NIC): This component allows the computer to connect to
networks, including local area networks (LANs) and the internet.
12. Optical Drives: Optical drives can read and write data to optical discs like CDs,
DVDs, and Blu-rays (though these are becoming less common with the rise of digital
distribution).

13. Ports and Connectors: These are used for connecting external devices, such as
USB ports, audio jacks, HDMI ports, and Ethernet ports.

14. Operating System (OS): The operating system is software that manages the
computer's hardware resources and provides a user interface for interaction with the
computer.

15. Application Software: These are the programs and applications that users run on
the computer to perform specific tasks, such as word processing, web browsing, or
gaming.

16. BIOS/UEFI: The Basic Input/Output System (BIOS) or Unified Extensible


Firmware Interface (UEFI) is firmware that initializes and tests the hardware
components during startup and provides a low-level interface between the hardware
and the operating system.

17. System Bus: The system bus is a set of electrical pathways used for data transfer
between the CPU, RAM, and other components.

18. Data Bus and Address Bus: These buses facilitate the transfer of data and
addresses between the CPU and memory.

19. Control Unit: This component of the CPU manages and coordinates the execution
of instructions.

20. ALU (Arithmetic Logic Unit: The ALU performs mathematical and logical
operations required by the CPU's instructions.
Introduction
• A Digital computer can be considered as a digital system that performs various
computational tasks.

• The first electronic digital computer was developed in the late 1940s and was
used primarily for numerical computations.

• By convention, the digital computers use the binary number system, which has
two digits: 0 and 1. A binary digit is called a bit.

• A computer system is subdivided into two functional entities: Hardware and


Software.

• The hardware consists of all the electronic components and electromechanical


devices that comprise the physical entity of the device.

• The software of the computer consists of the instructions and data that the
computer manipulates to perform various data-processing tasks.

Definitiom of Computer Organization

It is concerned with the structure and behavior of digital computer.

The main objective of this subject to understand the overall basic computer hardware
structure, including the peripheral devices. Computer Organization refers to the
operational units and their interconnections that realize the architectural
specifications. Examples are things that are transparent to the programmer: Like
control signals

Definition of computer architecture:

It is those attributes visible to the programmer. They are like. Instruction set, number
of bits used for data representation, I/O mechanisms, addressing techniques.

• Computer Architecture is concerned with the structure and behavior of the


computer as seen by the user.

• It includes the information, formats, the instruction set, and techniques for
addressing memory.
• The architectural design of a computer system is concerned with the
specifications of the various functional modules, such as processors and
memories, and structuring them together into a computer system.

• Two basic types of computer architecture are:

1.Von Neumann architecture

2.Harvard architecture

Harvard Architecture Von Neumann architecture


1. It has separate buses for 1. It has single common bus for
instruction as well as data fetching. instruction and data fetching.
2. Easier to pipeline so high 2. Low performance as compared to
performance can be achieved. Harvard architecture.
3. Comparatively high cost. 3. It is cheaper.
4. Since data memory and program 4. Accidental corruption of program
memory are stored physically in memory may occur if data memory
different location, no chances exist and program memory are stored
for accidental corruption of physically in the same chip.
program memory.

Von Neumann architecture


Harvard architecture

Computer Organization

• Computer Organization is defined by its internal registers the timing and


control structure and set of instructions that it uses. It deals with the
components of a connection in a system

• Computer Organization tells us how exactly all the units in the system
are arranged and interconnected. Whereas Organization expresses the
realization of architecture.

• An organization is done on the basis of architecture. Computer


Organization deals with low-level design issues.

• Organization involves Physical Components (Circuit design, Adders,


Signals, Peripherals)

• Computer Architecture is concerned with the way hardware components


are connected together to form a computer system. It acts as the
interface between hardware and software.

• Computer Architecture helps us to understand the functionalities of a


system. A programmer can view architecture in terms of instructions,
addressing modes and registers.
• While designing a computer system architecture is considered first.
Computer Architecture deals with high-level design issues. Architecture
involves Logic (Instruction sets, Addressing modes, Data types, Cache
optimization)

Register Transfer Language

Microoperation
Registers are temporary storage devices. Operations are performed on the
information stored in these register.

A microoperation is defined as an operation which is performed on the


information stored in the registers. It is an elementary operation.
Microoperations such as shift, count, clear and load replace or transfer binary
information of a register.

A digital system can be described by mentioning its internal hardware


organization such as,

(a) The registers available in a digital system and function of each register.

(b) A series of microoperations executed on the information available in the


registers.

(c) A control that initiates a series of microoperations.

Microoperations can be explained in terms of words but it is a lengthy


procedure, therefore symbols are used to explain information transfer between
registers and other digital components.

A microoperation transfer among registers which is described in a symbolic


format instead of lengthy descriptive format is called a "Register Transfer
Language".

The microoperations applied to the hardware logic circuits such as gates that
perform information transfer among registers. This is known as "Register
Transfer".

The term language implies programming language that specifies a particular


computational process using symbols. A register transfer language is an
appropriate tool for explaining digital computer's internal organization.
It is a system that indicates a sequence of micro operations in a symbolic form
to carry out transferring of information among registers in a digital system.

Register Transfer Language


• The symbolic notation used to describe the micro-operation transfer
among registers is called RTL (Register Transfer Language).

• The use of symbols instead of a narrative explanation provides an


organized and concise manner for listing the micro-operation sequences
in registers and the control functions that initiate them.

• A register transfer language is a system for expressing in symbolic form


the micro operation sequences among the registers of a digital module.

• It is a convenient tool for describing the internal organization of digital


computers in concise and precise manner.

• Information transfer from one register to another is designated in


symbolic form by means of a replacement operator.

• The statement R2← R1 denotes a transfer of the content of register R1


into register R2.

• It designates a replacement of the content of R2 by the content of R1.

• By definition, the content of the source register R 1 does not change


after the transfer.

• If we want the transfer to occur only under a predetermined control


condition then it can be shown by an if-then statement.

• if (P=1) then R2← R1

• P is the control signal generated by a control section.

• We can separate the control variables from the register


transfer operation by specifying a Control Function.

• Control function is a Boolean variable that is equal to 0 or 1.

• control function is included in the statement as


• P: R2← R1
• Control condition is terminated by a colon implies transfer operation be
executed by the hardware only if P=1.

Few RTL statements for branching


RTL Statements for Branching

Few RTL statements for branching are represented below,

1. BRO X

This statement causes branch or jump to the position 'X' if an


overflow occurs.

2. BRN X

This statement causes branch to the position 'X' if the result is


negative.

3. BRZ X

This statement causes branch to the position 'X' if result=0

4. BRP X

This statement causes branch to the location 'X' if the result is


positive.

5. BRER, R., X

This statement causes branch to the location "X", if the content of


register RI is equal to the content of register R2.

Basic Definitions

DEFINITION OF REGISTER: Group of FLIP-FLOPs is called


register.

DEFINITION FLIP-FLOP : It is the smallest storage element of


binary information. It can store zero(0) or one (1)

DEFINITION MICRO OPERATIONS: The operations executed on data


stored in registers are called micro operations
A micro operation is an elementary operation performe
performed
d on the information
stored in one or more registers. The result of the micro operation may replace
the previous binary information of a register or may be transferred to another
register.

Registers:
Computer registers are designated by upper case letters (and optionally
followed by digits or letters) to denote the function of the register.

For example, the register that holds an address for the memory unit is usually
called a memory address register and is designated by the name MAR.

Other designations for registers are PC (for program counter), IR (for


instruction register, and R1 (for processor register).

The individual flip-flops


flops in an n
n-bit
bit register are numbered in sequence from 0
through n-1, starting from 0 in the rightmost position and increasing the
numbers toward the left.

The most common way to represent a register is by a rectangular box with the
name of the register inside, as in shown in Fig. (a)

The individual bits can be distinguish


distinguished
ed as show in fig (b).
The numbering of bits in a 16
16-bit
bit register can be marked on top of the box as
shown in (c).

16-bit
bit register is partitioned into two parts in (d). Bits 0 through 7 are assigned
the symbol L (for low byte) and bits 8 through 15 are a assigned
ssigned the symbol H
(for high byte).

The name of the 16-bit


bit register is PC. The symbol PC (0
(0-7)
7) or PC (L) refers to
the low-order
order byte and PC (8
(8-15) or PC (H) to the high-order byte.
List of registers for the basic computer

Transfer of information using common bus


A more efficient scheme for transferring information between registers in a
multiple-register
register configuration is a common bus system.

BUS:AA bus structure consists of a set of common lines, one for each bit of a
register,
ter, through which binary information is transferred one at a time.

Control signals determine which register is selected by the bus during each
particular register transfer.

A memory word will be symbolized by the letter M.

The particular memory word amamong


ong the many available is selected by the
memory address during the transfer.
Bus system for four registers

In general, a bus system will multiplex k registers of n bits each to produce an


n-line common bus.

The number of multiplexers needed to construct the bus is equal to ‘n’. Where
n is the number of bits of each register.

The size of each multiplexer must be k x 1, where ‘k’ is number of registers

Here in this case k=4,n=4, multiplexers are 4 each of siz


size 4X1.
Function T
Table for Bus of figure shown

Three-State
State Bus Buffers

Three states of buffer are

State1 logic 1

State2 logic 0

State3 high impedance state


Memory Transfer
Consider a memory unit that receives the address from a register, called the
address register, symbolized by AR . The data are transferred to another
register, called the data register, symbolized by DR . The read operation can be
stated as follows:

Read: DR M[AR]

Here AR is the register that contain the address of the memory location from
which the data to be transferred

DR is the data register in to which the data to be written.

M is the memory .

This causes a transfer of information into DR from the memory word M


selected by the address in AR .

Write: M[AR] DR

The transfer of information from a memory word to the outside environment is


called a read operation.

The transfer of new information to be stored into the memory is called a write
operation.

A memory unit that receives the address from a register, called the address
register, symbolized by AR .

The data are transferred to another register, called the data register,
symbolized by DR.

The increment and decrement micro operations are symbolized by plus one
and minus-one operations, respectively. These micro operations are
implemented with a combinational circuit or with a binary up-down counter.

In most computers, the multiplication operation is implemented with a


sequence of add and shift micro operations. Division is implemented with a
sequence of subtract and shift micro operations.
Arithmetic Micro Operations:
Arithmetic Micro operations Table

Half-Adder
Consider the following operations,

0+0=00

0+1=01

1+0=01

1+1=10
These operations are executed usin
usingg a logic circuit called half adder. The half
adder takes two binary digits as inputs and generates two binary digits as
outputs (ie sum and carry). The following table shows the truth table for the
half adder,
From the operation of the half-adder as stated in the above table, expressions
can be derived for the sum and the output carry as functions of the inputs. It
can be observed that, the output carry (Cout) is 1 only when both A and B are 1.
Therefore, can be expressed as the AND of the input variables.

Cout=AB
Now, observe that the sum output is I only if the input variables A and B are
different. The sum can therefore be expressed as the exclusive-OR of the input
variables,

Half Adder

Full-Adder
The full adder is the second category of the address. It operates by taking two inputs
A, B and input carry and produces an output of sum and output carry. A logic symbol
for a full-adder is shown in the figure.
Logical symbol for Full adder

Full adder

Parallel Adder
A single full adder is an adder which is effective of adding two one-bit
number and an input carry. The addition of binary number with multiple bits
can only be performed with the use of full adders. This is called a parallel
adder. When one binary number is added to another, each column generates a
sum bit and a carry bit (0 or 1) to the next column to the left, as illustrated
here with 2-bit numbers.

To add we binary numbers, a full-adder is required for each bit in the


numbers. So for 4-bit numbers, four adders are used. The carry output
generated from each adder is connected as input in the form of carry input to
the next higher-order adder.

4-bit Binary adder

4-Bit Binary Subtractor


Subtraction is a special case of addition. To subtract two signed numbers, take
the 2's complement of the subtrahend and add with the minuend. Discard any
final carry bit

To get the 2's complement of a number, first find out its I's complement and
then add I to the Least Significant Bit (LSB). The following example illustrates
the subtraction of two numbers,
Logic Micro Operations

Logic Microoperations
The binary operations for bit strings present in a register are specified by the
logic microoperations. Binary contents of a register are considered as distinct
binary variables.

This microoperation is applied on the strings of bits stored in the registers A


and B if the control variable x = 1.

Consider a numeric example, assume that A = 0101 and B= 0011


Special Symbols
To differentiate boolean functions from logic microoperations having similar
functionalities, the logic microoperations use special symbols as shown in the
following table.

In the above example + symbol between R3 and R4 denotes an 'arithmetic


addition' operation.

Whereas in boolean function X+Y, it denotes an 'OR' operation.

'v' symbol betw R5 and R6 denotes an 'OR' operation.

R3+ R4 denotes an ADD operation between binary contents of two registers R3


and R4.
R5 v R6 denotes an OR operation between binary contents of two registers R5
and R6.

Types of Logic Microoperations

There are 16 logic microoperations. They are as follows,


Logic Micro Operations
Applications of logic microoperations are,

 In a register, individual bits or a portion of a word can be


manipulated.
 Bit values can be changed in a register.
 Group of bits can be deleted from register.
 New bit values can be inserted in a register.

Manipulation of bits present in register RX and RY can be carried


out using the following operations,

(i) Selective-set
set operation
(ii) Selective-complement
complement operation
(iii) Selective-clear
clear operation
(iv) Mask operation
(v) Insert operation
(vi) Clear operation.
(i) Selective-set Operation
It considers only 1's in register Y and sets the corresponding bits in
the register X to I wherever 1's are encountered in register Y.
Ignore performing operations on bits of register X whose
corresponding bits in register Y are O's.

(ii) Selective-complement Operation

It considers only I's in register Y and complements corresponding


bits in the register X wherever I's are encountered in register Y.

(iii) Selective-clear Operation

It considers only 1's in register Y and clears the corresponding bits in the register X to
0.
(iv) Mask Operation

It considers only O's in register Y and clears the corresponding bits in register X to 0.

(v) Insert Operation

In a group of bits a new value can be inserted by performing mask


operation and then OR operation is performed on the result with
the required value.

Let the bits 1100 be inserted in register X then these bits are ORed
with the resulting masked register X.
(vi) Clear Operation

An exclusive-OR (XOR) microoperation works as a clear operation.


Whenever two corresponding bits of registers X and Y are similar
i.e., both the bits are either Os or Is then its value will be assigned
as 0 in register X.

Shift Micro Operations

The shift micro-operations are specifically employed for shifting the


contents of a register to left or right position, they are used for
performing serial transfer of data. During the shifting operation of
bits, the binary information from serial input is given to the first
flip-flop in the register and the last flip-flop in the register produces
the information to the serial output.

The operations that are performed here is shift left operation and
shift right operation. In former one, the operation of serial input
transfers bit to the right most position where as in latter one, the
operation of serial input transfers bit to the left most position.
The shift operations are categorized into three types,

1. Logical shift

2. Arithmetic shift

3. Circular shift or rotate.

1. Logical Shift

The serial input in logical shift operation is taken as zero. Due to


the shift operation an empty position is created in the register
which is filled with zero that is transferred through serial input.
This is illustrated in the following figures. There are two logical shift
microoperations i.e., logical shift left (L.shL.) and logical shift right
(LshR).

The following operations illustrates logical shift.

The above operations are two microoperations in which R1, is


logically shifted left to 1 place and R2, is logically shifted right to'l
place respectively.
2. Arithmetic Shift

An arithmetic shift is defined as a microoperation which is


responsible for shifting a signed binary number towards a right or
left position. Hence, the arithmetic shift can either be

(i) An arithmetic shift-right (or) (ii) An arithmetic shift-left.

An arithmetic shift-right is equivalent to the division of the binary


number by 2 whereas the arithmetic shift-left is equivalent to the
multiplication of the binary number by 2. When the number is
divided or multiplied by 2, there should be no change in the sign of
that number. Thus, in case of arithmetic shift operations, the sign
bit of the number remains the same. A register with the left most bit
contains the sign bit and the other bits contain the number. If a
zero appears in the sign then the number is positive, else it is
negative. The negative numbers are represented in a 2's
complement format.

Arithmetic shift right

The above figure shows a register that holds 'n' bits. The left most bit in the
register stores Bn-1, which is the sign bit. The bits Bn-2 and B0, specify the most
significant and least significant bits of the number respectively. In the
arithmetic shift-right operation, the sign bit must remain the same and the bits
along with the sign bit must be shifted from left to right. Hence, the bit B n-1
does not change and is passed to Bn-2. The received bit in Bn-2 is again passed
to Bn-3. and so on till B0, receives a bit from B1,. As a result, the bit in B0, is
removed.
During the arithmetic shift-left operation, a zero is bit gets placed in the B 0,
position and the remaining bits in the register are shifted towards the left
Hence, the value at Bn-1 lost and a new value which is received from B n-2 bit is
stored in Bn-1... Depending upon the new value, the sign bit changes after the
left shift operation. The sign reversal is performed when an overflow occurs
after the multiplication of number by 2.

After an arithmetic shift left operation, an overflow occurs if the value of


before the shift operation.

In order to identify an arithmetic shift-left overflow, a flip-flop V's is required


such that,

When Vs holds a zero value, no overflow occurs and when Vs holds 1, an


overflow occurs and the sign bit is changed. Both the shifting operation and the
Vs transfer in the overflow flip-flop must be synchronized with the same clock
pulse i.e.. they must be performed at the same time.
3. Circular Shift or Rotate

The circular shift or rotate is also called as rotate microoperation. During the
shifting of bits in shift microooperation, the bits which are shifted out of
register go off track (lost). However, this bit is maintained by circular shift. It
operates by shifting each bit out of one end of register and giving back into the
other end of the register. The two types of rotate microoperations are rotate left
(RL or CshL) and rotate right (RR or CshR).
Arithmetic Logic Shift Unit

The arithmetic, logic and shift circuits can be combined into one composite
circuit with the help of a multiplexer to get the arithmetic logic shift unit. The
following figure shows one stage of an arithmetic logic shift unit.

Both the arithmetic and logic unit receive inputs P i, and Qi, here the suffix i
represents a typical stage i. Inputs Si, and S0 are used to select a particular
microoperation, while S2, and S3, select the data in the multiplexer. The other
two inputs to the multiplexer are Pi-1 and Pi+1 that perform shift-right and
shift-left operations respectively. Actually the purpose of 4x1 multiplexer to
select between an arithmetic output in yi, and logical output in Zi, The diagram
shown above is the typical representation of stage 1. It must be repeated n
times to obtain n-bit ALU. In case of multistage ALU, the output carry C i+1, of a
given arithmetic stage is connected to input carry C i, of the next stage. The
following table gives the list of operations that can be performed using
anthmetic logic shift circuit.

As shown in the above table, there are 8 arithmetic operations which are
selected when S3S2=00. When S3S2=01 logical operations are selected. Shift
operations are selected when S3S2=10 and S3S2 =11.

The input value X' denote don't-care condition. The inputs marked with X's
have no effect during the particular operation.
Instruction codes
An instruction code is a group of bits that instruct the computer to perform a
specific operation. It is usually divided into parts, each having its own particular
interpretation. The most basic part of an instruction code is its operation part. The
operation code of an instruction is a group of bits that define such operations as
add, subtract, multiply, shift, and complement.

The number of bits required for the operation code of an instruction depends on the
total number of operations available in the computer. The operation code must
consist of at least n bits for a given 2n (or less) distinct operations. When this
operation code is decoded in the control unit, the computer issues control signals to
read an operand from memory and add the operand to a processor register.

The operation part of an instruction code specifies the operation to be performed.


An instruction code must therefore specify not only the operation but also the
registers or the memory words where the operands are to be found, as well as the
register or memory word where the result is to be stored. Processor registers can be
specified by assigning to the instruction another binary code of k bits that specifies
one of 2k registers.

An operation is part of an instruction stored in computer memory. It is a binary


code that tells the computer to perform a specific operation. The control unit
receives the instruction from memory and interprets the operation code bits. It then
issues a sequence of control signals to initiate micro operations in internal
computer registers. For every operation code, the control issues a sequence of
micro operations needed for the hardware implementation of the specified
operation. For this reason, an operation code is sometimes called a macro operation
because it specifies a set of micro operations.
Stored Program Organization
The simplest way to organize a computer is to have one processor register and an
instruction code format with two parts. The first part specifies the operation to be
performed and the second
nd specifies an address. The memory address tells the
control where to find an operand in memory. This operand is read from memory
and used as the data to be operated on together with the data stored in the processor
register.

Above Figure depicts this type of organization. Instructions are stored in one
section of memory and data in another. For a memory unit with 4096 words we
need 12 bits to specify an address since 2 12 = 4096.
If we store each instruction code in one 16-bit
bit memory word, we have available
four bits for the operation code (abbreviated opcode) to specify one out of 16
possible operations, and 12 bits to specify the address of an operand. The control
reads a 16-bit
bit instruction from the program porti
portion
on of memory. It uses the 12-bit
12
address part of the instruction to read a 16
16-bit
bit operand from the data portion of
memory. It then executes the operation specified by the operation code.

INSTRUCTION CODE = OPERATION+ REGISTER OR MEMORY WORD


OF OPERANDS+REGISTER
EGISTER OR MEMORY WORD TO STORE RESULTS

Indirect Address
It is sometimes convenient to use the address bits of an instruction code not as an
address but as the actual operand. When the second part of an instruction code
specifies an operand, the instruction is said to have an immediate operand. When
the second part specifies the address of an operand, the instruction is said to have a
direct address. This is in contrast to a third possibility called indirect address,
where the bits in the second ppart
art of the instruction designate an address of a
memory word in which the address of the operand is found. One bit of the
instruction code can be used to distinguish between a direct and an indirect
address.
COMPUTER REGISTERS
Computer instructions are normally stored in consecutive memory locations and
are executed sequentially one at a time.

The control reads an instruction from a specific address in memory and executes it.
It then continues by reading the nnext
ext instruction in sequence and executes it, and so
on. This type of instruction sequencing needs a counter to calculate the address of
the next instruction after execution of the current instruction is completed. It is also
necessary to provide a register in the control unit for storing the instruction code
after it is read from memory. The computer needs processor registers for
manipulating data and a register for holding a memory address

These requirements dictate the register configuration shown in the list


Instruction words are read and executed in sequence unless a branch instruction is
encountered. A branch instruction calls for a transfer to a nonconsecutive
instruction in the program. The address part of a branch instruction is transferred to
PC to become the address of the next instruction.

To read an instruction, the content of PC is taken as the address for memory and a
memory read cycle is initiated. PC is then incremented by one, so it holds the
address of the next instruction in sequence.

INPUT REGISTER(INPR)

The input register (INPR) receives an 88-bit


bit character from an
input device.

OUTPUT REGISTER(OUTR)
Computer Instructions
Computer instructions are a set of machine language instructions that a particular
processor understands and executes. A computer performs tasks on the basis of the
instruction provided.

An instruction comprises of groups called fields. These fields include:

o he Operation code (Opcode) field which specifies the operation to be performed.


o The Address field which contains the location of the operand, i.e., register or
memory location.
o The Mode field which specifies how the operand will be located.

A basic computer has three instruction code formats which are:

1. Memory - reference instruction


2. Register - reference instruction
3. Input-Output
Output instruction
Timing and Control
The timings for all the registers is controlled a master clock generator.
– Its pulses are applied to all flip-flops and registers, including in the control
unit.
– The control signals are generated in the control unit and provide control
inputs for the bus’s mutlitplexers and for the processor registers and
provides micrroperations for the accumulator.
There are two types of control:

Timing Signals
 Timing signals are generated by the sequence
counter (SC), which receives as inputs the clock
pulse, increment and clear.
 The SC’s outputs are decoded into 16 timing
signal T0 through T15, which are used to control
the sequence of operations.
 The RTL statement
D3T4: SC 0

resets the sequence counter to zero; the next timing signal is T 0.


Instruction Cycle
The instructions of a program are carried out by a process called the
instruction cycle.
The instruction cycle consists of these phases:
– Fetch an instruction from memory
– Decode the instruction
– Read the effective address from memory if the operand has an indirect
address.
– Execute the instruction.

Fetch and Decode


Initially, the PC has stored the address of the instruction about to be executed
and the SC is cleared to 0.
With each clock pulses the SC is incremented and the timing signals go
through the sequence T0, T1,T2, etc.
It is necessary to load the AR with the PC’s address (it is connected to
memory address inputs):

T0: AR PC
Subsequently, as we fetch the instruction to be executed, we must increment
the program counter so that it points to the next instruction:

T1: IR M[AR], PC PC + 1


In order to carry out the instruction, we must decode and prepare to fetch the
operand. In the event it is an indirect operand, we need to have the indirect
addressing bit as well:

T2: D0, … D7 Decode IR(12-14), AR IR (0-11), I IR(15)


Register Transfers For the Fetch Phase

Type of Instruction and Addressing


During time T3, the control unit determines if this is a memory-reference, register-reference or
input/output instruction.

– The latter two are distinguished by the I (indirect) bit.


– If it is a memory-reference instruction, the I bit will determine direct or indirect addressing.

The four separate paths are:


D7’IT3: AR M[AR]
D7’I’T3: Nothing
Execute a register-reference
D7I’T3:
instruction
D7IT3:
Execute an input-output instruction

You might also like