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 Mux {
|
||||
|
||||
PARTS:
|
||||
// Mux(a,b,sel) = Or(And(a, Not(sel)), And(b, sel))
|
||||
Not(in=sel, out=notSel);
|
||||
And(a=a, b=notSel, out=aAndNotSel);
|
||||
And(a=b, b=sel, out=bAndSel);
|
||||
Or(a=aAndNotSel, b=bAndSel, out=out);
|
||||
Not(in=sel, out=tmp1);
|
||||
And(a=a, b=tmp1, out=tmp2);
|
||||
And(a=b, b=sel, out=tmp3);
|
||||
Or(a=tmp2, b=tmp3, out=out);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user