Mike Green said... 1 << 8
Luis Digital said... Good trick that functions if the base is 2.
codeking said... Luis Digital said... Good trick that functions if the base is 2. Since it's a trick, if yoou do 2 ^ 0, will it give zero as an answer r the correct answer 1?
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.