From 778b75e7a866ef0e7978dcd1124a8a1f1759ebbc Mon Sep 17 00:00:00 2001 From: Epagris Date: Thu, 16 Oct 2025 13:20:59 +0200 Subject: [PATCH] - toDNF() corrected --- class/LogicFunction.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/class/LogicFunction.php b/class/LogicFunction.php index c1ae9cf..e2750fc 100644 --- a/class/LogicFunction.php +++ b/class/LogicFunction.php @@ -243,7 +243,7 @@ class LogicFunction implements JsonSerializable if ($r == "1") { $term = "("; for ($j = 0; $j < $N; $j++) { - $inv = (($i >> ($N - $j - 1)) & 1) ? "~" : ""; + $inv = (($i >> ($N - $j - 1)) & 1) ? "" : "~"; $term .= $inv . $this->input_vars[$j]; if ($j < ($N - 1)) { $term .= " & ";