Communication Protocols · Interview question

Walk through a UART frame.

A strong answer

The line idles high. A frame begins with a start bit, a single 0, whose falling edge signals the receiver that data is coming and gives it a timing reference. Then come the data bits, typically 8, sent least-significant-bit first. Optionally a parity bit follows for a basic single-bit error check (even or odd parity), though many links use none. Finally one or more stop bits, always 1, return the line to idle and guarantee a minimum gap before the next frame. Both ends must agree on every parameter, number of data bits, parity, stop bits, and the baud rate, which is why the shorthand "8N1" (8 data bits, no parity, 1 stop bit) is so common. The key conceptual point is that there's no clock line: the start bit's edge is the only synchronization the receiver gets, and it samples the rest of the frame using its own locally-generated baud timing.

What a weak answer sounds like

You know the answer. Do you know what gets you dinged?

Pro breaks down the answer most candidates actually give to this question — and the specific reason an interviewer marks it down. It’s the difference between sounding correct and sounding senior, on all 472 questions.

From the lesson

UART

Two wires, no clock, and a pre-agreed baud: the UART frame (start/data/parity/stop), how the receiver recovers timing by oversampling, and an interrupt-driven RX ring buffer.

More UART questions

Browse all 472 interview questions