recategorized by
2,668 views

1 Answer

Best answer
5 votes
5 votes

ans is B.

explanation:

Quite very very easy, if you know the functions of XRI and ANI.
XRI stands for XOR Immediate. It tells the processor "I'll give you an operand immediately now, XOR it with the Accumulator and put the result in Accumulator itself".
ANI is similar, it says: "I'll give you an operand immediately now, do an AND operation between it and the Accumulator and put the result in Accumulator itself".
Here, we want to clear some bits. Since XOR operation's output always depends on both the operands, it can't be the answer. So, we're left with (b) and (d).
Now, in the AND operator, if one of the operands is a 1, the result is the value of the other operand.
And if one of the operands is 0, the result is 0, whatever the value of the other operand.
From this, we can see that in order to clear some bits (i.e., set them to 0), we have to AND them with 0.
In the question, they say 'lower four bits', which mean the bits to the right hand side (bits in the right hand side have less value, so are considered 'lower'.) So, in order to clear those bits, the 0's in the operand should also be in the right hand side.
Hence, ANI FOH is the answer. Here, each hexadecimal digit corresponds to four bits, so the operand is actually 1111 0000 in binary. Because of this, the lower four bits get cleared.
 

edited by

Related questions

0 votes
0 votes
1 answer
1
Kathleen asked Oct 8, 2014
3,740 views
A sequence of two instructions that multiplies the contents of the DE register pair by 2 and stores the result in the HL register pair (in 8085 assembly language) is:XCHG...
0 votes
0 votes
0 answers
2
0 votes
0 votes
2 answers
3
Kathleen asked Oct 8, 2014
790 views
The value of $k$ for which $4x^2 – 8xy + ky^2 = 0$ does not represent a pair of straight lines (both passing through the origin) is:0293
2 votes
2 votes
2 answers
4
Kathleen asked Oct 8, 2014
2,513 views
If at every point of a certain curve, the slope of the tangent equals $\frac{-2x}{y}$ the curve isa straight linea parabolaa circlean ellipse