�Chapter-2�Basic Computer Organization And Design
Instruction Codes
Stored Program 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 212 = 4096.
Indirect & Direct Address
Computer Registers
Program Counter
Basic computer registers and memory
Computer Bus System
Computer Instruction
Computer Instructions
Basic Computer Instruction
* INSTRUCTION SET COMPLETENESS (4 Categories)
Timing and Control
Two major types of control organization
Control unit basic computer
Control Timing signals (Examples)
T0: AR 🡨 PC
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
Fetch and Decode
T0: AR ← PC
T1: IR ← M[AR], PC ← PC + 1
T2: D0,…, D1 ← Decode IR (12-14), AR ← IR(0 −11), 1 ← IR (15)
Register transfer for Fetch phase
T1: IR ← M[AR], PC ← PC + 1
Register Reference Instruction
Execution of Register-Reference Instruction
MEMORY-REFERENCE INSTRUCTIONS
D0T4 : DR ← M[AR]
D0T5: AC ← AC Λ DR, SC ← 0
The control function for this instruction uses the operation decoder D0 since this output of the decoder is active when the instruction has an AND operation whose binary code value is 000.
Two timing signals are needed to execute the instruction. The clock transition associated with timing signal T4 transfers the operand from memory into DR.
The clock transition associated with the next timing signal T5 transfers to AC the result of the AND logic operation between the contents of DR and AC.
The same clock transition clears SC to 0, transferring control to timing signal T0 to start a new instruction cycle
D1T4: DR ← M[AR]
D1T5: AC ← AC + DR, E ← Cout, SC ← 0
The instruction adds the content of the memory word specified by the effective address to the value of AC.
The sum is transferred into AC and the output carry Cout is transferred to the E (extended accumulator) flip-flop.
D2T4: DR ← M[AR]
D2T5: AC ← DR, SC ← 0
The adder and logic circuit receive information from DR which can be transferred into AC. Therefore, it is necessary to read the memory word into DR first and then transfer the content of DR into AC
D3T4: M[AR] ← AC, SC ← 0
BUN : Branch Unconditionally:
This instruction transfers the program to the instruction specified by the effective address.
The BUN instruction allows the programmer to specify an instruction out of sequence and we say that the program branches (or jumps) unconditionally.
D4T4: PC ← AR, SC ← 0
M[AR] ← PC, PC ← AR + 1
M[135] ← 21, PC ← 135 + 1 = 136
D5T4: M[AR] ← PC, AR ← AR + 1
D5T5: PC ← AR, SC ← 0
Example of BSA instruction execution
D6T4: DR ← M[AR]
D6T5: DR ← DR + 1
D6T6 : M[AR] ← DR, if (DR = 0) then (PC ← PC + 1), SC ← 0
D6T4: DR ← M[AR]
D6T5: DR ← DR + 1
D6T6 : M[AR] ← DR, if (DR = 0) then (PC ← PC + 1), SC ← 0
Flowchart for memory-reference instructions
INPUT-OUTPUT AND INTERRUPT
INPUT-OUTPUT CONFIGURATION
Input Output Instructions
Program Interrupt
Flow Chart for Interrupt Cycle
Demonstration of the interrupt cycle
Interrupt Cycle
Modified fetch phase
Design of Basic Computer
Design of Accumulator Logic
Design of Accumulator Logic
Gate structure for controlling the LD, lNR, and CLR of AC.