← ♜ Algorithms

♜ Bitboard Techniques: Encoding a Chessboard in 64 Bits

Compute Time:
Legal Moves:
Drag — rotate · Scroll — zoom

♜ Bitboard Techniques: Encoding a Chessboard in 64 Bits

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?