I am trying to declare a list of 32-bit binary numbers (1's and 0's) in Python, pick out a number in the list, and shift.
This is how I have my list declared, but I do not feel like this is correct.
myList = [11111011001101011001101011001100, 11111111000011001101001100111111,
11000000111100001111000011110000, 11111111000000001111011100001111]
Now I want to select a number from my list and shift it to the left by 4
Example:
num = myList[0]
example = num << 4
print("original", num)
print("shifted", example)
The output looks like this:
original 11111011001101011001101011001100
shifted 177776176017616176017616176017600
How can I fix my declaration and shifting issues? Thanks