AND2(9)

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

✨ AND2(9) ✨

okay bestie, gather round, because today we're talking about and2 from the HAL Component collection πŸ’– it's literally a two-input AND gate and it's giving "small but mighty" energy, no cap.


🌸 NAME 🌸

and2 β€” a two-input AND gate πŸ‘‘

πŸŽ€ SYNOPSIS πŸŽ€

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

so you load it with loadrt, and you either say count=N to get N whole copies of it, or you say names=name1[,name2...] and name each one yourself 🫢 (not both, bestie β€” it's one or the other, that | is doing so much work rn)

πŸ¦‹ FUNCTIONS πŸ¦‹

  • and2.N

that's the function, one per instance, and yes the N is a whole thing, we'll get to it πŸ’…

πŸ’œ PINS πŸ’œ

every instance comes with its own lil trio of pins, and the N is wherever you landed, or 0, 1, 2… if you went the count= route 🌈

  • and2.N.in0 β€” type bit, direction in ✨ input numero uno
  • and2.N.in1 β€” type bit, direction in ✨ input numero dos
  • and2.N.out β€” type bit, direction out πŸ’« the one that does the math (well, the logic)

and here's the tea about how out gets computed from in0 and in1 πŸ“:

in0=TRUE in1=TRUE
       out=TRUE

Otherwise,

out=FALSE

that's it. that's the whole vibe. if both inputs are TRUE, out is TRUE. anything else? out is FALSE. periodt πŸ’€βœ¨ (classic AND gate behaviour, we love a predictable icon)

🌟 SEE ALSO 🌟

logic(9), lut5(9), not(9), or2(9), xor2(9) β€” go read the whole friend group, they're all iconic in their own way 🫢

πŸ’– AUTHOR πŸ’–

Jeff Epler β€” thank you for this contribution, king πŸ‘‘

πŸ“œ LICENSE πŸ“œ

GPL β€” free as in freedom, bestie 🌈


and that's the page !! written by the LinuxCNC Documentation girlies on 2026-03-17, filed under AND2(9) πŸ’… mwah, go build something with logic gates, ily πŸŽ€βœ¨

πŸ“¦ where this page comes from