Вы находитесь на странице: 1из 5

LPU

ASSIGNMENT
NO3
OF
INTRODUCTION TO
COMPUTER
ORGANISATION &
ARCHITECTURE

SUBMITTED TO
SUBMITTED BY
KETAN SOOD
VARUN KATOCH
E3801
B53
BC
A-MCA

Q1. How is I bit useful in determining the type of instruction

Ans:

There are three types of basic computer instruction format:


a)memory reference instruction
b)register reference instruction
c)input output instruction

the instruction format is of 16 bits and 1 bit is used for addressing mode I,3 bit is used for the
operation code(opcode) and the remaining 12 bits is depend upon the opcode encountered.

I=0 for direct address .


I=1 for indirect address.
15 14 12 11 0
I Opcode address
When the value of opcode varies from 000 through 110 then it will be the memory reference
instruction and the bit in position 15 is taken as addressing mode I.

15 14 12 11 0
0 111 address

When opcode=111 and I=0 then it is register reference instruction.

15 14 12 11 0
0 111 address
When opcode=111 and I=1 thein it is input output instruction.

Q2. Why is micro programmed control better than hardwired? Identify some situations when
hardwired is preferred.
Ans. It is well known that most computers today are micro-programmed. The reason is basically
one of flexibility. Once the control unit of a hard-wired computer is designed and built, it is
virtually impossible to alter its architecture and instruction set. In the case of a micro-
programmed computer, however, we can change the computer's instruction set simply by altering
the microprogram stored in its control memory. In fact, taking our basic computer as an example,
we notice that its four-bit op-code permits up to 16 instructions. Therefore, we could add seven
more instructions to the instruction set by simply expanding its microprogram. To do this with
the hard-wired version of our computer would require a complete redesign of the controller
circuit hardware.

Another advantage to using micro-programmed control is the fact that the task of designing the
computer in the first place is simplified. The process of specifying the architecture and
instruction set is now one of software (micro-programming) as opposed to hardware design.
Nevertheless, for certain applications hard-wired computers are still used. If speed is a
consideration, hard-wiring may be required since it is faster to have the hardware issue the
required control signals than to have a "program" do it.

Q3. Show the contents of E, A, Q and SC during the process of division of two binary numbers,
10100011 by 1011.

Ans:-
Here Divisor B=1011 BC =0100 which is Complement of B
C
B +1=0101

E A Q SC

Dividend in AQ 0 1010 0011 100

Shl EAQ 1 0100 0110

Add BC+1, remove Carry +0101

E=1 1 1001

E=1,Set Qn=1 1 1001 0111 011

Shl EAQ 1 0010 1110

Add BC+1, remove Carry +0101

E=1 1 0111

E=1, Set Qn=1 1 0111 1111 010


Shl EAQ 0 1111 1110

Add BC+1, Carry To E 0 +0101

E=1 1 0100 1110

E=1, Set Qn=1 1 0100 1111 001

Shl EAQ 0 1001 1110

Add BC+1, Carry To E 0 +0101

E=0 0 1110 1110

E=0, Leave Qn=0 0 1110 1110

Add B, Carry To E 0 +1011

E=1 1 1001

Remainder 1 1001 1110 100

Neglect E

A: 1001

Q: 1110

Q4. Show that adding B after A+B+1 restores the original value of A. What should be done with
end carry?
Ans:-

A +~B + 1 performs:
A + 2n – B = 2n + A – B
adding B:
(2k + A – B) + B = 2n + A
remove end-carry 2n to obtain A.

Q5. Perform BCD addition and subtraction of 1254 and 456.


Ans:-
Bcd addition:-

1245 0001 0010 0100 0101


+456 0101 0100 0100
─── ─── ─── ─── ───
789 0001 0111 1010 1001
0110 0110
─── ───
0000 0001
Bcd subtraction:-

here the 10’s complement method is used for bcd subtraction.and if sum is greater than 9 than we
add 6(0110)

1245 0001 0010 0100 0101


- 456 1001 0101 0100 0100
─── ─── ─── ─── ───
789 1010 0111 1000 1001
0110
─────
0000

Carry =1 which is discarded.


So subtraction is =789

Q6. Why is it necessary to consider the case of divide overflow?


Ans:
The division operation may result in a quotient with an overflow. this is not a problem when
working with pen or pencil but it is critical when the operation is implemented with hardware.
therefore it is necessary to consider the case of divide overflow. this is becaue the length of
register is finite and will not hold a number that exceeds standard length.
when the dividend is twice as long as the divisor, the condition for overflow can
be stated as follows:
A divide overflow condition can occur if the higher order half bits of the dividend constitute a
number greater than or equal to divisor. another problem is division by zero must be avoided..
the divide overflow condition takes care of the condition as well to check whether the dividend
is greater than or equal to divisor therefore it is mandatory to consider the case of division
overflow

Вам также может понравиться