Your goal is to determine if a number is divisible by 3 without using conditionals. The input will be an unsigned 8 bit number from 0 to 255. Creativity encouraged!
You are ONLY allowed to use
Equality/Inequality (
==
,!=
,>
,<
,>=
,<=
)Arithmetic (
+
,-
,x
)Logical Operators (
!
not,&&
and,||
or)Bitwise Operators (
~
not,&
and,|
or,^
xor,<<
,>>
,>>>
arithmetic and logical left and right shifts)Constants (it would be better if you kept these small)
Variable assignment
Output 0
if false, 1
if true.
Standard atomic code-golf rules apply. If you have any questions please leave them in the comments. Example methods here. A token is any of the above excluding constants and variables.