It is necessary to replace one bit (from 0 to 1 and vice versa) with a choice in a fixed 8-bit number:
10011010
A number is selected from 1 to 8. For example, selecting 5 displays 10010010 (5 bits changed from 1 to 0)
In addition, you need to create a string to display the number (int) in 8-bit format:
String.format("%8s", Integer.toBinaryString(meinInteger)).replace(' ', '0');