It is just a representation of AND which does its work on the bits of the operands rather than the truth value of the operands. The bitwise AND operator is a single ampersand: &. This applies to bitwise operators as well, which means that even though they operate on only one bit at a time they cannot accept anything smaller than a byte as their input.Īll of these operators are also available in C++, and many C-family languages.Ĭ provides six operators for bit manipulation. The reason for this is that a byte is normally the smallest unit of addressable memory (i.e. Instead of performing on individual bits, byte-level operators perform on strings of eight bits (known as bytes) at a time. In the C programming language, operations can be performed on a bit level using bitwise operators.īitwise operations are contrasted by byte-level operations which characterize the bitwise operators' logical counterparts, the AND, OR, NOT operators. Operations transforming individual bits of integral data types
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |