1.4.1 Data Types Flashcards

(7 cards)

1
Q

What data type should be used for storing a phone number like 07886756443?

A

String
Numeric types would omit the leading 0.

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

Which data type stores a collection of characters?

A

String

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

Which data type stores just True and False?

A

Boolean

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

What is the effect of a logical shift left by one place?

A

Multiplication by 2

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

What is a character set?

A

A character set is a published collection of codes and corresponding characters which can be used by computers for representing text.

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

What is ASCII?

A

ASCII uses 7 bits to represent 2^7 = 128 different characters.

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

What is Unicode, and why is it better than ASCII?

A

Unicode uses a varying number of bits allowing for over 1 million different characters, many of which have yet to be allocated. Because of this, Unicode has enough capacity to represent a wealth of different languages, symbols and emoji.

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