Question: Consider three 8 - bit numbers X , NUM 1 and NUM 2 are stored in internal data RAM locations 2 0 H , 2

Consider three 8-bit numbers X, NUM1 and NUM2 are stored in internal data RAM locations 20H,21H and 22H respectively.
Write an 8051-assembly language program to compute the following
if X is equal to 0; then LSB of NUM1(AND) LSB of NUM2
if X is equal to 1; then MSB of NUM1(OR) MSB of NUM2
if X is equal to 2; then complement MSB of NUM1
else do nothing store the bit results in RES, where RES is MSB of 23 H locations.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!