aboutsummaryrefslogtreecommitdiffstats
path: root/test/monniaux/nand/nand.c
blob: bcd30396880b5faa7db53254b496ad8d9c22263b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <stdio.h>

unsigned not(unsigned x) {
  return ~x;
}

unsigned nand(unsigned x, unsigned y) {
  return ~(x & y);
}

int main() {
  unsigned x = 0xF4, y = 0x33;
  printf("%X\n", nand(x, y));
}