By Using minimum number of bits assign a binary code in some orderly manner to the 52 playing cards.
In a deck of 52 cards, we have 13 diamonds, 13 hearts, 13 clubs and 13 spades.
To represent a deck of 52 cards, we need 6 bits (
Here only 52 out of 64 patterns are used.
Let the most significant bits select the suit of card, where 00 represents diamond, 01 represents hearts, 10 represents clubs, and 11 represents spades.
The remaining 4 bits selects the number of the cards (ace to 10), where 1011(11) represents jack, 1100(12) represents queen and 1101(13) represents king.
For example, 00_ 1011 represents a Jack of diamond.
x=6
i.e 6 bits are required.