A tetra-sexagesimal and decimal converter
Tetra-sexagesimal is a number system that is base 64. The digits include 0-9 and a whole deck of poker cards as listed out below:
0 1 2 3 4 5 6 7 8 9
🃏
This is similar to conversions between any number systems. Our converter has two components: the JavaScript part that does the conversion and the HTML part that does the I/O.
Firstly, you need to determine the suit order.
The ranking can be alphabetical (
Except for the ten arabic numbers (0-9), the poker cards are typed using key sequences.
10 in a card suit is typed with T
Two jokers are typed with JH and JL (as high and low)
For example, a whole suit of
CA C2 C3 C4 C5 C6 C7 C8 C9 CT CJ CQ CK
Suppose we choose the alternating colour (
Decimal -> Tetra-sexagesimal -> typing
0 (DEC) -> 0 (TET) -> 0
10 (DEC) ->
19 (DEC) ->
62 (DEC) -> 🃏(TET) -> JL
64 (DEC) -> 10 (TET) -> 10
100 (DEC) -> 1
129 (DEC) -> 21 (TET) -> 21
256 (DEC) -> 40 (TET) -> 40
1024 (DEC) ->
4096 (DEC) -> 100 -> 100
262,144 (DEC) -> 1000 -> 1000
Do you see the biggest advantage of tetra-sexagesimal? It's so compact!!!
TBD