CA (Unit-2 Self)
CA (Unit-2 Self)
1. Instruction Code
2. Computer Registers.
Computer Registers
Registers are a type of computer memory used to quickly accept, store, and transfer
data and instructions that are being used immediately by the CPU. The registers used
by the CPU are often termed as Processor registers.
A processor register may hold an instruction, a storage address, or any data (such as bit
sequence or individual characters).
The computer needs processor registers for manipulating data and a register for
holding a memory address. The register holding the memory location is used to
calculate the address of the next instruction after the execution of the current
instruction is completed.
Following is the list of some of the most common registers used in
a basic computer:
Register Symbol Number of Function
bits
instruction
The following image shows the register and memory configuration for a basic
computer.
The Memory unit has a capacity of 4096 words, and each word contains 16
bits.
The Data Register (DR) contains 16 bits which hold the operand read from the
memory location.
The Memory Address Register (MAR) contains 12 bits which hold the address
for the memory location.
The Program Counter (PC) also contains 12 bits which hold the address of the
next instruction to be read from memory after the current instruction is
executed.
The Accumulator (AC) register is a general purpose processing register.
The instruction read from memory is placed in the Instruction register (IR).
The Temporary Register (TR) is used for holding the temporary data during the
processing.
The Input Registers (IR) holds the input characters given by the user.
The Output Registers (OR) holds the output after processing the input data.
3. Computer Instructions.
The Register-reference instructions are represented by the Opcode 111 with a 0 in the
leftmost bit (bit 15) of the instruction.
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
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.
When the three operation code bits are equal to 111, the 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.
The three instruction types are subdivided into four separate paths. The
selected
Operation is activated with the clock transition associated with timing signal T3. This
can be symbolized as follows:
D’7 I T3: AR <-- [AR]
D’7 I’ T3: Nothing
D7 I’ T3: Execute a register-reference instruction
D7 I T3 : Execute an input-output instruction