C Programming Code Examples C > Mathematics Code Examples Program to Multiply given Number by 4 using Bitwise Operators Program to Multiply given Number by 4 using Bitwise Operators This C Program multiplies given number by 4 using bitwise operators. The bitwise operators are or, and, xor, not, left shift, right shift. Program uses left shift operator for this. #include <stdio.h> void main() { long number, tempnum; printf("Enter an integer \n"); scanf("%ld", &number); tempnum = number; /* left shift by two bits */ number = number << 2; printf("%ld x 4 = %ld\n", tempnum, number); }