How to convert a number to binary ?

PaulS:
If you want to print the binary representation of the value, you have to tell Serial.print() that. Look at the documentation for how.

Yes I know. Serial.print(y,bin).

Something else I would like to know is about how can I separate a 16 bin value of a variable into
2 8bin variables. For example x = 0B1111111100000001, I would like y to be 0B11111111 and
z = 0B00000001 in order to send them with shiftout (using 2 shift registers) to another chip.