Basic Bitwise Operations: AND, OR, XOR, NOT, LEFT and RIGHT SHIFT

bitwise-operation
and-operation
or-operation
not-operation
xor-operation
left-shift-operation
right-shift-operation

(Team) #1

Reading time: 15 minutes

It is a well-known fact that computers do not interpret numbers and other data like we do. They understand only binary, which is a dual system composed only of 0s and 1s. Programming languages provide an interface between the programmer and the system, converting whatever data we deal with into binary so that it can be processed by the computer, and then converting the result back into a form we can understand (usually decimal (base10) but also sometimes octal (base8) or hex (base16)).


This is a companion discussion topic for the original entry at http://iq.opengenus.org/basic-bitwise-operations-and-or-xor-not-left-right-shift/