Level/Equality

From Turing Complete
Section CPU Architecture 2
Type Component
Prerequisite Byte Constant
Unlocks Unsigned Less
Signed Less
Equal
Scored Yes
High score 40
API byte_equal (70)


This level has you create a circuit that checks if two 8-bit values are identical.

One way to do this is to figure out how to check if two bits are identical and then scale that up. And there is a gate for that job, the XNOR Gate.

So, this becomes a matter of using two Byte Splitters to get the raw bits and then putting down an XNOR Gate for each pair. Then just use And Gates to check that all bits are equal.