Hacker News new | past | comments | ask | show | jobs | submit login

One of my earliest exposures to the power of bitwise operators happened when I was learning to write chess engines. This was right around the time 64 bit processors were hitting the markets, which allowed storing one bit of information per square, making it ideal for efficient processing via bitwise operators. There were some clever operations that allowed finding sliding piece collisions in only a few assembly instructions (with prodigious use of BSR and BSF) and a small amount of precomputed memory.

For anyone interested in binary chess math:

https://www.chessprogramming.org/Bitboards#General_Bitboard_...




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: