aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony Wang2022-10-14 12:41:42 -0400
committerAnthony Wang2022-10-14 12:41:42 -0400
commitaed3c9a5476a569ff3bd4e99ec3450dfebfd9849 (patch)
tree2b7c4ed7e34c6505adb8538eaecd6e6f30806bea
parentf0a38e712f0c92ac2930a1091bf014756a43e0fd (diff)
Implement NAND
-rwxr-xr-xflipper.py2
-rw-r--r--nand.f4
2 files changed, 4 insertions, 2 deletions
diff --git a/flipper.py b/flipper.py
index f8e5b14..9d06546 100755
--- a/flipper.py
+++ b/flipper.py
@@ -14,8 +14,6 @@ def flip(x, y):
with open(argv[1]) as f:
for line in f.readlines():
l = list(map(int, line.split()))
- if len(l) < 2:
- continue
x = l[0]
for i in range(1, len(l)):
x = flip(x, l[i])
diff --git a/nand.f b/nand.f
new file mode 100644
index 0000000..001e629
--- /dev/null
+++ b/nand.f
@@ -0,0 +1,4 @@
+0 0
+0 0 2
+0 2 1 3
+0 3