There are six types of pieces for each side, in total twelve different men. Since only one piece may occupy one [[Squares|square]] at a time, one usually expands the range of piece codes with the Nil-Piece aka empty square, often encoded as zero. Depending on the [[Board Representation|board representation]], some programmers introduce an artificial blocking piece, which surrounds the embedded [[8x8 Board|8x8 boards]] inside a [[10x12 Board|10x12 board]] for cheaper off the board tests in offset [[Move Generation|move generation]].
For cheaper extraction, most programmers prefer distinct coding of piece-types and the color of piece. Quite common is to use three bits to encode the piece-type plus one bit or [[General Setwise Operations#TheTwosComplement|Two's Complement]] (not recommend for languages with zero based array indices, like [[C]], [[Cpp|C++]] or [[Java]]) for the color.
Other programs distinguish not only piece-type and color, but enumerate all 32 pieces from their [[Initial Position|initial position]], which label or code does not change during the course of a game (even after a possible [[Promotions|promotion]] of a pawn) and might be one-to-one associated with the bit-position of a 32-bit [[Piece-Sets|piece set]], and/or are used to index a [[Piece-Lists|piece list]] containing the current [[Squares|square]] the piece resides on.
</pre>
==<span id="Unicode"></span>Unicode==
* [https://en.wikipedia.org/wiki/Chess_symbols_in_Unicode Chess symbols] in [https://en.wikipedia.org/wiki/Unicode Unicode] <ref>, see also the [[https://en.wikipedia.org/wiki/2D Graphics Board#Unicode |UnicodeBoard] representations of [https://en.wikipedia.org/wiki/Chess_symbols_in_Unicode Chess symbols] in two [https://en.wikipedia.org/wiki/Font fonts] {| class="wikitable"|-! Name !! Symbol !! Code point !! HTML (dec) !! HTML ([httpshex)|-| White King || <span style="font-size:150%">♔</span> ||U+2654 || &#9812; || &#x2654;|-| White Queen || <span style="font-size: 150%">♕</en.wikipedia.orgspan> ||U+2655 || &#9813; || &#x2655;|-| White Rook || <span style="font-size: 150%">♖</wikispan> ||U+2656 || &#9814; || &#x2656;|-| White Bishop || <span style="font-size: 150%">♗</Arial_Unicode_MS Arial Unicode MS] and [httpsspan> ||U+2657 || &#9815; || &#x2657;|-| White Knight || <span style="font-size:150%">♘</span> ||U+2658 || &#9816; || &#x2658;|-| White Pawn || <span style="font-size: 150%">♙</en.wikipedia.orgspan> ||U+2659 || &#9817; || &#x2659;|-| Black King || <span style="font-size: 150%">♚</wiki/Tahoma_span> ||U+265A || &#9818; || &#x265A;|-| Black Queen || <span style="font-size: 150%28typeface%29 Tahoma]) by [https:">♛<//en.wikipedia.org/wiki/User:Monedula Monedula], span> ||U+265B || &#9819; || &#x265B;|-| Black Rook [https|| <span style="font-size:150%">♜<//en.wikipedia.org/wiki/Wikimedia_Commons Wikimedia Commons]span> ||U+265C || &#9820; || &#x265C;|-| Black Bishop || <span style="font-size: 150%">♝</refspan>:||U+265D || &#9821; || &#x265D;|-| Black Knight || <span style="font-size: [[FILE:Chess symbols.PNG150%">♞</span> ||U+265E || &#9822; |none|border&#x265E;|text-bottom|linkBlack Pawn || <span style=https"font-size:150%">♟︎<//en.wikipedia.org/wiki/Chess_symbols_in_Unicode]]span> ||U+265F || &#9823; || &#x265F;|}
=See also=