Coa Module 3
Coa Module 3
MODULE 3
1. An accumulator based computer supports------instruction format.
Zero Address Instruction Format
2. -- is the first process in instruction execution
Fetch
3. CISC stand for---
complex instruction set computer
4. What is an instruction?
An instruction is an order given to a computer processor by a computer program
5. What is an instruction set?
An instruction set is a group of commands for a CPU in machine language
6. What is PSW?
The Program Status Word (PSW) contains status bits that reflect the current CPU state
7. Explain register organization of CPU.
ONE-ADDRESS INSTRUCTIONS
One-address instructions use an implied accumulator (AC) register for all data manipulation. For
multiplication and division there is a need for a second register. However, here we will neglect the
is LOAD A AC ←M [A]
ADD B AC ←A [C] + M [B]
STORE T M [T] ←AC
LOAD C AC ←M [C]
A large amount of data is stored in the computer memory with the help of primary and secondary storage
devices. The CPU is like the heart/brain of the computer. The user does not get the desired output, without
the necessary option taken by the CPU. The Central processing unit (CPU) is responsible for the
processing of all the instructions which are given by the user to the computer system.
The CPU contains two parts: the arithmetic logic unit and control unit. We have discussed briefly
the arithmetic unit, logical unit, and control unit which are given below:
Control Unit
The control unit (CU) controls all the activities or operations which are performed inside the
computer system. It receives instructions or information directly from the main memory of the
computer.
When the control unit receives an instruction set or information, it converts the instruction set to
control signals then; these signals are sent to the central processor for further processing. The
control unit understands which operation to execute, accurately, and in which order.
Arithmetic and Logical Unit
The arithmetic and logical unit is the combinational digital electronic circuit that can perform
arithmetic operations on integer binary numbers. It presents the arithmetic and logical operation.
The outputs of ALU will change asynchronously in response to the input. The basic arithmetic and
bitwise logic functions are supported by ALU.
Storage Unit
The information or set of guidelines are stored in the storage unit of the computer system. The
storage unit provides the space to store the data or instruction of processed data. The information
or data is saved or hold in computer memory or storage device. The data storage is the core
function and fundamental of the computer components.
10. Define instruction cycle?
Fetching the instruction: The next instruction is fetched from the memory address that is
currently stored in the program counter (PC) and stored in the instruction register (IR). At the
end of the fetch operation, the PC points to the next instruction that will be read at the next cycle.
Decode the instruction: During this cycle the encoded instruction present in the IR (instruction
register) is interpreted by the decoder.
Read the effective address: In case of a memory instruction (direct or indirect) the execution
phase will be in the next clock pulse. If the instruction has an indirect address, the effective
address is read from main memory and any required data is fetched from main memory to be
processed and then placed into data registers. If the instruction is direct, nothing is done at this
clock pulse. If this is an I/O instruction or a Register instruction, the operation is performed
(executed) at clock Pulse.
Execute the instruction: The control unit of the CPU passes the decoded information as a
sequence of control signals to the relevant function units of the CPU to perform the actions
required by the instruction
o The Operation code (Opcode) field which specifies the operation to be performed.
o The Address field which contains the location of the operand, i.e., register or memory location.
o The Mode field which specifies how the operand will be located.
In Memory-reference instruction, 12 bits of memory is used to specify an address and one bit to
specify the addressing mode 'I'.
ARegister - referenceinstruction
Register-reference instructionspecifies an operation on or a test of the AC (Accumulator) register.
Input-Output instruction
The Register-reference instructions are represented by the Opcode 111 with a 0 in the leftmost bit (bit
15) of the instruction.
Note: The Operation code (Opcode) of an instruction refers to a group of bits that define arithmetic
and logic operations such as add, subtract, multiply, shift, and compliment.
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.
Register stack
It is a 64 word stack
The one-bit register FULL is set to 1 when the stack is full,
The one-bit register EMTY is set to 1 when the stack is empty of items
In a 64-word stack, the stack pointer contains 6 bits because 2^ 6 = 64.
DR is the data register that holds the binary data to be written into or read out of the stack.
The operations on stack are PUSH (insertion of data into the stack) and POP(retrieval of data from
the stack)
The top item is read from the stack into DR. The stack pointer is then decremented.
If its value reaches zero, the stack is empty, so EMTY is set to 1.
· The stack pointer is incremented so that it points to the address of next-higher word. A memory
write operation inserts the word from DR into the top of the stack.
· SP holds the address of the top of the stack and that M[SP] denotes the memory word
specified by the address presently available in SP.
20. Write about the design of arithmetic and logic unit
Inside a computer, there is an Arithmetic Logic Unit (ALU), which is capable of performing logical
operations (e.g. AND, OR, Ex-OR, Invert etc.) in addition to the arithmetic operations (e.g. Addition,
Subtraction etc.). The control unit supplies the data required by the ALU from memory, or from input
devices, and directs the ALU to perform a specific operation based on the instruction fetched from the
memory. ALU is the “calculator” portion of the computer.
An arithmetic logic unit(ALU) is a major component of the central processing unit of the a computer
system. It does all processes related to arithmetic and logic operations that need to be done on instruction
words. In some microprocessor architectures, the ALU is divided into the arithmetic unit (AU) and the
logic unit (LU).
An ALU can be designed by engineers to calculate many different operations. When the operations
become more and more complex, then the ALU will also become more and more expensive and also takes
up more space in the CPU and dissipates more heat. That is why engineers make the ALU powerful
enough to ensure that the CPU is also powerful and fast, but not so complex as to become prohibitive in
terms of cost and other disadvantages.
ALU is also known as an Integer Unit (IU). The arithmetic logic unit is that part of the CPU that handles
all the calculations the CPU may need. Most of these operations are logical in nature. Depending on how
the ALU is designed, it can make the CPU more powerful, but it also consumes more energy and creates
more heat. Therefore, there must be a balance between how powerful and complex the ALU is and how
expensive the whole unit becomes. This is why faster CPUs are more expensive, consume more power
and dissipate more heat.
Different operation as carried out by ALU can be categorized as follows –
logical operations − These include operations like AND, OR, NOT, XOR, NOR, NAND, etc.
Bit-Shifting Operations − This pertains to shifting the positions of the bits by a certain number of
places either towards the right or left, which is considered a multiplication or division operations.
Arithmetic operations − This refers to bit addition and subtraction. Although multiplication and
division are sometimes used, these operations are more expensive to make. Multiplication and
subtraction can also be done by repetitive additions and subtractions respectively.
21. What are the 4 types of instruction type formats
THREE ADDRESS
TWO ADDRESS
ONE ADDRESS
ZERO ADDRESS
22. Define PC.
PC(program counter),It hold the address of the instruction to be execute next