I have an 8-bit input A and also 3-bit input n. I want to shift A n times to left or right but this code doesn't seem to work (the output is x):
w = A << n;
But when i put an integer like 2 instead of n, the code works without problem. So how to convert n to an integer value so the shift operation can work without problem?