Digital Electronics - The 8051 Microcontroller - Discussion

Discussion Forum : The 8051 Microcontroller - General Questions (Q.No. 24)
24.
The contents of the accumulator after this operation
MOV A,#0BH
ANL A,#2CH
will be
11010111
11011010
00001000
00101000
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
12 comments Page 1 of 2.

SDBANGDE said:   2 years ago
The contents of the accumulator after this operation;

MOV A,#0BH
ANL A,#2CH
will be;

Programm:
MOV A,#0BH; value of '0B' will move to the accumulator.(i.e. A=0B=0000 1011)
ANL A,#2CH; ANDing value of 2C with Accumulator, (i.e. 2C=0010 1100)


ANL is AND logical operation as AND gate truth table.

Finally;
A = 0B = 0000 1011.
A = 2C = 0010 1100 (at last after using AND operation)
A = 0000 1000.
So, Answer: 0000 1000.
(5)

Shiva said:   3 years ago
Thanks all for the explainations. I understood it clearly.

Pk Mandal said:   8 years ago
Thanks for giving the explanation.

Pradip said:   1 decade ago
Truth table.

A B o/p
0 0 0
0 1 0
1 0 0
1 1 1

Gokul said:   1 decade ago
We generally use AND logic to set a particular bit in active high condition.

And OR logic in viceverse condition.

Priya Dharshini said:   1 decade ago
The first command move the immediate value 0B into accumulator,

2nd command do AND operation with the immediate value 2c with Accumulator.

0B= 0000 1011
2c= 0010 1000
-------------
And=0000 1000 it is equivalent to 08.

Arbind said:   1 decade ago
Question is not there to ask why you are using and operation.....

By seeing program u v to do....

First of all.... value of 0b will move to accumulator..
i.e.. A=0B=0000 1011

In 2nd step again the value of 2C will move to accu.. where we r using and operation..
ANL is nothing but logical and operation...

Finally
A=0B=0000 1011
A=2C=0010 1100
at last after using and operation
A=0000 1000 is answer.
(1)

Sansy said:   1 decade ago
AND operation because ANL is 'Logical AND' operation.

Anuradha said:   1 decade ago
Thanks for the explaination but i have a doubt. Why are we using AND operation?

Shilpa said:   1 decade ago
Thanks for your explaination.


Post your comments here:

Your comments will be displayed after verification.