Table Of Contents

Bitwise AND (&)

<aside> 💡 Bitwise AND is used on 2 number’s bitstrings. If those bitstrings, when lineup as shown in the drawing, are 1 && 1 (true && true), then it should be 1.

</aside>

IMG_F2EE2A70F4A4-1.jpeg

Bitwise OR (|)

<aside> 💡 Bitwise OR is used on 2 number’s bitstrings. If those bitstrings, when lineup as shown in the drawing, have a 1 (whether that be 0 or 1, 1 or 1, 1 or 0), then it should be 1. So long as there’s a one somewhere, it will result in 1

</aside>

IMG_57EE21FA8037-1.jpeg

Bitwise XOR (^)

<aside> 💡 Bitwise XOR works on two number’s bitstrings. If those bitstrings, when lineup as shown in the drawing, have a 1 and a 0, then it should be 1.

</aside>

IMG_F61358BC7B97-1.jpeg

Bitwise NOT (~)

<aside> 💡 Bitwise NOT works on one number’s bitstring. It will give the one’s complement of that number’s bitstring by flipping 1s to 0s and flipping 0s to 1s.

</aside>

IMG_F9BA7256EDBF-1.jpeg

Shifts

Left Shift

<aside> 💡 A left shift involves shifting $n$ bits to the left.

</aside>

IMG_E48417016A5D-1.jpeg

Logical Right Shift

<aside> 💡 A logical right shift involves shifting $n$ bits to the right.

</aside>