<s>
In	O
the	O
C	B-Language
programming	I-Language
language	I-Language
,	O
operations	O
can	O
be	O
performed	O
on	O
a	O
bit	O
level	O
using	O
bitwise	O
operators	B-Language
.	O
</s>
<s>
Bitwise	O
operations	O
are	O
contrasted	O
by	O
byte-level	B-Application
operations	O
which	O
characterize	O
the	O
bitwise	O
operators	B-Language
 '	O
logical	O
counterparts	O
,	O
the	O
AND	O
,	O
OR	O
,	O
NOT	O
operators	B-Language
.	O
</s>
<s>
Instead	O
of	O
performing	O
on	O
individual	O
bits	O
,	O
byte-level	B-Application
operators	B-Language
perform	O
on	O
strings	O
of	O
eight	O
bits	O
(	O
known	O
as	O
bytes	B-Application
)	O
at	O
a	O
time	O
.	O
</s>
<s>
The	O
reason	O
for	O
this	O
is	O
that	O
a	O
byte	B-Application
is	O
normally	O
the	O
smallest	O
unit	O
of	O
addressable	O
memory	O
(	O
i.e.	O
</s>
<s>
data	O
with	O
a	O
unique	O
memory	B-General_Concept
address	I-General_Concept
)	O
.	O
</s>
<s>
This	O
applies	O
to	O
bitwise	O
operators	B-Language
as	O
well	O
,	O
which	O
means	O
that	O
even	O
though	O
they	O
operate	O
on	O
only	O
one	O
bit	O
at	O
a	O
time	O
they	O
cannot	O
accept	O
anything	O
smaller	O
than	O
a	O
byte	B-Application
as	O
their	O
input	O
.	O
</s>
<s>
All	O
of	O
these	O
operators	B-Language
are	O
also	O
available	O
in	O
C++	B-Language
,	O
and	O
many	O
C-family	B-Language
languages	O
.	O
</s>
<s>
C	B-Language
provides	O
six	O
operators	B-Language
for	O
bit	B-Algorithm
manipulation	I-Algorithm
.	O
</s>
<s>
For	O
instance	O
,	O
working	O
with	O
a	O
byte	B-Application
(	O
the	O
char	O
type	O
)	O
:	O
</s>
<s>
There	O
are	O
two	O
bitwise	O
shift	O
operators	B-Language
.	O
</s>
<s>
However	O
,	O
do	O
note	O
that	O
a	O
shift	O
operand	O
value	O
which	O
is	O
either	O
a	O
negative	O
number	O
or	O
is	O
greater	O
than	O
or	O
equal	O
to	O
the	O
total	O
number	O
of	O
bits	O
in	O
this	O
value	O
results	O
in	O
undefined	B-Language
behavior	I-Language
.	O
</s>
<s>
Typical	O
usage	O
of	O
a	O
right	O
shift	O
operator	O
in	O
C	B-Language
can	O
be	O
seen	O
from	O
the	O
following	O
code	O
.	O
</s>
<s>
However	O
,	O
do	O
note	O
that	O
a	O
shift	O
operand	O
value	O
which	O
is	O
either	O
a	O
negative	O
number	O
or	O
is	O
greater	O
than	O
or	O
equal	O
to	O
the	O
total	O
number	O
of	O
bits	O
in	O
this	O
value	O
results	O
in	O
undefined	B-Language
behavior	I-Language
.	O
</s>
<s>
C	B-Language
provides	O
a	O
compound	O
assignment	O
operator	O
for	O
each	O
binary	O
arithmetic	O
and	O
bitwise	O
operation	O
.	O
</s>
<s>
The	O
bitwise	O
assignment	O
operators	B-Language
are	O
as	O
follows	O
.	O
</s>
<s>
Four	O
of	O
the	O
bitwise	O
operators	B-Language
have	O
equivalent	O
logical	O
operators	B-Language
.	O
</s>
<s>
However	O
,	O
logical	O
operators	B-Language
treat	O
each	O
operand	O
as	O
having	O
only	O
one	O
value	O
,	O
either	O
true	O
or	O
false	O
,	O
rather	O
than	O
treating	O
each	O
bit	O
of	O
an	O
operand	O
as	O
an	O
independent	O
value	O
.	O
</s>
<s>
Logical	O
operators	B-Language
consider	O
zero	O
false	O
and	O
any	O
nonzero	O
value	O
true	O
.	O
</s>
<s>
Another	O
difference	O
is	O
that	O
logical	O
operators	B-Language
perform	O
short-circuit	O
evaluation	O
.	O
</s>
<s>
The	O
table	O
below	O
matches	O
equivalent	O
operators	B-Language
and	O
shows	O
a	O
and	O
b	O
as	O
operands	O
of	O
the	O
operators	B-Language
.	O
</s>
<s>
!=	O
has	O
the	O
same	O
truth	O
table	O
as	O
^	O
but	O
unlike	O
the	O
true	O
logical	O
operators	B-Language
,	O
by	O
itself	O
!=	O
is	O
not	O
strictly	O
speaking	O
a	O
logical	O
operator	O
.	O
</s>
