As per what you explained above, am I to understand that the code variable is a binary integer? In that case, can I declare it as an int type and perform the left shift operation given? Just to clarify, shift operations can be done on int types, right?
Yes this should work well.
And ofcourse you need to remember or calculate how many bits are actually used for the code, as the int will always be the same number of bits in total (usually 32). And every time you shift left, one more bit is used.