Bitwise operations: Difference between revisions
Content added Content deleted
imported>Acediast (→{{header|COBOL}}: Added implication and equivalence (this is entirely theoretical; only Micro Focus supports this atm)) |
imported>Acediast (→{{header|COBOL}}: Fixed to display properly.) |
||
Line 2,883: | Line 2,883: | ||
COMPUTE result = B-NOT (a B-XOR b) |
COMPUTE result = B-NOT (a B-XOR b) |
||
DISPLAY "Logical equivalence of a and b is " result |
DISPLAY "Logical equivalence of a and b is " result-disp |
||
COMPUTE result = (B-NOT a) B-AND b |
COMPUTE result = (B-NOT a) B-AND b |
||
DISPLAY "Logical implication of a and b is " result |
DISPLAY "Logical implication of a and b is " result-disp |
||
*> Shift and rotation operators were only added in COBOL 2023. |
*> Shift and rotation operators were only added in COBOL 2023. |