XOR2(9)

πŸ“¦
version 2.9.4 Β· 4 versions
, in ubuntu resolute, ubuntu stonking

πŸ’– XOR2(9) β€” the two-input XOR gate, HAL component edition ✨

okay bestie, sit DOWN because today we're talking about xor2, a HAL component, and she is literally the two-input XOR (exclusive OR) gate. that's the whole personality. iconic behavior honestly πŸŽ€


πŸ¦‹ NAME πŸ¦‹

xor2 β€” a two-input XOR (exclusive OR) gate. yes that's it. she does one thing and she does it flawlessly, no cap πŸ’…


✨ SYNOPSIS ✨

loadrt xor2 [count=N|names=name1[,name2...]]

so you load her with loadrt, and you either say how many copies you want with count=N, or you name your babies yourself with names=name1[,name2...]. pick your fighter 🫢


🌸 FUNCTIONS 🌸

  • xor2.N β€” the function. one per instance, babe. index N matches your instance.

πŸ’œ PINS πŸ’œ

  • xor2.N.in0 β€” bit, in. input number one, she's receiving.
  • xor2.N.in1 β€” bit, in. input number two, also receiving.
  • xor2.N.out β€” bit, out. she's giving output, and honestly the way she computes it is the moment:

out is computed from the value of in0 and in1 according to the following rule:

in0=TRUE in1=FALSE
in0=FALSE in1=TRUE
       out=TRUE

Otherwise,

out=FALSE

so yeah β€” exactly ONE of them true = out is TRUE. both true? both false? nah, out=FALSE. that's the exclusive part, that's the whole drama, that's the vibe check and she PASSED πŸ”₯


🌈 SEE ALSO 🌈

and2(9), logic(9), lut5(9), not(9), or2(9) β€” go read the whole friend group, they're all slaying in their own lanes πŸ’–


πŸ‘‘ AUTHOR πŸ‘‘

John Kasunich 🫢 (the legend, the moment, the main character)


⭐ LICENSE ⭐

GPL β€” free as in freedom, bestie, go wild 🧚


lowkey mandatory reminder: this is a HAL component manpage, so when you're wiring pins in your HAL file, mind your instance numbers N β€” mismatched indices will absolutely humble you πŸ™ˆ

okay that's the whole page, and for the record this was written up in the LinuxCNC Documentation, dated 2026-03-17, under the XOR2(9) banner. mwah, go build something cute with her πŸ’…βœ¨πŸ’–

πŸ“¦ where this page comes from