Part 10 - Boolean Instructions

For a complete table of contents of all the lessons please click below as it will give you a brief of each lesson in addition to the topics it will cover. https://github.com/mytechnotalent/Reverse-Engineering-Tutorial

There are four boolean instructions to which exist are AND, OR, XOR and NOT. Earlier in this tutorial we briefly discussed gates which took advantage of the same logic down to the metal. We will see this logic throughout our reversing so it is important to understand what it does down at the individual bit level.

AND = If the first number has a 0 and the second number has a 0, the result is 0.

AND = If the first number has a 0 and the second number has a 1, the result is 0.

AND = If the first number has a 1 and the second number has a 0, the result is 0.

AND = If the first number has a 1 and the second number has a 1, the result is 1.

ex: 0 0 1 0 0 0 1 0 

ex: 0 1 1 0 1 1 1 0

ex:———————

ex: 0 0 1 0 0 0 1 0

OR = If the first number has a 0 and the second number has a 0, the result is 0.

OR = If the first number has a 0 and the second number has a 1, the result is 1.

OR = If the first number has a 1 and the second number has a 0, the result is 1.

OR = If the first number has a 1 and the second number has a 1, the result is 1.

ex: 0 0 1 0 0 0 1 0 

ex: 0 1 1 0 1 1 1 0

ex:———————

ex: 0 1 1 0 1 1 1 0

XOR = If the first number has a 0 and the second number has a 0, the result is 0.

XOR = If the first number has a 0 and the second number has a 1, the result is 1.

XOR = If the first number has a 1 and the second number has a 0, the result is 1.

XOR = If the first number has a 1 and the second number has a 1, the result is 0.

ex: 0 0 1 0 0 0 1 0 

ex: 0 1 1 0 1 1 1 0

ex:———————

ex: 0 1 0 0 1 1 0 0

NOT = If the first number has a 0 the second number becomes 1.

NOT = If the first number has a 1 the second number becomes 0.

ex: 0 0 1 0 0 0 1 0 

ex:———————

ex: 1 1 0 1 1 1 0 1

Next week we will dive into pointers! Stay tuned!

results matching ""

    No results matching ""