Table of Contents
This lesson introduces the tilde '~' character. This is applied to a single operand and inverts each input operand's bit.
This is the same as the NOT gate we studied in the digital electronics chapter shown below:
What is the Bitwise NOT operator?
The Bitwise NOT operator is denoted by
The Bitwise operator evaluates the binary representation of the value of a single input. The Bitwise complement of the binary representation is determined for each bit in the binary representation. If the bit contains 1, the output will be 0 for that bit location. If the bit contains 0, the output will be 1.
- 1 => yields 0
- 0 => yields 1
Bitwise ~ Table
Let’s see some of the Bitwise
NOT operator examples in the next lesson.
Gopi Gorantala Newsletter
Join the newsletter to receive the latest updates in your inbox.