[HN Gopher] Bit Twiddling Hacks (2005)
       ___________________________________________________________________
        
       Bit Twiddling Hacks (2005)
        
       Author : memorable
       Score  : 34 points
       Date   : 2022-10-25 04:47 UTC (2 days ago)
        
 (HTM) web link (graphics.stanford.edu)
 (TXT) w3m dump (graphics.stanford.edu)
        
       | metadat wrote:
       | A classic, this page continues to serve as a top-notch reference
       | on obscure, historical programmer tricks.
        
       | thom wrote:
       | My favourite bit of bit twiddling doesn't seem to appear here -
       | how to enumerate all the subsets of bits set. Like so many bit-
       | twiddling hacks, I first saw this in chess engines:
       | 
       | https://www.chessprogramming.org/Traversing_Subsets_of_a_Set
        
         | [deleted]
        
       | nullc wrote:
       | If you like this, you'll love the book "Hacker's Delight":
       | https://en.wikipedia.org/wiki/Hacker%27s_Delight
        
         | bugfix-66 wrote:
         | And you may enjoy the BUGFIX-66 puzzles, e.g.:
         | 
         | Upside-Down Arithmetic Shift:
         | https://bugfix-66.com/76b563beb6f4e61801fce4e835be862fb3dbbe...
         | 
         | Too Much Padding:
         | https://bugfix-66.com/4873075d23c096af3e6103b1b883f65a32f7b7...
         | 
         | XOR Swap Misguided By Mask:
         | https://bugfix-66.com/762ee0db0776b3450e01cb05622d136db78554...
         | 
         | Fumbling Bit Fields:
         | https://bugfix-66.com/014fee7b1b170fa85315640df44a1049af23a8...
         | 
         | The Bit That Decides It:
         | https://bugfix-66.com/fdb8bb4fa84cf810aa25ff40c88a13c1874410...
         | 
         | Noncontiguous Subtraction (Not Quite):
         | https://bugfix-66.com/adbc40fa7c8c838d8d34bcd35525313dc91dea...
         | 
         | And so on...
        
       ___________________________________________________________________
       (page generated 2022-10-27 23:00 UTC)