weights
1024  512  256  128   64   32   16    8    4    2    1

1234 (decimal) = 1024 + 210
               = 1024 + 128 + 82
               = 1024 + 128 + 64 + 18
               = 1024 + 128 + 64 + 16 + 2
               = 100 1101 0010 (binary)
               = 0000 0100 1101 0010 (binary; 16-bit word)
254 (decimal) = ?
  note that 255(d) = 1111 1111(b)
therefore
  255(d) = 1111 1110(b)
         = 0000 0000 1111 1110(b) in a 16-bit word



Hit the "Back" button.