Refactor: Use simple tmp variable names instead of descriptive ones

- Changed nandOut -> tmp
- Changed notA, notB -> tmp1, tmp2
- Changed descriptive names -> tmp1, tmp2, tmp3, etc.

Makes code cleaner and more concise while maintaining functionality.
This commit is contained in:
2025-08-28 14:39:07 +02:00
parent 085a90e4c8
commit ecdc6ab2bc
10 changed files with 36 additions and 36 deletions

View File

@@ -12,9 +12,9 @@ CHIP Xor {
PARTS:
// Xor(a,b) = Or(And(a, Not(b)), And(Not(a), b))
Not(in=a, out=notA);
Not(in=b, out=notB);
And(a=a, b=notB, out=aAndNotB);
And(a=notA, b=b, out=notAAndB);
Or(a=aAndNotB, b=notAAndB, out=out);
Not(in=a, out=tmp1);
Not(in=b, out=tmp2);
And(a=a, b=tmp2, out=tmp3);
And(a=tmp1, b=b, out=tmp4);
Or(a=tmp3, b=tmp4, out=out);
}