1,885
edits
Changes
→OR
Therefore the bitwise ''OR'' is used to '''set bits''' to a value of 1.
For example, bits 4-:7 can be set to 1 while preserving the remaining bits in a byte by ORing a mask of 11110000 (0xF0):
{|cellspacing="0" cellpadding="5" border="1"
|Output||bgcolor="yellow"|1||bgcolor="yellow"|1||bgcolor="yellow"|1||bgcolor="yellow"|1||bgcolor="yellow"|1||bgcolor="yellow"|0||bgcolor="yellow"|1||bgcolor="yellow"|0
|}
=== AND ===