बिजनेस मार्केटिंग का लो कॉस्ट फंडा , अपने मोबाइल से ऑटो sms भेजकर मार्केटिंग करे विजिट करे http://autotextsms.com/ बिजनेस मार्केटिंग का लो कॉस्ट फंडा http://autotextsms.com/

Search This Blog

Translate

bitwise programs in c,bitwise operator program in c,bitwise programming in c

  bitwise programs in c,bitwise operator program in c,bitwise programming in c

Explain Bit wise Operators in C Bitwise AND,Bitwise Inclusive OR,Bit wise Exclusive OR,Unary complement (bit inversion),Shift Left,Shift Right,sizeof()

 

Explain Bitwise Operators in C

Bitwise Operators


Bitwise operators modify variables or shifting the bit left or right patterns that represent the values they store.

 

operator asm equivalent description
& AND Bitwise AND
| OR Bitwise Inclusive OR
^ XOR Bitwise Exclusive OR
~ NOT Unary complement (bit inversion)
<< SHL Shift Left
>> SHR Shift Right

sizeof()

This operator will accept one parameter, which can be a variable itself and returns the size of it in bytes of that type or object.

a = sizeof (char);

This will assign the value 1 to a becausechar is a one-byte long type. The value returned by sizeof is a constant, so it is always determined before program execution.

  bitwise programs in c,bitwise operator program in c,bitwise programming in c

C Program example List