The Signal State

The Signal State

Not enough ratings
Even detector
By Mendes
Detect if the input is even or not.
   
Award
Favorite
Favorited
Unfavorite
The even detector
Preface: Rounding
First stage: Even detector
To take advantage of the rounding effect the following equation, wich can be implemented in-game, will be used
Second stage: Zero detector or simple bias


The zero detector can be replaced by a simple bias module.
Because the game only works with integers, dividing an odd number by 2 always results in η = 0.5, therefore ρ = -1.
This means that for odd numbers we will have ρ = -1 and for even numbers ρ = 0.
Knowing this, if you only add a +1 bias to the output you will have ρ = 0 (LOGIC LOW) for odd and ρ = 1 (LOGIC HIGH) for even.
In-game implementation
Using zero detector, output is LOW when x is even:


Using simple bias, output is HIGH when x is even:
Example
If x is even, send it to the output


Output:
Conclusion