Data Types Flashcards

1
Q

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

A

String

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

Perform an AND mask on the binary numbers:
10101101
01011011

A

00001001

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
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
4
Q

Add the two binary numbers:
01011011
00111010

A

10010101 = 49

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

What is 45 in binary?

A

00101101

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

What is the hexadecimal 2E in decimal?

A

46

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

What is the hexadecimal 45 in binary?

A

01000101

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

Which data type just stores true and false?

A

Boolean

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

What is -5 in sign and magnitude?

A

1101

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

What does the binary 01101100 represent in hexadecimal?

A

6C

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

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

A

The value doubles

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

What is the two’s complement binary 10101101 in decimal?

A

-83

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

The binary 0011010000110 is a floating point number with a single-bit sign, 8-bit mantissa and 4-bit exponent. What is the number in decimal?

A

52

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

Perform a logical shift right by two places on the binary number 01101010 and convert your result to decimal

A

26.5

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

Perform a XOR mask on the binary numbers:
01010101
10111011

A

11101110

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

Which of the following is not a character?
- 8
- R
- %
- 43

17
Q

The binary 1100110000011 is a floating point number with a single-bit sign, 8-bit mantissa and 4-bit exponent. What is the number in decimal?