Privacy Policy

Thursday, 9 May 2013

Gate 2003 & 2004 Questions on Microprocessor

GATE 2003
Two mark Questions:

Question 5:

In an 8085 microprocessor, the instruction CMP B has been executed while the content of the accumulator is less than that of register B. As a result

(a) Carry flag will be set but zero flag will be reset.
(b) Carry flag will be reset but zero flag will be set.
(c) Both Carry flag and zero flag will be reset.
(d) Both Carry flag and zero flag will be set.

Answer: (a)

Explanation:
CMP B -> the contents of B and A are compared and result is indicated by flag.
if(A) < B :: Carry flag is set, Zero flag is reset.
if(A) = B :: Zero flag is set, Carry flag is reset.
if(A) > B :: Carry and Zero flags are reset.

GATE 2004
Two mark Questions.

Question 6:

The 8255 programmable peripheral interface is used as described below.

(i) An A/D converter is interfaced to a microprocessor through an 8255. The conversion is initiated by a signal from the 8255 on Port C. A signal on Port C
     causes data to be strobed into Port A.
(ii) Two computers exchange data using a pair of 8255s. Port A works as a bidirectional data port supported by appropriate handshaking signals.
The appropriate modes of operation of the 8255 for I and II would be

(a) Mode 0 for I and Mode 1 for II
(b) Mode 1 for I and Mode 0 for II
(c) Mode 2 for I and Mode 0 for II
(d) Mode 2 for I and Mode 1 for II

Answer: (d)

Explanation:

Mode '0' doesn't have handshaking facility, only have simple input and output operation facility.
Mode '1' and '2'  have handshaking facility and I/O operation facility too.

Reference:  http://en.wikipedia.org/wiki/Intel_8255

Question 7:

The number of memory cycles required to execute the following 8085 instructions
(I)  LDA 3000H
(II) LXI D, F0F1H
     would be
(a) 2 for (I) and 2 for (II)
(b) 4 for (I) and 3 for (II)
(c) 3 for (I) and 3 for (II)
(d) 3 for (I) and 4 for (II)

Answer: (b)

Explanation:

                     Memory cycles
LDA 3000H --> Fetch, Read, Read, Read
                                    ---------------  --------
                                       address      data

LXI D, F0F1H--> Fetch, Read, Read

Reference: click here

Question 8:

Consider the sequence of 8085 instructions given below:
LXI H, 9258
MOV A, M
CMA
MOV M, A

which one of the following is performed by this sequence?
(a) Contents of location 9258 are moved to the accumulator.
(b) Contents of location 9258 are compared with the contents of accumulator
(c) Contents of location 9258 are complemented and stored in location 9258
(d) Contents of location 5892 are complemented and stored in location 5892

Answer: (c)

Explanation:

LXI H, 9258 => the data is loaded into the Register pair
MOV A, M    => The data in the M(9288) is moved to accumulator
CMA            => The Accumulator data is complemented and stored in            
                          accumulator
MOV M, A   => The data in the Accumulator is stored in M.

Question 9:

It is desired to multiply the numbers 0AH by 0BH and store the result in hte accumulator. The numbers are available in registers B and C respectively. A part of the 8085 program for the purpose is given below:

MVI A 00H
Loop;______
____________
____________
HLT END
The sequence of instruction to the complete the program would be.

(a) JNZ LOOP, ADD B,    DCR C
(b) ADD B, JNZ LOOP,    DCR C
(c) DCR C, JNZ LOOP,     ADD B
(d) ADD B, DCR C,          JNZ LOOP

Answer: d

Explanation:

The question is to multiply two numbers 0AH and 0BH. 
first of all ., In general mathematics the product of 10 and 11 will be equal to 11 times the summation of 10 will be equal to 10 times the summation of 11 which is equal to 110 (i.e) 10*11=10+10+10+10+10+10+10+10+10+10+10=
11+11+11+11+11+11+11+11+11+11=110.

so the program to multiply 0AH and 0B H will be 0BH times the addition of 0AH

Program:


B2001H
AddressMnemonicsOperandopcodeRemarks
2000MVIA, 00H3EInitialize accumulator with 00H
200100Immediate value 00H
2002ADD B80Add B register(0AH) with Accumulator(00H) and store it in Accumulator
2003DCRC0DDecrement C
2004JNZ2002HC2if c is not equal to zero jump to 2002H which add B with A again
200508Lower order of 2008H
200620Higher order of 2008H

The Decrement DCR will Decrement the C register if the C register is zero further decrement will not take place then the zero flag will become 1.
Then the JNZ will not jump to ADD

Reference: Click here

1 comment:

  1. Have you made a transaction from your Binance account and want to delete it quickly because you have made it on the wrong address? Well, such issues are quite scary and should be handled with proper care as it is related to your funds. Hey, you can be relaxed as the team is always active and Garmin express can be reached by calling the team of executivesvia Binance customer care number 1877-330-7540 which is approachable from everywhere and knows all the tricks to release your queries. The choice is yours as the team who is savior, is just one call away from you.

    ReplyDelete