I'm trying to understand a program that I have disassembled. I'm understanding it so far.
However, I do not understand why the program is AND'ing an integer with 0x7F. It also likes to AND an integer with 0xFF. The program is somewhat of a random number generator.
What does this accomplish?
I think AND'ing with 0xFF takes the lower byte (of a register) and discards the rest?
Specifically in MIPS ASM:
## r2 = 0xfd r3 = 0x10 ##
andi r2,r2,0x00ff # What? Why?
andi r3,r3,0x007f # What? Why?