mod 3
0 Stars     13 Views    

Author: Gustavo Torres

Forked from: Joshua/mod 3

Project access type: Public

Description:

I used to play a game as a kid where you would start at 21 or some other number and players would take turns subtracting one or two until one player ended at 1 and they were the winner.  This is a solver for the 6 bit version of this game.  All numbers are LSB at the top.  On the left inputs enter the starting number.  The outputs on the right will tell you what to subtract.

The logic is basically to calculate if the number is multiple of 3 and if so subtract 2 otherwise subtract 1.  Each circuit block is calculating the modulus of three based on the modulus from the higher bit.

Created: May 10, 2022

Updated: Aug 27, 2023


Comments

You must login before you can post a comment.