lui loadstothefront zeroesbehind
bi loadstothebackzeroes infront
Topic V07
Large Constants
1
, AND Operations
s
You have:
(example)
0 0 1 0 1 1 0 0 1 0 0 1 1 1 0 1 0 0 1 1 1 1 0 1 1 1 0 0 0 0 1 0
0 You want:
s1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 1 1 0 1
1
First AND s0 bitwise with a mask to make all unwanted bits equal zero:
s 0 0 1 0 1 1 0 0 1 0 0 1 1 1 0 1 0 0 1 1 1 1 0 1 1 1 0 0 0 0 1 0
blocks
0s parts
t0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 at so usin
teth
0 0 0 0 0 0 0 0 0 1 0 0 1 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0and
t
1
fi with 1
Now you shift the result 16 bits to the right:
s 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 1 1 0 1
1
You can't AND with such a large constant
2
bi loadstothebackzeroes infront
Topic V07
Large Constants
1
, AND Operations
s
You have:
(example)
0 0 1 0 1 1 0 0 1 0 0 1 1 1 0 1 0 0 1 1 1 1 0 1 1 1 0 0 0 0 1 0
0 You want:
s1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 1 1 0 1
1
First AND s0 bitwise with a mask to make all unwanted bits equal zero:
s 0 0 1 0 1 1 0 0 1 0 0 1 1 1 0 1 0 0 1 1 1 1 0 1 1 1 0 0 0 0 1 0
blocks
0s parts
t0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 at so usin
teth
0 0 0 0 0 0 0 0 0 1 0 0 1 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0and
t
1
fi with 1
Now you shift the result 16 bits to the right:
s 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 1 1 0 1
1
You can't AND with such a large constant
2