NEW
Font size
S
M
L
XL
WorksheetsMH 1.4.1 Data Types
Total questions: 67
Worksheet time: 34mins
Name
Class
Date
1.
In floating point representation what is the purpose of the mantissa?
a)
Stores the actual value
b)
Stores the position of the binary point
c)
Tells you if the number is using two's complement or sign and magnitude
d)
Tells you know if the number is negative or positive
2.
How would you store the base-10 denary number -55 using two's complement in 8-bits?
a)
0011 0111
b)
1100 1001
c)
1010 0100
d)
0101 0111
3.
What is the hexadecimal number 20 in binary?
a)
0010 0000
b)
0000 0010
c)
0001 0000
d)
0001 0100
4.
What is the number 6 in binary?
a)
0000 0110
b)
0000 1010
c)
0011 1111
d)
0000 0111
5.
In this line of code: FOR counter = 1 to 10, what data type should counter be declared as?
a)
String
b)
Boolean
c)
Real
d)
Integer
6.
What is the binary number 0011 0100 in hexadecimal?
a)
34
b)
24
c)
38
d)
52
7.
What is the result of binary left shifting 0100 0010 one digit?
a)
1000 0100
b)
0010 0001
c)
0100 0001
d)
0010 0010
8.
What is the result of using the XOR mask 1111 0000 with the binary value 1001 1101?
a)
0110 0010
b)
1001 1101
c)
0110 1010
d)
0110 1101
9.
What does bitwise AND do to a sequence of bits?
a)
Toggles a subset of the bits
b)
None of these
c)
Extracts a subset of the bits
d)
Sets a subset of the bits
10.
What is the result of using an AND mask 0101 1111 with the binary value 0110 0001?
a)
0100 0001
b)
0111 1111
c)
1011 1111
d)
1011 1110
11.
In this line of code, identify a casting function: score = score + int(input('Enter your score: '))
a)
score
b)
input
c)
int
d)
'Enter your score: '
12.
ASCII was originally a 7 bit character set. This means it could store in binary:
a)
2*7 = 14 characters
b)
2^8 = 256 characters
c)
7*8 = 56 characters
d)
2^7 = 128 characters
13.
Given the following 8-bit binary number: 10000 110 stored in normalised floating point form where the first 5-bits are the mantissa and the last 3-bits are the exponent, what is the exponent telling us to do?
a)
Shift the floating binary point 6 places to the right
b)
Shift the floating binary point 2 places to the left
c)
Shift the floating binary point 2 places to the right
d)
Shift the floating binary point 6 places to the left
14.
What is the binary number 0001 0011 in denary?
a)
18
b)
3
c)
19
d)
9
15.
What data type should be used for storing an average?
a)
Boolean
b)
Integer
c)
Real
d)
String
16.
Why do we normalise floating point binary numbers?
a)
So that we can perform binary arithmetic
b)
There is no other way to store floating point binary numbers
c)
So that we store numbers to the greatest degree of accuracy possible
d)
So that we can store positive numbers in the negative form
17.
In an 8-bit binary number stored using two's complement what would the most significant bit (left-most bit) represent if it was set to 1?
a)
- character
b)
-128
c)
+ character
d)
128
18.
What is the purpose of bitwise masks?
a)
Allows you to perform addition and subtraction on negative numbers
b)
Allows you to isolate and extract, toggle and set bit values in a sequence
c)
Allows you to shift a binary number in order to perform division
d)
Allows you to shift a binary number in order to perform multiplication
19.
What is the denary number 20 in hexadecimal?
a)
14
b)
32
c)
8
d)
16
20.
In this line of code, identify a string: score = score + int(input('Enter your score: '))
a)
input
b)
score
c)
'Enter your score: '
d)
int
21.
What is an integer data type?
a)
A whole number
b)
A number that may have a fractional component
c)
A set of alphanumeric characters
d)
A value that is true or false, -1/1 or 0
22.
What is a string data type?
a)
A number that may have a fractional component
b)
A value that is true or false, -1/1 or 0
c)
A whole number
d)
A set of alphanumeric characters
23.
What data type should be used for storing a telephone number?
a)
Real
b)
String
c)
Integer
d)
Boolean
24.
What data type should be used to store the value of a 4 digit pin number?
a)
Boolean
b)
Integer
c)
String
d)
Real
25.
How would you store the base-10 denary number -116 using sign and magnitude in 8-bits?
a)
1111 0100
b)
0111 0101
c)
0111 0100
d)
1100 0100
26.
What is the result of: 0000 0011 + 0000 0010
a)
0000 0011
b)
0000 0111
c)
0000 0001
d)
0000 0101
27.
What is the result of: 0001 0101 + 0000 0011
a)
0001 0111
b)
0000 0111
c)
0001 1000
d)
0000 0001
28.
What steps should you use to illustrate how the calculation 62 - 97 is performed in binary?
a)
Use Sign and magnitude representation to perform the calculation
b)
Convert 97 into -97 and then perform the addition (62 + -97)
c)
Simply convert the numbers to binary and perform (62 - 97)
d)
Convert 62 into -62 and then perform the addition (-62 + 97)
29.
Computers can only process data in this format.
a)
Binary
b)
Denary
c)
ASCII
d)
Hexadecimal
30.
What is the character data type?
a)
An single item of punctuation e.g. ?
b)
A single alphanumeric character
c)
A single alphabetic character
d)
None of these
31.
How do you represent the denary number 12 in hexadecimal?
a)
C
b)
B
c)
D
d)
12
32.
In an 8-bit binary number stored using sign and magnitude what would the most significant bit (left-most bit) represent if it was set to 1?
a)
128
b)
- character
c)
+ character
d)
-128
33.
What is meant by the term, 'character set'?
a)
The data type used to assign memory for a variable
b)
A defined list of characters recognised by the computer hardware and software
c)
All the characters used in a language
d)
The American Standard Code for Information Interchange
34.
What number system can be described as, 'a method of storing positive and negative numbers using the most significant bit as a negative value place'?
a)
Sign and magnitude
b)
Mantissa and exponent
c)
Floating point
d)
Two's complement
35.
What character set can be described as, 'an international encoding standard for use with different languages and scripts'?
a)
ASCII
b)
Unicode
c)
Extended ASCII
d)
EBCDIC
36.
In this line of code: x = True, what data type is x?
a)
String
b)
Boolean
c)
Integer
d)
Real
37.
How would you store the base-10 denary number +116 using sign and magnitude in 8-bits?
a)
0111 0101
b)
0111 0100
c)
1111 0100
d)
0100 0100
38.
What does bitwise XOR do to a sequence of bits?
a)
Sets a subset of the bits
b)
Toggles the bits from 0 to 1 or 1 to 0
c)
Extracts a subset of the bits
d)
None of these
39.
UTF-8 Unicode which is the most popular character set on the web uses 17, two byte code points in the character set. The number of characters in the set can be calculated as:
a)
2^17 = 131,072 characters
b)
(2^16)*17 = 1,114,112 characters
c)
(2^2)*17 = 68 characters
d)
(2^17)*16 = 2,097,152 characters
40.
ASCII is an example of:
a)
A standard for meta-data
b)
A conversion technique for hexadecimal to denary
c)
A searching algorithm
d)
A character set
41.
What is the hexadecimal number 24 in denary?
a)
32
b)
28
c)
16
d)
36
42.
Why is sign and magnitude rarely used?
a)
Because it requires an extra bit in the accumulator register
b)
It is an old representation of negative numbers and it has been superseded
c)
Arithmetic with numbers in sign and magnitude format is more difficult
d)
Because it requires a RISC architecture
43.
Why do we often choose to represent base-2 binary numbers in base-16 hexadecimal?
a)
Computers store memory addresses as hexadecimal values
b)
Machine code run on the processor is written in hexadecimal
c)
Computers can't perform calculations in binary
d)
It provides for a more compact and human-readable format of a number than binary
44.
Extended ASCII is an 8 bit character set. This means it could store in binary:
a)
2*8 = 16 characters
b)
8*8 = 64 characters
c)
2^7 = 128 characters
d)
2^8 = 256 characters
45.
What is the binary number 0100 1111 in hexadecimal?
a)
79
b)
8E
c)
4F
d)
117
46.
What are floating point data types?
a)
Any data type that can store positive numbers
b)
Any data type that can store negative numbers
c)
Any data type that can store a decimal / fractional part of a number
d)
Any data type that can store both positive and negative numbers
47.
Which of the following is the normalised representation of the base-10 denary number 1?
a)
None are normalised
b)
00010 011
c)
01000 001
d)
00100 010
48.
What data type should be used for storing the name of a person?
a)
String
b)
Real
c)
Integer
d)
Boolean
49.
In floating-point representation what is the purpose of the exponent?
a)
Tells you if the number is using two's Complement or sign and magnitude
b)
Stores the position of the binary point
c)
To store the actual value of the number
d)
Tells you know if the number is negative or positive
50.
In this line of code: x = 6 < 3, what data type is x?
a)
String
b)
Integer
c)
Boolean
d)
Real
51.
Which of the following 8-bit floating point binary numbers is normalised?
a)
1011 0100
b)
0010 1000
c)
1100 0101
d)
0000 1111
52.
What is the denary number 26 in hexadecimal?
a)
2A
b)
1A
c)
B6
d)
14
53.
What data type should be used to store the value for Pi?
a)
String
b)
Integer
c)
Boolean
d)
Real
54.
What is the binary number 0000 1001 in denary?
a)
1001
b)
9
c)
8
d)
10
55.
What does bitwise OR do to a sequence of bits?
a)
Extracts a subset of the bits
b)
None of these
c)
Toggles a subset of the bits
d)
Sets a subset of the bits to 1
56.
Using two's complement representation, what is the negative version of the following 8-bit binary number: 0100 0100?
a)
1011 1011
b)
1111 0000
c)
1011 1100
d)
1100 0100
57.
What is the number 11 in binary?
a)
0000 0110
b)
0000 1011
c)
0000 0011
d)
0000 1010
58.
What is a Boolean data type?
a)
A value that is true or false, -1/1 or 0
b)
A whole number
c)
A set of alphanumeric characters
d)
A number that may have a fractional component
59.
What is the result of binary right shifting 0100 0010 one digit?
a)
1000 0100
b)
0010 0001
c)
0010 0010
d)
0100 0001
60.
What can be described as, 'a method of storing numbers which uses the most significant bit to represent a character. A + or - denoting whether the binary pattern is a positive or negative number.
a)
Mantissa and exponent
b)
Two's complement
c)
Sign and magnitude
d)
Floating point
61.
What is meant by the term casting?
a)
A string with a single alphanumeric character
b)
A character that represents an action
c)
Converting a variable from one data type to another
d)
A value that does not change whilst the program is running
62.
What is the binary number 1100 0011 in hexadecimal?
a)
C3
b)
123
c)
D2
d)
195
63.
Given the following 8-bit binary number: 01101 011 stored in normalised floating point form where the first 5-bits are the mantissa and the last 3-bits are the exponent, what is the exponent telling us to do?
a)
Shift the floating binary point 3 places to the right
b)
Shift the floating binary point 3 places to the left
c)
Multiple the mantissa by 3
d)
Divide the mantissa by 3
64.
How would you store the base-10 denary number +55 using two's complement in 8-bits?
a)
0011 0111
b)
1010 0100
c)
0101 0111
d)
1100 1001
65.
What is a real number data type?
a)
A whole number
b)
A set of alphanumeric characters
c)
A value that is true or false, -1/1 or 0
d)
A number that may have a fractional component
66.
What is the result of using an OR the mask 0010 0000 with the binary value 0100 0011?
a)
1001 0001
b)
0100 0001
c)
1011 1100
d)
0110 0011
67.
Why doesn't it work to add together the following two binary numbers using two's complement and storing the result in 8-bits: 0111 000 + 0101 1110?
a)
We should be using sign and magnitude for all calculations
b)
The numbers should be normalised first
c)
The result would overflow
d)
The result would underflow
Reset
