Bitwise Operators in C


The bitwise operators are the operators used to perform the operations on the data at the bit-level. When we perform the bitwise operations, then it is also known as bit-level programming. It consists of two digits, either 0 or 1. It is mainly used in numerical computations to make the calculations faster.

Source Code

//Bitwise Operators
 
int main()
{
    int a=25,b=45,c;
    printf("\n Bitwise And : %d",a&b);
    printf("\n Bitwise Or  : %d",a|b);
    printf("\n Bitwise Xor : %d",a^b);
    printf("\n Bitwise Not : %d",~a);
    a=16;
    b=a<<2;
    c=a>>2;
    printf("\n Left Shift  : %d",b);
    printf("\n Right Shift : %d",c);
    return 0;
}
 
 
To download raw file Click Here

List of Programs


Sample Programs


Switch Case in C


Conditional Operators in C


Goto Statement in C


While Loop Example Programs


Looping Statements in C

For Loop Example Programs


Array Examples in C

One Dimensional Array


Two Dimensional Array in C


String Example Programs in C


Functions Example Programs in C


Learn All in Tamil © Designed & Developed By Tutor Joes