♜ Bitboard Techniques: Encoding a Chessboard in 64 Bits
Explore how chess engines represent an 8x8 board as 64-bit integers, using bitwise AND/OR/XOR for instant move and capture calculations, magic bitboards for sliding-piece attacks, and De Bruijn sequences to find the lowest set bit in constant time.
The simulator visualizes a live 8x8 bitboard as a grid of lit and unlit bits, letting you place pieces and watch their occupancy, attack, and capture bitboards update in real time as raw 64-bit hex values and as a lit-square overlay on the board.
🔬 What It Demonstrates
The simulator visualizes a live 8x8 bitboard as a grid of lit and unlit bits, letting you place pieces and watch their occupancy, attack, and capture bitboards update in real time as raw 64-bit hex values and as a lit-square overlay on the board.
🎮 How to Use
Select a piece type and square to toggle bits on the board, then choose an operation (AND, OR, XOR, or shift) to combine two bitboards and see the resulting bit pattern highlighted; a separate sliding-piece panel lets you place blockers and watch the magic-bitboard lookup resolve to the correct attack set instantly.
💡 Did You Know?
Did you know a single 64-bit integer can represent an entire chessboard's occupancy, and that top engines compute millions of legal-move sets per second by relying almost entirely on operations like AND, OR, XOR, and multiply-shift, the same primitives your CPU already executes in a single cycle?
Explore how chess engines represent an 8x8 board as 64-bit integers, using bitwise AND/OR/XOR for instant move and capture calculations, magic bitboards for sliding-piece attacks, and De Bruijn sequences to find the lowest set bit in constant time.
3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install