简体   繁体   中英

How to store 64bit number (bitboard)

I wanted to play around with bitboards for presenting a chessgame. For presenting a chessgame, i need at least 12, but preferable 14 bitboards with values like:

00000000 00000000 00000000 00000000 00000000 00000000 11111111 11111111

What kind of datatype needed here? I thought i could save it as a biginteger but then i converts to a numerical value?

You can use the BIT type to store bit fields.

The type BIT(14) will store a field of 14 bits. You write to these fields using the notation b'01001' .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM