Say I have a bit string x = UInt(1) (which is 0x01) and y = UInt(2) (which is 0x02).
Is there a way to concatenate these bit strings using something like x * y so that the resulting bit string would represent 0x01 0x02 and occupy two bytes in memory?
I would like to simply concatenate these two bit strings and use the result as a key to a dictionary, but would rather not allocate an array for it because I do it many times.
You can use a BitVector if you want a larger type. (For larger strings, the CPU will have to process the bit string in chunks, but BitVector mostly hides this from you.)