Bitwise operations: Difference between revisions

Content added Content deleted
(+AutoHotkey)
m (→‎{{header|AutoHotkey}}: Minor indentation and casing edit)
Line 149:
bitwise(a, b)
{
msgboxMsgBox % "a and b: " . a & b
msgboxMsgBox % "a or b: " . a | b
msgboxMsgBox % "a xor b: " . a ^ b
msgboxMsgBox % "not a: " . ~a ; treated as unsigned integer
msgboxMsgBox % "a << b: " . a << b ; left shift
msgboxMsgBox % "a >> b: " . a >> b ; arithmetic right shift
}
 
</lang>