Split a byte in different outputs with base

Hello everybody , i have a little clue about how to achieve this in gamma in a simple way.
have 6 buttons connected to a gamepad board, so i receive a byte in base 2 for the 6 buttons (1,2,4,8,16,32) and i want to get this byte and split it in 6 outputs in a base 2 so i can press simultanously the 6 buttons ,
Maybe didnt explain well as my concepts in math are pretty basic, but for example, if i press button 1 and 3 gives me 5 in the byte, and i want to split it in a base of two so i will now that both buttons are pressed in the same time, and the same with the other buttons.
In vvvv beta you could get it easily with the radix node giving a base of two and six outputs.
What is the best workaround in gamma?

if you search for “binary” in the node browser, you will find ToString (Binary) which will give you a string (array of characters) that you can check for “1”:


see also:

and if you want to do it the “math” way, it could look something like this:


for an explanation of what this is doing, read up on bitwise operators.

Thanks guys both solutions are fine! wonderful

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.