Module II
Basic Computer Organizations and
Design
VD/ASET/COA/B.Tech./Module II/Basic Computer Organizations and Design 1
INSTRUCTION CODES
• A program is a set of instructions that specify
the operations, operands, and the sequence
by which processing has to occur.
• A computer instruction is a binary code that
specifies a sequence of micro-operations for
the computer. Instruction codes together with
data are stored in memory.
VD/ASET/COA/B.Tech./Module II/Basic
Computer Organizations and Design
2
• An instruction code is a group of bits that
instruct the computer to perform a specific
operation.
• The operation code of an instruction is a
group of bits that define such operations as
add, subtract, multiply, shift, and
complement.
VD/ASET/COA/B.Tech./Module II/Basic
Computer Organizations and Design
3
• An operation code is sometimes called a
macro-operation because it specifies a set of
micro-operations.
• An instruction code must 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.
VD/ASET/COA/B.Tech./Module II/Basic
Computer Organizations and Design
4
Stored Program Organization
VD/ASET/COA/B.Tech./Module II/Basic
Computer Organizations and Design
5
Direct and indirect address
VD/ASET/COA/B.Tech./Module II/Basic
Computer Organizations and Design
6
Computer Registers
VD/ASET/COA/B.Tech./Module II/Basic
Computer Organizations and Design
7
Common Bus System
VD/ASET/COA/B.Tech./Module II/Basic
Computer Organizations and Design
8
Computer Instructions (Basic
computer instruction formats)
VD/ASET/COA/B.Tech./Module II/Basic
Computer Organizations and Design
9
Instruction Set Completeness
1. Arithmetic, logical, and shift instructions
2. Instructions for moving information to and from
memory and processor registers
3. Program control instructions together with
instructions that check status conditions
4. Input and output instructions
VD/ASET/COA/B.Tech./Module II/Basic
Computer Organizations and Design
10
Timing and Control
VD/ASET/COA/B.Tech./Module II/Basic Computer Organizations and Design 11
Instruction Cycle
1. Fetch an instruction from memory.
2. Decode the instruction.
3. Read the effective address from memory if
the instruction has an indirect address.
4. Execute the instruction.
VD/ASET/COA/B.Tech./Module II/Basic
Computer Organizations and Design
12
Flowchart for instruction cycle
VD/ASET/COA/B.Tech./Module II/Basic Computer Organizations and Design 13
Memory-Reference Instructions
VD/ASET/COA/B.Tech./Module II/Basic
Computer Organizations and Design
14
Input-Output and Interrupt
VD/ASET/COA/B.Tech./Module II/Basic
Computer Organizations and Design
15
Program Interrupt
VD/ASET/COA/B.Tech./Module II/Basic Computer Organizations and Design 16
VD/ASET/COA/B.Tech./Module II/Basic
Computer Organizations and Design
17
Design of Accumulator Logic
VD/ASET/COA/B.Tech./Module II/Basic
Computer Organizations and Design
18
VD/ASET/COA/B.Tech./Module II/Basic
Computer Organizations and Design
19
VD/ASET/COA/B.Tech./Module II/Basic
Computer Organizations and Design
20
Hardwired and Microprogrammed
control
 The control unit directs the entire computer system to carry
out stored program instructions.
 The control unit must communicate with both the
arithmetic logic unit (ALU) and main memory.
 The control unit instructs the arithmetic logic unit that
which logical or arithmetic operation is to be performed.
 The control unit co-ordinates the activities of the other two
units as well as all peripherals and auxiliary storage devices
linked to the computer.
VD/ASET/COA/B.Tech./Module II/Basic
Computer Organizations and Design
21
DESIGN OF CONTROL UNIT
Hardwired Control Unit
Micro-programmed Control Unit
VD/ASET/COA/B.Tech./Module II/Basic
Computer Organizations and Design
22
Hardwired Control Organization
VD/ASET/COA/B.Tech./Module II/Basic
Computer Organizations and Design
23
ADVANTAGES OF HARDWIRED CONTROL
UNIT
Hardwired Control Unit is fast because
control signals are generated by
combinational circuits.
The delay in generation of control signals
depends upon the number of gates.
VD/ASET/COA/B.Tech./Module II/Basic
Computer Organizations and Design
24
DISADVANTAGES OF HARDWIRED
CONTROL UNIT
More is the control signals required by CPU; more
complex will be the design of control unit.
Modifications in control signal are very difficult.
That means it requires rearranging of wires in the
hardware circuit.
It is difficult to correct mistake in original design
or adding new feature in existing design of
control unit.
VD/ASET/COA/B.Tech./Module II/Basic
Computer Organizations and Design
25
MICRO-PROGRAMMED CONTROL
UNIT
A micro-programmed control unit is implemented
using programming approach. A sequence of
micro-operations are carried out by executing a
program consisting of micro-instructions.
Micro-program, consisting of micro-instructions is
stored in the control memory of the control unit.
Execution of a micro-instruction is responsible for
generation of a set of control signals.
VD/ASET/COA/B.Tech./Module II/Basic
Computer Organizations and Design
26
 A micro-instruction consists of:
(i) One or more micro-operations to be executed.
(ii)Address of next microinstruction to be executed.
 Micro-Programs: Microprogramming is the concept for
generating control signals using programs. These programs
are called micro-programs.
 Micro-Instructions: The instructions that make micro-
program are called micro-instructions.
 Control Memory: Micro-programs are stored in the read
only memory (ROM). That memory is called control
memory
VD/ASET/COA/B.Tech./Module II/Basic
Computer Organizations and Design
27
Definitions
CONTROL MEMORY
VD/ASET/COA/B.Tech./Module II/Basic
Computer Organizations and Design
28
ADDRESS SEQUENCING
The address sequencing capabilities required in a control
memory are:
 Incrementing of the control address register.
 Unconditional branch or conditional branch, depending
on status bit conditions.
 A mapping process from the bits of the instruction to
an address for control memory.
 A facility for subroutine call and return.
VD/ASET/COA/B.Tech./Module II/Basic
Computer Organizations and Design
29
SELECTION OF ADDRESS FOR CONTROL MEMORY
VD/ASET/COA/B.Tech./Module II/Basic Computer Organizations and Design 30
DESIGN OF CONTROL UNIT
VD/ASET/COA/B.Tech./Module II/Basic Computer Organizations and Design 31
ADVANTAGES OF MICRO-PROGRAMMED
CONTROL UNIT
 The design of micro-program control unit is less complex because micro-
programs are implemented using software routines.
 The micro-programmed control unit is more flexible because design
modifications, correction and enhancement is easily possible.
 The new or modified instruction set of CPU can be easily implemented by
simply rewriting or modifying the contents of control memory.
 The fault can be easily diagnosed in the micro-program control unit using
diagnostics tools by maintaining the contents of flags, registers and
counters.
VD/ASET/COA/B.Tech./Module II/Basic
Computer Organizations and Design
32
DISADVANTAGES OF MICRO-
PROGRAMMED CONTROL UNIT
 The micro-program control unit is slower than
hardwired control unit. That means to execute an
instruction in micro-program control unit requires
more time.
 The micro-program control unit is expensive than
hardwired control unit in case of limited hardware
resources.
 The design duration of micro-program control unit is
more than hardwired control unit for smaller CPU.
VD/ASET/COA/B.Tech./Module II/Basic
Computer Organizations and Design
33
COMPARISON BETWEEN HARDWIRED AND
MICRO-PROGRAMMED CONTROL UNIT
VD/ASET/COA/B.Tech./Module II/Basic
Computer Organizations and Design
34
Source/Reference
• M. Morris Mano, Computer System Architecture,
Third Edition, Prentice Hall, 1993.
VD/ASET/COA/B.Tech./Module II/Basic
Computer Organizations and Design
35

Coa module ii Basic Computer Organizations and Design

  • 1.
    Module II Basic ComputerOrganizations and Design VD/ASET/COA/B.Tech./Module II/Basic Computer Organizations and Design 1
  • 2.
    INSTRUCTION CODES • Aprogram is a set of instructions that specify the operations, operands, and the sequence by which processing has to occur. • A computer instruction is a binary code that specifies a sequence of micro-operations for the computer. Instruction codes together with data are stored in memory. VD/ASET/COA/B.Tech./Module II/Basic Computer Organizations and Design 2
  • 3.
    • An instructioncode is a group of bits that instruct the computer to perform a specific operation. • The operation code of an instruction is a group of bits that define such operations as add, subtract, multiply, shift, and complement. VD/ASET/COA/B.Tech./Module II/Basic Computer Organizations and Design 3
  • 4.
    • An operationcode is sometimes called a macro-operation because it specifies a set of micro-operations. • An instruction code must 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. VD/ASET/COA/B.Tech./Module II/Basic Computer Organizations and Design 4
  • 5.
    Stored Program Organization VD/ASET/COA/B.Tech./ModuleII/Basic Computer Organizations and Design 5
  • 6.
    Direct and indirectaddress VD/ASET/COA/B.Tech./Module II/Basic Computer Organizations and Design 6
  • 7.
  • 8.
    Common Bus System VD/ASET/COA/B.Tech./ModuleII/Basic Computer Organizations and Design 8
  • 9.
    Computer Instructions (Basic computerinstruction formats) VD/ASET/COA/B.Tech./Module II/Basic Computer Organizations and Design 9
  • 10.
    Instruction Set Completeness 1.Arithmetic, logical, and shift instructions 2. Instructions for moving information to and from memory and processor registers 3. Program control instructions together with instructions that check status conditions 4. Input and output instructions VD/ASET/COA/B.Tech./Module II/Basic Computer Organizations and Design 10
  • 11.
    Timing and Control VD/ASET/COA/B.Tech./ModuleII/Basic Computer Organizations and Design 11
  • 12.
    Instruction Cycle 1. Fetchan instruction from memory. 2. Decode the instruction. 3. Read the effective address from memory if the instruction has an indirect address. 4. Execute the instruction. VD/ASET/COA/B.Tech./Module II/Basic Computer Organizations and Design 12
  • 13.
    Flowchart for instructioncycle VD/ASET/COA/B.Tech./Module II/Basic Computer Organizations and Design 13
  • 14.
  • 15.
    Input-Output and Interrupt VD/ASET/COA/B.Tech./ModuleII/Basic Computer Organizations and Design 15
  • 16.
    Program Interrupt VD/ASET/COA/B.Tech./Module II/BasicComputer Organizations and Design 16
  • 17.
  • 18.
    Design of AccumulatorLogic VD/ASET/COA/B.Tech./Module II/Basic Computer Organizations and Design 18
  • 19.
  • 20.
  • 21.
    Hardwired and Microprogrammed control The control unit directs the entire computer system to carry out stored program instructions.  The control unit must communicate with both the arithmetic logic unit (ALU) and main memory.  The control unit instructs the arithmetic logic unit that which logical or arithmetic operation is to be performed.  The control unit co-ordinates the activities of the other two units as well as all peripherals and auxiliary storage devices linked to the computer. VD/ASET/COA/B.Tech./Module II/Basic Computer Organizations and Design 21
  • 22.
    DESIGN OF CONTROLUNIT Hardwired Control Unit Micro-programmed Control Unit VD/ASET/COA/B.Tech./Module II/Basic Computer Organizations and Design 22
  • 23.
    Hardwired Control Organization VD/ASET/COA/B.Tech./ModuleII/Basic Computer Organizations and Design 23
  • 24.
    ADVANTAGES OF HARDWIREDCONTROL UNIT Hardwired Control Unit is fast because control signals are generated by combinational circuits. The delay in generation of control signals depends upon the number of gates. VD/ASET/COA/B.Tech./Module II/Basic Computer Organizations and Design 24
  • 25.
    DISADVANTAGES OF HARDWIRED CONTROLUNIT More is the control signals required by CPU; more complex will be the design of control unit. Modifications in control signal are very difficult. That means it requires rearranging of wires in the hardware circuit. It is difficult to correct mistake in original design or adding new feature in existing design of control unit. VD/ASET/COA/B.Tech./Module II/Basic Computer Organizations and Design 25
  • 26.
    MICRO-PROGRAMMED CONTROL UNIT A micro-programmedcontrol unit is implemented using programming approach. A sequence of micro-operations are carried out by executing a program consisting of micro-instructions. Micro-program, consisting of micro-instructions is stored in the control memory of the control unit. Execution of a micro-instruction is responsible for generation of a set of control signals. VD/ASET/COA/B.Tech./Module II/Basic Computer Organizations and Design 26
  • 27.
     A micro-instructionconsists of: (i) One or more micro-operations to be executed. (ii)Address of next microinstruction to be executed.  Micro-Programs: Microprogramming is the concept for generating control signals using programs. These programs are called micro-programs.  Micro-Instructions: The instructions that make micro- program are called micro-instructions.  Control Memory: Micro-programs are stored in the read only memory (ROM). That memory is called control memory VD/ASET/COA/B.Tech./Module II/Basic Computer Organizations and Design 27 Definitions
  • 28.
  • 29.
    ADDRESS SEQUENCING The addresssequencing capabilities required in a control memory are:  Incrementing of the control address register.  Unconditional branch or conditional branch, depending on status bit conditions.  A mapping process from the bits of the instruction to an address for control memory.  A facility for subroutine call and return. VD/ASET/COA/B.Tech./Module II/Basic Computer Organizations and Design 29
  • 30.
    SELECTION OF ADDRESSFOR CONTROL MEMORY VD/ASET/COA/B.Tech./Module II/Basic Computer Organizations and Design 30
  • 31.
    DESIGN OF CONTROLUNIT VD/ASET/COA/B.Tech./Module II/Basic Computer Organizations and Design 31
  • 32.
    ADVANTAGES OF MICRO-PROGRAMMED CONTROLUNIT  The design of micro-program control unit is less complex because micro- programs are implemented using software routines.  The micro-programmed control unit is more flexible because design modifications, correction and enhancement is easily possible.  The new or modified instruction set of CPU can be easily implemented by simply rewriting or modifying the contents of control memory.  The fault can be easily diagnosed in the micro-program control unit using diagnostics tools by maintaining the contents of flags, registers and counters. VD/ASET/COA/B.Tech./Module II/Basic Computer Organizations and Design 32
  • 33.
    DISADVANTAGES OF MICRO- PROGRAMMEDCONTROL UNIT  The micro-program control unit is slower than hardwired control unit. That means to execute an instruction in micro-program control unit requires more time.  The micro-program control unit is expensive than hardwired control unit in case of limited hardware resources.  The design duration of micro-program control unit is more than hardwired control unit for smaller CPU. VD/ASET/COA/B.Tech./Module II/Basic Computer Organizations and Design 33
  • 34.
    COMPARISON BETWEEN HARDWIREDAND MICRO-PROGRAMMED CONTROL UNIT VD/ASET/COA/B.Tech./Module II/Basic Computer Organizations and Design 34
  • 35.
    Source/Reference • M. MorrisMano, Computer System Architecture, Third Edition, Prentice Hall, 1993. VD/ASET/COA/B.Tech./Module II/Basic Computer Organizations and Design 35