Multiple Choice Questions 10×1=10
1
How many bytes are used to store a typical integer?
A
1 byte
B
2 bytes
C
4 bytes
D
8 bytes
2
Convert the binary number 1011 to decimal:
3
Which step is part of converting decimal to binary?
Hint: Think about the repeated division method for decimal to binary conversion
A
Divide by 8
B
Multiply by 2
C
Record remainder
D
None of these
4
What is the minimum value of a 1-byte signed integer?
5
What is the binary representation of -6 in 8-bit two’s complement?
Two’s Complement: Invert bits and add 1
A
11111010
B
11111011
C
00000110
D
10000110
6
Which binary operation uses the rule 1 + 1 = 10?
A
Addition
B
Subtraction
C
Multiplication
D
Division
7
What does the ASCII code for the letter “P” represent in decimal?
8
How many bits are used in ASCII?
9
Which encoding scheme uses 4 bytes for all characters?
A
UTF-8
B
UTF-16
C
UTF-32
D
ASCII
10
What is the binary representation of the ASCII code for “A” (U+0041)?
A
01000001
B
01100001
C
00110001
D
01101000
Short Answer Questions 10×2=20
I
How does Unicode handle characters from different languages?
ii
Convert decimal 45 to octal.
Method: Divide by 8 repeatedly and record remainders in reverse order
iii
What is the decimal value of binary 11100101?
Binary: 11100101
Decimal: 229
iv
Convert 15 (decimal) to binary and octal.
v
What is the range of a 2-byte signed integer?
vi
How is overflow handled in binary addition?
vii
How many partial products are generated in multiplying 101 by 11?
viii
What is the ASCII code for the uppercase letter “K”?
ix
Convert the ASCII code 105 to its corresponding character.
x
What is the Unicode code point for the Urdu letter “-_”?