Embedded C interview Question
What is Bit manipulation and Byte manipulation ?Answer
Setting, clearing, checking, inverting are the bit manipulation technique normally done inany embedded software, refer the following for how it will be done
1. Check to see bit 7 is set: IF (BITS & (1<< 6))
2. Set bit 7: BITS | = (1<< 7)
3. Clear Bit 7: BITS & =~ (1<<7)
4. Toggle Bit 7: BIT ^ = (1 << 7)
No comments:
Post a comment