parity_flag

Parity flag

Snippet from Wikipedia: Parity flag

In computer processors the parity flag indicates if the numbers of set bits is odd or even in the binary representation of the result of the last operation. It is normally a single bit in a processor status register.

For example, assume a machine where a set parity flag indicates even parity. If the result of the last operation were 26 (11010 in binary), the parity flag would be 0 since the number of set bits is odd. Similarly, if the result were 10 (1010 in binary) then the parity flag would be 1.

Some microcontrollers, notably the ubiquitous 8051, include a parity flag to help with implementing RS-232 and other serial communication protocols, in lieu of a UART with parity support.

parity_flag.txt · Last modified: 2025/02/01 06:37 by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki