mirror of
https://github.com/soconnor0919/eceg431.git
synced 2025-12-11 22:54:43 -05:00
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:
@@ -12,8 +12,8 @@ CHIP Or {
|
||||
|
||||
PARTS:
|
||||
// Or(a,b) = Not(And(Not(a), Not(b))) - De Morgan's law
|
||||
Not(in=a, out=notA);
|
||||
Not(in=b, out=notB);
|
||||
And(a=notA, b=notB, out=andOut);
|
||||
Not(in=andOut, out=out);
|
||||
Not(in=a, out=tmp1);
|
||||
Not(in=b, out=tmp2);
|
||||
And(a=tmp1, b=tmp2, out=tmp3);
|
||||
Not(in=tmp3, out=out);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user