This is pretty standard ( or at least used to be 20 years ago ) in high performance chess programming, see
https://www.chessprogramming.org/Bitboards
https://healeycodes.com/visualizing-chess-bitboards