Coa Unit - 1 Important Questions
Coa Unit - 1 Important Questions
Engineering College
An Autonomous Institution
(NBA ACCREDITED B.TECH COURSES: EEE, ECE, MECH & CSE, ACCORDED NAAC ‘A’GRADE)
Ghatkesar, Hyderabad- 501 301
Computer system is divided into two functional entities: hardware and software
– Hardware: Lowest level in a computer. It comprises all of the physical parts (electronic and
electromechanical devices) of a computer.
– Software: Sequences of instructions and data that make computers do useful work.
Computer organization:
It is concerned with the way the hardware components operate and the way they are connected
together to form the computer system.( interconnection of h/w to form the computer system)
Computer design:
It is concerned with the hardware design of the computer.
Computer design is concerned with the determination of what hardware should be used and how
the parts should be connected.
This aspect is referred to as computer implementation.
Computer architecture:
It is concern with the structure and behavior of the computer perceived by the user.
It Includes instruction format, instruction set, and techniques for addressing memory.
It is also concern with specifications of the various functional modules like processor and
memory, and structuring them.
A digital computer has many registers, and paths must be provided to transfer information from one register
to another.
The below figure shows construction of common bus between registers using Multiplexers:
– A multiplexer (or mux), also known as a data selector, is a device that selects between several analog
or digital input signals and forwards it to a single output line.
– Each register has four bits, numbered 0 through 3. The bus consists of four 4 x 1 multiplexers each
having four data inputs, 0 through 3, and two selection inputs, S1 and S0.
Bus selection
– The two selection lines S1 and S0 are connected to the selection inputs of all four multiplexers.
– The selection lines choose the four bits of one register and transfer them into the four-line common
bus.
In general, a bus system will multiplex k registers of n bits each to produce an n-line common bus.
The number of multiplexers needed to construct the bus is equal to n, the number of bits in each
register.
The size of each multiplexer must be k x 1 since it multiplexes k data lines.
The transfer of information from a bus into one of many destination registers can be accomplished by
connecting the bus lines to the inputs of all destination registers and activating the load control of the
particular destination register selected.
BUS ← C, R1 ← BUS
R1 ← C
The content of register C is placed on the bus, and the content of the bus is loaded into register R 1 by
activating its load control input.
LDA: Load to AC
D4T4: PC AR, SC 0
A numerical example that demonstrates how this instruction is used with a subroutine is shown in nelow
Figure.
Subroutine Call
The BSA instruction performs the operation / function referred to as a subroutine call.
The indirect BUN instruction at the end of the subroutine performs the function referred to as
subroutine return.
The ability to store and execute instructions is called Stored-Program organization, is the important
property of a general-purpose computer.
The simplest way to organize a computer is to have one processor register and an instruction code
format with two parts.
The first part specifies the operation to be performed and the second specifies an address.
The memory address tells the control where to find an operand in memory.
This operand is read from memory and used as the data to be operated on together with the data
stored in the processor register.
There are three Addressing Modes used for address portion of the instruction code:
1. Immediate: the operand is given in the address portion (constant).
2. Direct: the address points to the operand stored in the memory.
3. Indirect: the address points to the pointer (another address) stored in the memory that
references the operand in memory.
One bit of the instruction code can be used to distinguish between direct & indirect addresses.
The instruction code format shown in Figure.
For direct address one reference is needed, for indirect address two references are needed to access
the memory word.
Effective address: the address of the operand in a computation-type instruction or the target address
in a branch-type instruction.
The pointer can be placed in a processor register instead of memory as done in commercial
computers
In the basic computer each instruction is executed by going through a cycle, called Instruction
Cycle.
Instruction Cycle consists of the following phases:
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.
After step 4, the control goes back to step 1 to fetch, decode and execute the next instruction.
This process continues unless a HALT instruction is encountered.
After fetch and decode, instruction type is determined and instruction is executed.
1. Selective-set : The selective-set operation sets to 1, the bits in register A where there are
corresponding 1's in register B. It does not affect bit positions that have 0's in B. The OR
microoperation can be used to selectively set bits of a register.
3. Selective-clear : The selective-clear operation clears to 0, the bits in A, only where there are
corresponding 1's in B.
4. Mask (Delete): The mask operation is similar to the selective-clear operation except that the
bits of A are cleared only where there are corresponding 0' s in B. The mask operation is an
AND microoperation.
5. Clear: The clear operation compares the words in A and B and produces an all 0' s result if
the two numbers are equal. This operation is achieved by an exclusive-OR microoperation
6. Insert: The insert operation inserts a new value into a group of bits. This is done by first
masking the bits to be replaced and then ORing them with the bits to be inserted.
The set of instructions are said to be complete if the computer includes a sufficient number of
instructions in each of the following categories: