Jump to content

Bitwise operations: Difference between revisions

no edit summary
m (Added to <20 category)
No edit summary
Line 15:
A : Byte := 255;
B : Byte := 170;
begin
Put("A and B = "); Byte_Io.Put(Item => A and B, Base => 2); New_Line;
Line 165:
\ a \ 7 bitwise # hex literals
 
=={{header|MAXScript}}==
fn bitwise a b =
(
format "a and b: %\n" (bit.and a b)
format "a or b: %\n" (bit.or a b)
format "a xor b: %\n" (bit.xor a b)
format "not a: %\n" (bit.not a)
)
bitwise 255 170
 
=={{header|OCaml}}==
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.