Re: Bitwise NOT
- From: Jon Skeet [C# MVP] <skeet@xxxxxxxxx>
- Date: Tue, 24 May 2005 17:38:46 +0100
Aamir Mahmood <a@xxx> wrote:
> how can i perform a bitwise NOT on a int or long or uint type variable?
> so that the bits should be inverted in the result.
~ is the bitwise not operator. For instance:
uint x = 0x1234;
uint y = ~x;
y is now 0xffffedcb
--
Jon Skeet - <skeet@xxxxxxxxx>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
.
- References:
- Bitwise NOT
- From: Aamir Mahmood
- Bitwise NOT
- Prev by Date: Re: New C# Developers Group
- Next by Date: Seting ntfs persmission of a remote folder with wmi from a web app
- Previous by thread: Re: Bitwise NOT
- Next by thread: Seting ntfs persmission of a remote folder with wmi from a web app
- Index(es):
Relevant Pages
|