I been trying to convert my decimal input to binary input for my LED condition

My current problem on the coding is that, how can i save the incoming data full bit instead of 1 bit at a time and then change the incoming data to binary for the LED condition