Coding Text Flashcards
What is a bit?
The smallest unit of data in a computer, represented as 0 or 1.
How many characters can be represented with 2 bits?
4
How many characters can be represented with 3 bits?
8
How many characters can be represented with 4 bits?
16
How many characters can be represented with 8 bits?
256
What is ASCII?
A 7-bit character encoding system representing 128 characters.
Why is the 8th bit used in ASCII?
For parity or extended characters.
How does Unicode differ from ASCII?
Unicode uses 8, 16, or 32 bits to represent a wider range of characters across multiple languages.
What are the advantages of Unicode?
Universal standard for all languages. Supports many more characters.
What are the disadvantages of Unicode?
Requires more storage. Increased complexity compared to ASCII.
What is a parity bit?
A bit added to ensure the total number of 1s in a byte is even or odd for error detection.
What is majority voting?
Each bit is sent three times; the most common value is used to detect and correct errors.
What is the purpose of a check digit?
To verify the accuracy of a data entry using weighted calculations.
How would the character ‘A’ be represented in ASCII using 7 bits?
1000001
How many characters can be represented using 7 bits?
128 characters.
What is the purpose of a parity bit?
To detect errors in transmitted data by ensuring the total number of 1s (including the parity bit) follows specific rules (even or odd).
What is even parity?
The total number of 1s in the data (including the parity bit) must be even.
How is even parity checked during transmission?
- Sending: The sender calculates the parity bit to make the total number of 1s even and appends it to the data. 2. Receiving: The receiver counts the total 1s in the data. If the count is even, the data is assumed correct; if odd, an error is detected.
Example of even parity?
Data: 1010110 (6 bits) → Parity bit: 0 → Sent data: 10101100.
What is odd parity?
The total number of 1s in the data (including the parity bit) must be odd.
How is odd parity checked during transmission?
- Sending: The sender calculates the parity bit to make the total number of 1s odd and appends it to the data. 2. Receiving: The receiver checks if the total 1s is odd. If even, an error is detected.
Example of odd parity?
Data: 1010110 (6 bits) → Parity bit: 1 → Sent data: 10101101.
What are the limitations of parity bits?
They can only detect single-bit errors. They cannot detect multiple-bit errors (e.g., if two bits flip, parity remains unchanged).
How does even parity detect errors?
Data to send: 1101011 (7 bits) → Parity bit: 1 → Sent data: 11010111. Received data: 11010101. Total 1s: 5 (odd), so an error is detected.
Where is even parity commonly used?
In systems where even numbers are easier to process.
Where is odd parity commonly used?
In scenarios where odd numbers are standard for error detection.