Bitwise operations: Difference between revisions

Content added Content deleted
(→‎{{header|Ada}}: Added missing pieces from Bitshift task)
m (→‎{{header|Ada}}: Added a blank line in output between shifting and NOT operator)
Line 25: Line 25:
Put_Line("A xor B = "); Byte_Io.Put(Item => A xor B, Base => 2);
Put_Line("A xor B = "); Byte_Io.Put(Item => A xor B, Base => 2);
Put_Line("Not A = "); Byte_IO.Put(Item => not A, Base => 2);
Put_Line("Not A = "); Byte_IO.Put(Item => not A, Base => 2);
New_Line(2);
Put_Line(Unsigned_8'Image(Shift_Left(A, B))); -- Left shift
Put_Line(Unsigned_8'Image(Shift_Left(A, B))); -- Left shift
Put_Line(Unsigned_8'Image(Shift_Right(A, B))); -- Right shift
Put_Line(Unsigned_8'Image(Shift_Right(A, B))); -- Right shift