MODULE COMPUTER ORGANIZATION AND ARCHITECTURE
CHAPTER 3: COMPUTER INSTRUCTIONS
Objectives:
a.) Discuss the different fields of instructions.
b.) Describe the two major categories of control unit.
c.) Discover the phases of an instruction cycle.
Lesson 1: Computer Instructions
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 The 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 instruction
Memory - reference instruction
Page 1
MODULE COMPUTER ORGANIZATION AND ARCHITECTURE
In Memory-reference instruction, 12 bits of memory is used to specify an address and one bit to
specify the addressing mode 'I'.
Register - reference instruction
The Register-reference instructions are represented by the Opcode 111 with a 0 in the leftmost
bit (bit 15) of the instruction.
Note: The Operation code (Opcode) of an instruction refers to a group of bits that define
arithmetic and logic operations such as add, subtract, multiply, shift, and compliment.
A Register-reference instruction specifies an operation on or a test of the AC (Accumulator)
register.
Input-Output instruction
Just like the Register-reference instruction, an Input-Output instruction does not need a
reference to memory and is recognized by the operation code 111 with a 1 in the leftmost bit of
the instruction. The remaining 12 bits are used to specify the type of the input-output operation
or test performed.
Note
o The three operation code bits in positions 12 through 14 should be equal to 111.
Otherwise, the instruction is a memory-reference type, and the bit in position 15 is taken
as the addressing mode I.
o When the three operation code bits are equal to 111, control unit inspects the bit in
position 15. If the bit is 0, the instruction is a register-reference type. Otherwise, the
instruction is an input-output type having bit 1 at position 15.
Instruction Set Completeness
A set of instructions is said to be complete if the computer includes a sufficient number of
instructions in each of the following categories:
Page 2
MODULE COMPUTER ORGANIZATION AND ARCHITECTURE
o Arithmetic, logical and shift instructions
o A set of instructions for moving information to and from memory and processor registers.
o Instructions which controls the program together with instructions that check status
conditions.
o Input and Output instructions
Arithmetic, logic and shift instructions provide computational capabilities for processing the type
of data the user may wish to employ.
A huge amount of binary information is stored in the memory unit, but all computations are done
in processor registers. Therefore, one must possess the capability of moving information
between these two units.
Program control instructions such as branch instructions are used change the sequence in which
the program is executed.
Input and Output instructions act as an interface between the computer and the user. Programs
and data must be transferred into memory, and the results of computations must be transferred
back to the user.
For more knowledge about computer instructions, please check the link provided;
https://www.youtube.com/watch?v=zltgXvg6r3k
Lesson 2: Design Control Unit
Design of Control Unit
The Control Unit is classified into two major categories:
1. Hardwired Control
2. Microprogrammed Control
Hardwired Control
The Hardwired Control organization involves the control logic to be implemented with gates, flip-
flops, decoders, and other digital circuits.
The following image shows the block diagram of a Hardwired Control organization.
Page 3
MODULE COMPUTER ORGANIZATION AND ARCHITECTURE
o A Hard-wired Control consists of two decoders, a sequence counter, and a number of logic
gates.
o An instruction fetched from the memory unit is placed in the instruction register (IR).
o The component of an instruction register includes; I bit, the operation code, and bits 0
through 11.
o The operation code in bits 12 through 14 are coded with a 3 x 8 decoder.
o The outputs of the decoder are designated by the symbols D0 through D7.
o The operation code at bit 15 is transferred to a flip-flop designated by the symbol I.
o The operation codes from Bits 0 through 11 are applied to the control logic gates.
o The Sequence counter (SC) can count in binary from 0 through 15.
Micro-programmed Control
The Microprogrammed Control organization is implemented by using the programming
approach.
Page 4
MODULE COMPUTER ORGANIZATION AND ARCHITECTURE
In Microprogrammed Control, the micro-operations are performed by executing a program
consisting of micro-instructions.
The following image shows the block diagram of a Microprogrammed Control organization.
o The Control memory address register specifies the address of the micro-instruction.
o The Control memory is assumed to be a ROM, within which all control information is
permanently stored.
o The control register holds the microinstruction fetched from the memory.
o The micro-instruction contains a control word that specifies one or more micro-
operations for the data processor.
o While the micro-operations are being executed, the next address is computed in the next
address generator circuit and then transferred into the control address register to read
the next microinstruction.
o The next address generator is often referred to as a micro-program sequencer, as it
determines the address sequence that is read from control memory.
For more knowledge about control unit, please check the link provided;
https://www.youtube.com/watch?v=IzWvFfiQPbA
Lesson 3: Instruction Cycle
Instruction Cycle
A program residing in the memory unit of a computer consists of a sequence of instructions.
These instructions are executed by the processor by going through a cycle for each instruction.
In a basic computer, each instruction cycle consists of the following phases:
1. Fetch instruction from memory.
2. Decode the instruction.
3. Read the effective address from memory.
4. Execute the instruction.
Page 5
MODULE COMPUTER ORGANIZATION AND ARCHITECTURE
Input-Output Configuration
In computer architecture, input-output devices act as an interface between the machine and the
user.
Instructions and data stored in the memory must come from some input device. The results are
displayed to the user through some output device.
The following block diagram shows the input-output configuration for a basic computer.
o The input-output terminals send and receive information.
Page 6
MODULE COMPUTER ORGANIZATION AND ARCHITECTURE
o The amount of information transferred will always have eight bits of an alphanumeric
code.
o The information generated through the keyboard is shifted into an input register 'INPR'.
o The information for the printer is stored in the output register 'OUTR'.
o Registers INPR and OUTR communicate with a communication interface serially and with
the AC in parallel.
o The transmitter interface receives information from the keyboard and transmits it to
INPR.
o The receiver interface receives information from OUTR and sends it to the printer serially.
Design of a Basic Computer
A basic computer consists of the following hardware components.
1. A memory unit with 4096 words of 16 bits each
2. Registers: AC (Accumulator), DR (Data register), AR (Address register), IR (Instruction
register), PC (Program counter), TR (Temporary register), SC (Sequence Counter), INPR
(Input register), and OUTR (Output register).
3. Flip-Flops: I, S, E, R, IEN, FGI and FGO
Note: FGI and FGO are corresponding input and output flags which are considered as control flip-
flops.
1. Two decoders: a 3 x 8 operation decoder and 4 x 16 timing decoder
2. A 16-bit common bus
3. Control Logic Gates
4. The Logic and Adder circuits connected to the input of AC.
For more knowledge about instruction cycle, please check the link provided;
https://www.youtube.com/watch?v=Z5JC9Ve1sfI
REFERENCES
https://www.javatpoint.com/computer-instructions
https://www.javatpoint.com/design-of-control-unit
https://www.javatpoint.com/instruction-cycle
Page 7