delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/10/07/00:48:32

Message-ID: <361AF2AB.A34BD6B8@montana.com>
Date: Tue, 06 Oct 1998 22:48:43 -0600
From: bowman <bowman AT montana DOT com>
X-Mailer: Mozilla 4.5b2 [en] (Win95; I)
X-Accept-Language: en
MIME-Version: 1.0
To: djgpp AT delorie DOT com
Subject: Re: allocating dword aligned memory with __dpmi_allocate_memory
References: <009301bdf19e$c0093e80$986f19c4 AT default>
Reply-To: djgpp AT delorie DOT com


"StefanViljoen,6599" wrote:
> 
> Hey, what does the tilde "~" do here? "+3)&~4) ?

one's complement. 

4  is 00000100B        (for a byte. all the zeros in a long make me
dizzy)
~4 is 11111011B

then, the & does the bitwise AND, clearing the bit.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019