Question: why nrzi encoding is used in usb?
Answer: The USB employs NRZI (Non Return to Zero Inversion) encoding mechanism to encode the data on the bus. In NRZI encoding, a '1' is represented by no change in level while a '0' is represented by change in level. Together with NRZI encoding, bit stiffing and SYNC field is used for synchronization between host and device.