Installers Guide to the Bose® Serial interface
June 28, 2011
Bose Confidential Information
Page 11/42
Do Not Redistribute
4.1.5 Checksum (if present)
The Checksum byte is used to help detect packet corruption during transit. The Checksum byte is
computed by the Client by XOR-ing all bytes in the packet to be sent that precede the Checksum
byte. Use the resulting value as the checksum value.
The binary operation table for the XOR operation, which is indicated by the caret
(―^‖) character is
shown in the table below.
Table 4-3 The XOR Operator
Bit A
Bit B
A ^ B
0
0
0
0
1
1
1
0
1
1
1
0
Note XOR-ing a bit with 0 does not change the bit while XOR-ing a bit with 1 inverts the bit.
Thus a bit in the Checksum can be computed by summing the corresponding bit of each
preceding byte. The Checksum bit is 1 if there is an odd number of 1s in the corresponding bit of
each preceding byte and 0 if there is an even number of 1s.
For examples see the Checksum computed in Section 5.7 Sample Command/Response
Interaction,
as well as the actual Checksum values listed in the command packets sent by the
Client in Section
6 Client Commands and Console Responses.
Note: The Checksum byte only appears on packets sent from the Client. There is no checksum
byte in packets sent from the Console.