I have this code in C++:
#include <iostream>
using namespace std;
int main()
{
unsigned char v1;
v1 = 23 << 6;
cout << "v1: " << (int)v1;
return 0;
}
When I execute it, it gives me result of 192. But when I do the same (23 << 6) in Python I get 1472 instead of 192. What am I doing wrong here? Do you know any method to rewrite this bitshift operation 1:1 to Python?