pretty sure both work

wvstolzing
link
fedilink
11Y

NAND and XOR aren’t equivalent, though

| X | Y | X NAND Y |
| 0 | 0 | 1        |
| 1 | 0 | 1        |
| 0 | 1 | 1        |
| 1 | 1 | 0        |
| X | Y | X XOR Y |
| 0 | 0 | 0       |
| 1 | 0 | 1       |
| 0 | 1 | 1       |
| 1 | 1 | 0       |

& XOR can be reduced to NAND; not sure if NAND can be reduced to XOR

AntiOutsideAktion [he/him]
link
fedilink
English
0
edit-2
1Y

pretty sure I meant to say nor

myslsl
link
fedilink
21Y

@walthervonstolzing @AntiOutsideAktion

If ya’ll get bored and wanna read more about this, this is a property called functional completeness. I’m pretty sure nand and nor are the only functionally complete binary operators, so xor shouldn’t be functionally complete.

https://en.m.wikipedia.org/wiki/Functional_completeness

Create a post

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.
  • 1 user online
  • 120 users / day
  • 257 users / week
  • 744 users / month
  • 3.72K users / 6 months
  • 1 subscriber
  • 1.48K Posts
  • 32.5K Comments
  • Modlog