Bitwise Operator:

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.


1.write a program to perform bit operations by taking user input.
#include<stdio.h>
void main()
{
    int a,b;
    printf("Enter the First Number= ");
    scanf("%d",&a);
    printf("Enter the second Number= ");
    scanf("%d",&b);
    printf("%d\n",a&b);
    printf("%d\n",a|b);
    printf("%d\n",a^b);
    printf("%d\n",~a);
    printf("%d\n",b<<1);
    printf("%d\n",a>>3);
}

Output: