AND Instruction (Cont.)
| The operands can be 8, 16, or 32 bits, and they must be the same size. For each matching bit in the two operands, the output bit is 1 when both of the input bits are 1; otherwise, it is 0. The table on the right describes the boolean expression . |
|
0 1 1 0 0 0 0 1 = 61h ('a')
0 1 0 0 0 0 0 1 = 41h ('A')
The rest of the alphabetic characters have the same relationship. If we any character with binary, all bits are unchanged except for bit 5, which is cleared.
| Code I: Lowercase 🡆 Uppercase | Code II: Integer 🡆 ASCII |
|
An Execution Example
|
An Execution Example
|
|
Enter a letter: e The letter is E |
Enter a digit: 7 The ASCII is '7' or +55 |
|
“I’m not arguing, I’m just explaining why I’m right.” ― Unknown |