1
$\begingroup$

I was revising Computer Science and I got these two doubts to which I've found contradictory answers on Google:

  1. In a serial communication which bit is sent first?
  2. When using a parity bit with ASCII is it set on the LSB or MSB?

Logically thinking I thought the answers should be 1- MSB first and 2 - set on LSB. Am I right?

Thanks in advance.

Gabriele

$\endgroup$
  • $\begingroup$ Welcome to CS.SE. If you found multiple results, it would be helpful to include what you've found in your question and share your research so others can benefit. Your first question appears to be answered on Wikipedia. en.wikipedia.org/wiki/Serial_port#Data_bits $\endgroup$ – D.W. May 26 '17 at 15:01
3
$\begingroup$

You may find contradictory answers because there are many kinds of serial communication protocols. Some are LSB first, some are MSB first.

For example, for the old RS232 standard and siblings, the LSB is transmitted first, and the parity may be transmitted after MSB. The MSB is usually the 7th bit or the 8th bit. The parity is not part of the source data and is not weighted, so this is not really a MSB.

Another serial protocol, CAN, used in many automotive or other embedded applications, uses MSB first.

Some have more complex interpretations, mixing LSB- and MSB- first for data and CRC, mixing the order of bytes and the transmission order of bits. Example : IP over Ethernet : Big endian data, LSB-first bits, reversed CRC.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.