go to post Abdul Manan · Dec 31, 2024 I based my solution for 24.2 on the following equation (found by manually reading/understanding the input): Equation: zN = A ⊕. BzN = [xN ⊕ yN]. ⊕. ( [xN−1∧yN−1] ∨ [input gates of zN−1 w/ AND]) In the input, for each zN, the equation defines the relationship A <OP> B = zN. If the operator <OP> is not XOR, this is incorrect. In such cases, zN needs to be swapped with tN, where tN can be derived using the property: A⊕B=tN. Similarly, if the values A and B found using the above equation do not match the input gates of XOR for zN, this indicates an intermediate gate (either A or B) needs to be swapped to satisfy the conditions.
go to post Abdul Manan · Dec 27, 2024 Thanks @Robert Cemper Here is my Github repo: github.com/abdul-manaan/AOC24-ObjectScript Happy Holidays!