blob: de404ceb18e6755f10c79126c0d282b1fbff562b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#include <stdio.h>
void test(int A, int B, int C, int D) {
int bxor = A ^ B ^ C ^ D;
int bor = A | B | C | D;
int band = A & B & C & D;
int bandnot = (A & ~B) ^ (C & ~D);
int bornot = (A | ~B) ^ (C | ~D);
printf("%d %d %d %d %d\n", bxor, bor, band, bandnot, bornot);
}
int main() {
test(7, 8, -5, 5);
return 0;
}
|