Jump to content

Bitwise operations: Difference between revisions

m
→‎{{header|Ada}}: added code highlighting
No edit summary
m (→‎{{header|Ada}}: added code highlighting)
Line 8:
The following program performs all required operations and prints the resulting values in base 2 for easy checking of the bit values.
 
<ada> with Ada.Text_Io; use Ada.Text_Io;
procedure Bitwise is
Line 21:
Put("A xor B = "); Byte_Io.Put(Item => A xor B, Base => 2); New_Line;
Put("Not A = "); Byte_IO.Put(Item => not A, Base => 2); New_Line;
end bitwise;</ada>
 
The output of this program is:
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.