Some integers were wrongly signed

Some integers were set as signed, but they need to be unsigned. This
commit solves many issues regarding bitwise operations (in assembly,
signed operations were used, but unsigned should have been used
instead).