Coding Text Flashcards

1
Q

What is a bit?

A

The smallest unit of data in a computer, represented as 0 or 1.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How many characters can be represented with 2 bits?

A

4

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How many characters can be represented with 3 bits?

A

8

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How many characters can be represented with 4 bits?

A

16

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How many characters can be represented with 8 bits?

A

256

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is ASCII?

A

A 7-bit character encoding system representing 128 characters.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Why is the 8th bit used in ASCII?

A

For parity or extended characters.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How does Unicode differ from ASCII?

A

Unicode uses 8, 16, or 32 bits to represent a wider range of characters across multiple languages.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are the advantages of Unicode?

A

Universal standard for all languages. Supports many more characters.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are the disadvantages of Unicode?

A

Requires more storage. Increased complexity compared to ASCII.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is a parity bit?

A

A bit added to ensure the total number of 1s in a byte is even or odd for error detection.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is majority voting?

A

Each bit is sent three times; the most common value is used to detect and correct errors.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the purpose of a check digit?

A

To verify the accuracy of a data entry using weighted calculations.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How would the character ‘A’ be represented in ASCII using 7 bits?

A

1000001

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

How many characters can be represented using 7 bits?

A

128 characters.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is the purpose of a parity bit?

A

To detect errors in transmitted data by ensuring the total number of 1s (including the parity bit) follows specific rules (even or odd).

17
Q

What is even parity?

A

The total number of 1s in the data (including the parity bit) must be even.

18
Q

How is even parity checked during transmission?

A
  1. 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.
19
Q

Example of even parity?

A

Data: 1010110 (6 bits) → Parity bit: 0 → Sent data: 10101100.

20
Q

What is odd parity?

A

The total number of 1s in the data (including the parity bit) must be odd.

21
Q

How is odd parity checked during transmission?

A
  1. 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.
22
Q

Example of odd parity?

A

Data: 1010110 (6 bits) → Parity bit: 1 → Sent data: 10101101.

23
Q

What are the limitations of parity bits?

A

They can only detect single-bit errors. They cannot detect multiple-bit errors (e.g., if two bits flip, parity remains unchanged).

24
Q

How does even parity detect errors?

A

Data to send: 1101011 (7 bits) → Parity bit: 1 → Sent data: 11010111. Received data: 11010101. Total 1s: 5 (odd), so an error is detected.

25
Where is even parity commonly used?
In systems where even numbers are easier to process.
26
Where is odd parity commonly used?
In scenarios where odd numbers are standard for error detection.