Skip to content
Course Content
Introduction
An introduction to the course, how it flows, and what to expect.
0/3
Reverse Engineering (WIP)

2.5 Operations

There are a few binary operations that you should know about. They are used for all sorts of things as you will see throughout the course. These operations include NOT, AND, OR, and XOR.

NOT

NOT simply flips a bit. In other words, it changes the bit to what it’s not.

  • NOT 1 = 0
  • NOT 0 = 1

Bitwise NOT operation results.

AND

AND checks if both bits are 1 and if they are the result is 1, if not the result is 0.

  • 1 AND 1 = 1
  • 1 AND 0 = 0
  • 0 AND 0 = 0

Bitwise AND operation results.

OR

OR checks if either of the bits is one, if so then the result is one.

  • 1 OR 1 = 1
  • 1 OR 0 = 1
  • 0 OR 0 = 0

Bitwise OR operation results.

XOR

XOR checks if either of the bits is one, but not both, if so then the result is one.

  • 1 XOR 1 = 0
  • 1 XOR 0 = 1
  • 0 XOR 0 = 0

Bitwise XOR operation results. <- Previous Lesson Next Lesson -> Chapter Home