Bitwise operations: Difference between revisions

No edit summary
Line 997:
 
=={{header|Elena}}==
ELENA 3.2 :
<lang elena>import extensions.
 
Line 1,003 ⟶ 1,004:
bitwiseTest : y
[
console printLine:(self:," and ":,y:," = ":(,self and:y).
console printLine:(self:," or ":,y:," = ":(,self or:y).
console printLine:(self:," xor ":,y:," = ":(,self xor:y).
console printLine:("not ":,self:," = ":(,self inverted).
console printLine:(self:," shr ":,y:," = ":(,self shiftshiftRight:y).
console printLine:(self:," shl ":,y:," = ":(,self shiftshiftLeft:(y negative)).
]
}
Line 1,014 ⟶ 1,015:
program =
[
console readLineTo:(Integer new); bitwiseTest:(console readLineTo:(Integer new)).
].</lang>
{{out}}
Anonymous user