Microprocessor - Basic Computer
Microprocessor - Basic Computer
Technology Nawabshah
Lecture # 4
15 0
4095
instruction
Program
A sequence of (machine) instructions
(Machine) Instruction
A group of bits that tell the computer to perform a
specific operation (a sequence of micro-operation)
The instructions of a program, along with any needed
data are stored in memory.
The CPU reads the next instruction from memory
It is placed in an Instruction Register (IR).
Control circuitry in control unit then translates the
instruction into the sequence of micro-operations
necessary to implement it.
Instruction Format
A computer instruction is often divided into two parts
An opcode (Operation Code) that specifies the operation for
that instruction
An address that specifies the registers and/or locations in
memory to use for that operation
In the Basic Computer, since the memory contains 4096 (= 212)
words, we needs 12 bit to specify which memory address this
instruction will use
In the Basic Computer, bit 15 of the instruction specifies the
addressing mode (0: direct addressing, 1: indirect addressing)
Since the memory words, and hence the instructions, are 16 bits
long, that leaves 3 bits for the instruction’s opcode
Instruction Format
15 14 1211 0
I Opcode Address
Addressing
mode
Addressing modes
The address field of an instruction can represent either
Direct address: the address in memory of the data to use (the
address of the operand), or
Indirect address: the address in memory of the address in
memory of the data to use