# 3 bit to 2 trit mapping scheme derivation

3 bit data can be converted to 2 bit trit to increase the bandwidth efficiency. I don't know how did one come up with such mapping technique. Is there any derivation for this? Will this mapping scheme result in unique codes?

• All you're doing is expressing a number in a different base. 3 binary (base-2) digits (bits) give you 8 unique values, while 2 trinary (base-3) digits (trits) give you 9 unique values. Feb 12 at 13:16
• So, 000b -> 00t, 001b -> 01t, 010b -> 02t, 011b -> 10t, 100b -> 11t, ... , 111b -> 21t. There is no corresponding 3-bit binary for 22t because that represents 8 (decimal), and you need 4 binary bits to express that (1000b). Feb 12 at 13:19
• Thanks @brhans . Actually I got confused, because many places I've seen people using 000b -> -1-1t, 001b -> -10t, 010b -> -11t, 011b -> 0-1t, 100b -> 01t, 101b -> 1-1t, 110 -> 10t, 111 -> 11t. It is mentioned everywhere since 00 pattern will not be helpful for clock recovery hence it's not used. Are you aware of this ?
– Isha
Feb 13 at 8:13