4. Data representation and data types Flashcards

1
Q

What is a character set?

A

A defined list of characters recognized by the computer’s hardware and software, with each character being represented by a number. They are agreed standards for referring to all the characters a computer can use.

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

What is ASCII?

A

A 7-bit character set that has space for 128 symbols, enough for standard English. The codes are stored by computers as 8 bits with the MSB set to 0.

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

What is extended ASCII?

A

An 8-bit character set that provides extra characters for foreign languages and graphic symbols.

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

What is Unicode?

A

A 24-bit character set that has characters from every written language, historic symbols and emojis. Hexadecimal is often used instead of binary as writing 24 bits is slow and cumbersome.

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

How many bits are needed to store a single character?

A

8 bits (ASCII)
16 bits (Unicode)

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

How many bits are needed to store a string?

A

8 bits per character (ASCII)
16 bits per character (Unicode)

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

How many bits are needed to store an unsigned/signed integer?

A

16 bits (short integer)
64 bits (long integer)

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

How many bits are needed to store a boolean?

A

1 bit

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

What are the advantages of using standardized character sets?

A
  • ensures all computers use the same character representation
  • Unicode allows storage of complex characters such as Chinese symbols
  • Unicode can represent a larger range of characters than ASCII
How well did you know this?
1
Not at all
2
3
4
5
Perfectly