This is my current circuit. It's a 2 person colour guessing game. The first person will choose the colour code the other player has to try and guess using the registers on the left and then set the colour code by transferring it to the registers on the right by clicking the set code button down the bottom. The second player will then try to guess the colour. To check if the player has got the colour code correct they will press the guess colour button. If all 2 colours have been guessed correctly the hex display will display 2. If 1 colour has been guessed correctly the hex display will display 1 and if no colours have been guessed correctly the hex display will display 0. So for example, in the above picture, if the player pressed the guess colour button atm, the number 2 would be displayed as all colours are in their correct position.
The latter part is what I need help with. I have no idea how to wire up the circuit so that it can check whether or not the guesses are correct. Any help is greatly appreciated as I'm still learning.