![]() |
|
#2
|
|||
|
|||
|
Hello 3ch0,
First, I have to admit that book mess up a lot what AND/OR/XOR is. It's a simple concept that is hidden in that text line ![]() About ORing, well, I guess the the author wants to say OR-ing (verb finished in -ing) (that磗 english i suppose ). So, that's the same as saying: "Apply the OR operator..."My explanation about this: OR = binary add 0 or 0 = 0 1 or 0 = 1 0 or 1 = 1 1 or 1 = 1 AND = binary multiply 0 and 0 = 0 0 and 1 = 0 1 and 0 = 0 1 and 1 = 1 XOR = exclusive OR 0 xor 0 = 0 0 xor 1 = 1 1 xor 0 = 1 1 xor 1 = 0 So, using this 3 operators you can play with the bits in a registry/memory as you like. For example, suppose that you have in the EAX register a value. If you want to know if that number is odd or even you can make the following: and eax, 1 ; will leave the bit-0 untouched to check if even or odd .if eax == 1 ; we are odd! .else ; we are even! .endif Hope this helps
Last edited by peleon; 05-12-2004 at 14:56. |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Assembly ... these might be useful to someone | yaa | General Discussion | 6 | 04-28-2005 18:17 |
| Assembly obfusscation | Zigmund | General Discussion | 6 | 04-23-2004 01:14 |