public static String deviceToText(int hByte,int lByte){
  int mask=0x01;
  int x=lByte;
  StringBuilder dev=new StringBuilder();
  for (int i=8; i > 0; i--) {
    if ((x & mask) != 0) {
      dev.append(" " + i);
    }
    mask=mask << 1;
  }
  mask=0x01;
  x=hByte;
  for (int i=16; i > 8; i--) {
    if ((x & mask) != 0) {
      dev.append(" " + i);
    }
    mask=mask << 1;
  }
  return dev.toString();
}

public static String deviceToText ( int hByte , int lByte ) { int mask = 0x01 ; int x = lByte ; StringBuilder dev = new StringBuilder ( ) ; for ( int i = 8 ; i > 0 ; i -- ) { if ( ( x & mask ) != 0 ) { dev . append ( " " + i ) ; } mask = mask << 1 ; } mask = 0x01 ; x = hByte ; for ( int i = 16 ; i > 8 ; i -- ) { if ( ( x & mask ) != 0 ) { dev . append ( " " + i ) ; } mask = mask << 1 ; } return dev . toString ( ) ; }
translate device bits to text
