NAND
Not AND: 否定論理積
NANDゲートのみで全ての
論理ゲート
を構成できる
NOTを構成して、
ド・モルガンの法則
で作っていく
code:jl
not_bynand(a) = nand(a, a)
and_bynand(a, b) = nand(a, b) |> not_bynand
function or_bynand(a, b)
a = not_bynand(a)
b = not_bynand(b)
return nand(a, b)
end
nor_bynand(a, b) = or_bynand(a, b) |> not_bynand
ft =
false, true
not_bynand(a) for a in ft
==
!a for a in ft
and_bynand(a, b) for a in ft, b in ft
==
a && b for a in ft, b in ft
or_bynand(a, b) for a in ft, b in ft
==
a || b for a in ft, b in ft
nor_bynand(a, b) for a in ft, b in ft
==
a ⊽ b for a in ft, b in ft
https://nandgame.com/
https://x.com/hsjoihs/status/1856074378892681524