Unit-2-Computer Organization Best Notes For Bca
Unit-2-Computer Organization Best Notes For Bca
Prepared by:
Subject:- COA Asst. Prof. S Joshi
Y JOSHI
•Shweta •1
Code:-3140707 (CSE Department,ACET)
Topics to be covered
• Instruction codes
• Computer registers
• computer instructions
• Timing and Control
• Instruction cycle
• Memory-Reference Instructions
• Input-output and interrupt
• Complete computer description
• Design of Basic computer
• Design of Accumulator Unit
•Shweta Joshi •2
Instruction Codes
• An instruction code is a group of bits that instruct the
computer to perform a specific operation. It is usually divided
into parts, each having its own particular interpretation.
• The most basic part of an instruction code is its operation
part.
• The operation code of an instruction is a group of bits that
define such operations as add, subtract, multiply, shift, and
complement.
• The number of bits required for the operation code of an
instruction depends on the total number of operations
available in the computer.
• The operation code must consist of at least n bits for a given
2^n (or less) distinct operations
•Shweta Joshi •3
Instruction Codes
• Below is shown the instruction format - four bits for the operation code
(abbreviated opcode), and 12 bits to specify the address of an operand
• It is sometimes convenient to use the address bits of an instruction code not as
an address but as the actual operand. When the second part of an instruction
immediate code specifies an operand, the instruction is said to have an
immediate instruction operand. When the second part specifies the address of
an operand, the instruction is said to have a direct address. This is in contrast to
a third possibility called indirect address, where the bits in the second part of
the instruction designate an address of a memory word in which the address of
the operand is found. One bit of the instruction code can be used to distinguish
between a direct and an indirect address. The I bit is 0, so instruction is direct
address instruction,if I is 1 then indirect
•Shweta Joshi •4
Computer Registers
• It is necessary to provide a register in the control unit for storing the
instruction, code after it is read from memory. The computer needs
processor registers for manipulating data and a register for holding a
memory address.
Register Number of bits Register name Function
•Shweta Joshi •6
Computer instructions
• The basic computer has three instruction code formats,
• Each format has 16 bits.
• The operation code (opcode) part of the instruction contains three bits and the
meaning of the remaining 13 bits depends on the operation code encountered.
• A memory-reference instruction uses 12 bits to specify an address and one bit to
specify the addressing code I.
• I is equal to 0 for direct address and to 1 for indirect address.
• The register reference instructions are recognized by the operation code 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
register. An operand from memory is not needed; therefore, the other 12 bits are
used to specify the operation or test to be executed.
• Similarly, 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 input-output
operation or test performed.
•Shweta Joshi •7
Computer instructions
•Shweta Joshi •8
Computer instructions
• The set of instructions are said to be complete if the
computer includes a sufficient number of instructions in each
of the following categories:
• 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
•Shweta Joshi •9
Timing and Control
• The timing for all registers in the basic computer is controlled
by a master clock generator.
• The clock pulses are applied to all flip-flops and registers in
the system, including the flip-flops and registers in the
control unit.
• The clock pulses do not change the state of a register unless
the register is enabled by a control signal.
• The control signals are generated in the control unit and
provide control inputs for the multiplexers in the common
bus, control inputs in processor registers, and micro
operations for the accumulator.
• The outputs of the counter are decoded into 16 timing signals
T0 through T15 .REFER FIGURE
•Shweta Joshi •10
Timing and Control
BUN D4 PCAR