WR Home      Topic Home      Chapter:  1  2  3 
<Previous Next>

Chapter 03

Commonly used bit-manipulation functions

Page 9



Question : WAP to shift all 1 to left and modify the byte

Example:
The bit pattern 01010101
becomes pattern 11110000 <= All ones are shifted to the left

Example:
The bit pattern 1000-0001
becomes pattern 1100-0000 <= All ones are shifted to the left


WR Home      Topic Home      Chapter:  1  2  3 
<Previous Next>