CodesandTutorials
Home   Programming   Hardware   Networking
 
Next generation website theme is here (black, neon and white color) - Reduces eye strain and headache problems.  

C Categories

Shift Operators

« Previous Point - Bitwise Operators Next Point - Increment & Decrement Operators »

Description

Shift operators shifts the binary bit value of a given number to left or right side.

Types

Left shift operator

  • It is represented by '>>' operator.
  • It shifts each bit to the left by adding 0 to the right of the binary number
  • Eg: Before - 0101001
    After - 1010010

Right shift operator

  • It is represented by '<<' operator.
  • It shifts each bit to the right by adding 0 to the left side.
  • Eg: Before - 0101001
    After - 0010100

« Previous Point - Bitwise Operators Next Point - Increment & Decrement Operators »

Tip Box

Operator precedence

Priority Operator
1st <<
2nd >>

Advertisement

Rate Website
   

 


Terms of Use | Privacy Policy | Contact Us
CodesandTutorials © 2014 All Rights Reserved