Spin math
codeking
Posts: 39
2^8
How would I do that in spin?
How would I do that in spin?
Comments
Good trick that functions if the base is 2.
x := |< 8
This one is often found standing solo in the context of forming 32 bit pin mask for instructions like WAITPEQ
|< 8
%0000000_00000000_00000001_00000000
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
Since it's a trick, if yoou do 2 ^ 0, will it give zero as an answer r the correct answer 1?
1 << 0
1
<< (SHL in Pascal) is Bitwise Shift Left Operator.
Why 1<< 0 is equal to 1?
Because I do not move anything to the left.
Wow, I have found a good tutor of assembler with drawings.
http://chortle.ccsu.edu/AssemblyTutorial/Chapter-12/ass12_2.html
Someone asked for one some day ago, I expect that serve of something.