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.

Mahesh said:   1 decade ago
Can any one explain how?

B.nagendra prasad said:   1 decade ago
First you convert 0B value into binary values after that same 2C value also and add AND operation

0B=0000 1011
2C=0010 1100

and do AND operation = 00001000

Shilpa said:   1 decade ago
Thanks for your explaination.

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

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

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)

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.

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.

Pradip said:   1 decade ago
Truth table.

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

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


Post your comments here:

Your comments will be displayed after verification.