patternCritical
Does a byte contain 8 bits, or 9?
Viewed 0 times
containbytebitsdoes
Problem
I read in this assembly programming tutorial that 8 bits are used for data while 1 bit is for parity, which is then used for detecting parity error (caused by hardware fault or electrical disturbance).
Is this true?
Is this true?
Solution
A byte of data is eight bits, there may be more bits per byte of data that are used at the OS or even the hardware level for error checking (parity bit, or even a more advanced error detection scheme), but the data is eight bits and any parity bit is usually invisible to the software. A byte has been standardized to mean 'eight bits of data'. The text isn't wrong in saying there may be more bits dedicated to storing a byte of data of than the eight bits of data, but those aren't typically considered part of the byte per se, the text itself points to this fact.
You can see this in the following section of the tutorial:
4*8=32, it might actually take up 36 bits on the system but for your intents and purposes it's only 32 bits.
You can see this in the following section of the tutorial:
Doubleword: a 4-byte (32 bit) data item4*8=32, it might actually take up 36 bits on the system but for your intents and purposes it's only 32 bits.
Code Snippets
Doubleword: a 4-byte (32 bit) data itemContext
StackExchange Computer Science Q#67684, answer score: 78
Revisions (0)
No revisions yet.