PDA

View Full Version : Assembly Language HELP!


phoenixblack
06-03-08, 08:57 AM
Hi,

I am an A-Level student and taking an exam on Thursday. Can someone explain to me how to do the following please:

1. Write an AND instruction to convert any numeric ASCII code stored in the accumulator to its 8-bit binary integer equivalent, where the ASCII code for '0' is 00110000.

2. The accumulator contains an 8-bit integer in the range 0-9. Write an OR instruction to convert it into its equivalent ASCII code.

...and also, what do logical AND and OR instructions do, if not already explained.

Many thanks! :)

ShrpSight
06-04-08, 05:26 AM
Is this for Intel x86 architecture?

Here is the truth tables for AND & OR


AND OR
0 0 | 0 0 0 | 0
0 1 | 0 0 1 | 1
1 0 | 0 1 0 | 1
1 1 | 1 1 1 | 1

So as you can see above that is what the AND OR instructions do. Read more here (http://en.wikipedia.org/wiki/Bitwise_AND)

Hard to believe your claim regarding you being an "A-Level" student and stuck on AND/OR :P.