# Bitwise NOT operator

**URL:** <https://forum.kirupa.com/t/bitwise-not-operator/168146>\
**Category:** Uncategorized\
**Created:** [November 4, 2005, 9:18am UTC](https://forum.kirupa.com/t/bitwise-not-operator/168146 "2005-11-04T09:18:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Flashmatazz](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/flashmatazz/32/140_2.png) [@Flashmatazz](https://forum.kirupa.com/u/Flashmatazz)\
**Post date:** [November 4, 2005, 9:18am UTC](https://forum.kirupa.com/t/bitwise-not-operator/168146/1 "2005-11-04T09:18:10Z")

</div>

I was reading this: [http://www.macromedia.com/devnet/flash/articles/bitwise\_operators\_03.html](http://www.macromedia.com/devnet/flash/articles/bitwise_operators_03.html)

and it says:

> With a bitwise NOT operator, I would get 6 back. This is because the bitwise NOT flips each bit in the binary representation of 9 separately, so 1001 (9 in binary) becomes 0110, which is 6 in decimal.

However:

```auto

trace (~9);

```

traces: -10

Am I misunderstanding something here? How does this bitwise operator operate exactly??
