1.4.1 Data Types Flashcards
What data type should be used for storing a phone number like 07886756443?
String (an integer would remove the leading 0)
What data type stores a collection of characters?
String
Add the two binary numbers
01011011
00111010
10010101 - 149
What is the decimal 45 in binary?
Give your answer as a byte
00101101
What is the hexadecimal 2E in decimal?
(2x16) + (14x1) = 46
What is the hexadecimal 45 in binary?
01000101
Which data type stores just True or False?
Boolean
What is -5 in sign and magnitude binary?
1101
What does the binary 01101100 in hexadecimal?
6C
What is the two’s complement binary 10101101 in decimal?
-83
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?
52
Which of the following is not a character?
A: 8 C:%
B: R D:43
D
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?
-9.5