XOR2(9)
π 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. indexNmatches 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
- ubuntu resolute: linuxcnc-uspace 1:2.9.4-2ubuntu4 Β· GFDL-1.1-or-later
- ubuntu stonking: linuxcnc-uspace 1:2.9.4-2ubuntu4 Β· GFDL-1.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms