Let \(A\) and \(B\) be two 8-bit signed integers represented in two's complement, where \(A = 01011011_2\) and \(B = 10100100_2\). Which of the following statements about the operation \(A + B\) is/are correct? (1) The result is negative. (2) No overflow occurs. (3) The hexadecimal representation of the result is \(\text{FF}_{16}\).
- A.(1) only
- B.(1) and (2) only
- C.(2) and (3) only
- D.(1), (2) and (3)
A host has the IP address 192.168.10.45 with a subnet mask of 255.255.255.224. Which of the following is the network address (subnet address) to which this host belongs?
- A.192.168.10.0
- B.192.168.10.32
- C.192.168.10.45
- D.192.168.10.63
Consider a database with two tables: Student(StudentID, Name, Class) where StudentID is the primary key, and Enrollment(StudentID, CourseID, EnrollDate) where (StudentID, CourseID) is the composite primary key, and StudentID is a foreign key referencing Student(StudentID). Which of the following operations will NOT violate any integrity constraints?
- A.Inserting a record into Enrollment with a StudentID value that does not exist in Student.
- B.Deleting a record from Student whose StudentID is currently referenced in Enrollment.
- C.Inserting a record into Enrollment with a null value for StudentID.
- D.Inserting a record into Student with a new StudentID value that does not exist in Student.
A database table Sales has columns SaleID, ProductID, Region, and Amount. What is the output of the following SQL query? SELECT Region, COUNT(SaleID) FROM Sales GROUP BY Region HAVING AVG(Amount) > 1100. [Sales Data: (1, 'P01', 'North', 1500), (2, 'P02', 'South', 2000), (3, 'P01', 'South', 1200), (4, 'P03', 'North', 800), (5, 'P02', 'North', 1000), (6, 'P01', 'North', 500)]
- A.Region: South, COUNT(SaleID): 2
- B.Region: North, COUNT(SaleID): 4
- C.Region: North, COUNT(SaleID): 4; Region: South, COUNT(SaleID): 2
- D.No records returned
A database relation R(A, B, C, D) has a composite primary key (A, B). Which of the following functional dependencies would violate the Second Normal Form (2NF)?
- A.(A, B) -> C
- B.C -> D
- C.A -> D
- D.(A, B) -> D
Consider the following pseudocode: A is a 1-indexed array of 5 integers: [4, 7, 2, 9, 5]. For i from 1 to 4 do: For j from 1 to 5 - i do: If A[j] > A[j+1] then Swap A[j] and A[j+1]. What is the content of the array A after the outer loop completes its first iteration (i.e., when i = 1)?
- A.[2, 4, 5, 7, 9]
- B.[4, 2, 7, 5, 9]
- C.[4, 2, 5, 7, 9]
- D.[2, 7, 4, 5, 9]
Which of the following correctly describes the roles of the Program Counter (PC) and the Memory Address Register (MAR) during the instruction fetch phase of a machine cycle?
- A.PC holds the address of the next instruction to be fetched, and MAR holds the memory address currently being read.
- B.MAR holds the data fetched from memory, and PC holds the decoded instruction.
- C.PC holds the address in memory currently being read, and MAR holds the next instruction.
- D.MAR holds the address of the next instruction, and PC holds the accumulated result of arithmetic operations.
Alice wants to send a confidential message to Bob and ensure that Bob can verify that the message indeed came from Alice (authenticity and non-repudiation). Using public-key cryptography, which keys should Alice use to (1) sign the message, and (2) encrypt the message, respectively?
- A.(1) Alice's private key; (2) Bob's public key
- B.(1) Alice's public key; (2) Bob's private key
- C.(1) Bob's public key; (2) Alice's private key
- D.(1) Bob's private key; (2) Alice's public key
A school wants to host its student management system. Instead of maintaining physical servers, the school decides to rent virtual servers and storage space from a cloud service provider, but the school's IT staff will still install and manage the operating system, databases, and application software. Which cloud service model is the school utilizing?
- A.Software as a Service (SaaS)
- B.Platform as a Service (PaaS)
- C.Infrastructure as a Service (IaaS)
- D.Database as a Service (DBaaS)
Which of the following statements comparing a compiler and an interpreter is/are correct? (1) A compiler translates the entire source code into machine code before execution, whereas an interpreter translates and executes code line-by-line. (2) An interpreted program generally runs faster than a compiled program because it does not require a compilation step. (3) If there is a syntax error in the middle of the code, a compiler will report the error before generating any executable, while an interpreter may execute the preceding lines before stopping at the error.
- A.(1) only
- B.(1) and (2) only
- C.(1) and (3) only
- D.(2) and (3) only
In an 8-bit two's complement representation, what is the binary representation of the decimal number \(-37\)?
- A.11011011
- B.11011010
- C.10100101
- D.11100101
Which of the following statements about Cache Memory is/are correct?
(1) It is faster than registers inside the CPU.
(2) It stores frequently used data and instructions to speed up CPU access.
(3) It is typically larger in capacity than the main memory (RAM).
- A.(2) only
- B.(1) and (2) only
- C.(2) and (3) only
- D.(1), (2) and (3)
Which of the following IP addresses can be assigned to a host on a private local area network (LAN) without routing on the public Internet?
(1) 10.150.23.45
(2) 172.20.100.2
(3) 192.168.1.254
(4) 168.192.0.1
- A.(1) and (3) only
- B.(2) and (3) only
- C.(1), (2) and (3) only
- D.(1), (2), (3) and (4)
In public-key cryptography, when Alice wants to send a digitally signed message to Bob to ensure non-repudiation and integrity, Alice should:
- A.Encrypt the message hash with Alice's private key.
- B.Encrypt the message hash with Bob's public key.
- C.Encrypt the message hash with Alice's public key.
- D.Encrypt the message hash with Bob's private key.
In a relational database, there are two tables:
`STUDENT(StudentID, StudentName, ClassID)` and `CLASS(ClassID, ClassName, RoomNo)`.
`StudentID` is the primary key of `STUDENT`, and `ClassID` is the primary key of `CLASS`. `ClassID` in `STUDENT` is a foreign key referencing `CLASS`. Which of the following operations violates referential integrity?
- A.Inserting a new record into CLASS with a new ClassID.
- B.Inserting a new record into STUDENT with a ClassID that does not exist in CLASS.
- C.Deleting a record from STUDENT.
- D.Changing the ClassName of a class in the CLASS table.
Consider the table `Sales(SalesID, ItemID, Quantity, Price)`.
What is the purpose of the following SQL statement?
```sql
SELECT ItemID, SUM(Quantity * Price) AS TotalRevenue
FROM Sales
GROUP BY ItemID
HAVING SUM(Quantity * Price) > 1000;
```
- A.To find the list of item IDs where the unit price of any individual sale is greater than 1000.
- B.To calculate the total quantity sold for each item, and display those with total quantity greater than 1000.
- C.To find the item IDs whose total revenue (Quantity * Price) across all sales is greater than 1000.
- D.To display all sales records where the sales amount is greater than 1000, grouped by ItemID.
A table `ProjectMember(ProjectID, EmployeeID, EmployeeName, HoursWorked)` has a composite primary key `(ProjectID, EmployeeID)`.
The functional dependencies are:
- `(ProjectID, EmployeeID) -> HoursWorked`
- `EmployeeID -> EmployeeName`
Which normal form does this table satisfy, and what is the reason?
- A.First Normal Form (1NF) only, because there is a partial dependency.
- B.Second Normal Form (2NF) only, because there are no transitive dependencies.
- C.Third Normal Form (3NF), because all non-key attributes are fully functionally dependent on the primary key.
- D.It is not even in 1NF, because it has duplicate keys.
Consider the following pseudocode:
```
Set A to [3, 8, 2, 7, 5]
Set N to 5
For i from 0 to N - 2:
For j from 0 to N - 2 - i:
If A[j] > A[j+1] Then
Swap A[j] and A[j+1]
EndIf
EndFor
EndFor
```
What is the state of array `A` after the outer loop has completed exactly 2 iterations (i.e., `i = 0` and `i = 1`)?
- A.[3, 2, 7, 5, 8]
- B.[2, 3, 5, 7, 8]
- C.[2, 3, 7, 5, 8]
- D.[2, 3, 5, 8, 7]
Consider the following recursive function:
```
Function f(n, k)
If n == 0 Then
Return 0
Else If n % 2 == 1 Then
Return k + f(n // 2, k * 2)
Else
Return f(n // 2, k * 2)
EndIf
EndFunction
```
Note: `//` is integer division. What is the return value of the function call `f(11, 3)`?
- A.33
- B.13
- C.15
- D.48
A school wants to host its own virtual learning environment (VLE) website. The IT department decides to rent virtual machines (VMs) and storage from a cloud provider. They will install and maintain the operating systems, web server software, and the VLE application themselves. Which cloud service model is the school utilizing?
- A.Infrastructure as a Service (IaaS)
- B.Platform as a Service (PaaS)
- C.Software as a Service (SaaS)
- D.Database as a Service (DBaaS)
An 8-bit register stores a signed integer using two's complement representation. If the content of the register is \(10101100_2\), what is its decimal value?
- A.-84
- B.-44
- C.-83
- D.172
Consider two database tables: `STUDENT` and `CLASS`.\n`STUDENT` table: `StudentID` (Primary Key), `Name`, `ClassID` (Foreign Key referencing `CLASS.ClassID`)\n`CLASS` table: `ClassID` (Primary Key), `TeacherInCharge`\n\nWhich of the following actions will definitely violate referential integrity?\nI. Inserting a new student record with a `ClassID` that does not exist in the `CLASS` table.\nII. Deleting a class record from the `CLASS` table while some student records in the `STUDENT` table still have that `ClassID`.\nIII. Updating a student's `Name` to null.
- A.I only
- B.I and II only
- C.II and III only
- D.I, II and III
Consider the following pseudocode segment:\n\n```\nX = 15\nY = 6\nWhile X != Y Do\n If X > Y Then\n X = X - Y\n Else\n Y = Y - X\n EndIf\nEndWhile\n```\n\nWhat is the final value of `X`?
- A.3
- B.6
- C.9
- D.15
A computer has an IP address of `192.168.10.45` with a subnet mask of `255.255.255.224`. Which of the following IP addresses belongs to the same subnet as this computer?
- A.192.168.10.15
- B.192.168.10.30
- C.192.168.10.60
- D.192.168.10.65
Alice wants to send a confidential message to Bob using public-key cryptography. She also wants to ensure that Bob can verify the message indeed came from her (authentication). Which of the following describes the correct encryption process?
- A.Alice encrypts the message with Bob's public key, then encrypts the result with her own public key.
- B.Alice encrypts the message with her own private key, then encrypts the result with Bob's public key.
- C.Alice encrypts the message with Bob's private key, then encrypts the result with her own private key.
- D.Alice encrypts the message with Bob's public key, then encrypts the result with her own private key.
Consider the database table `SALES` below:\n\n| SaleID | Product | Category | Amount |\n|---|---|---|---|\n| 1 | Laptop | IT | 8000 |\n| 2 | Mouse | IT | 150 |\n| 3 | Desk | Furniture | 1200 |\n| 4 | Chair | Furniture | 800 |\n| 5 | Phone | IT | 5000 |\n\nWhat is the output of the following SQL query?\n\n```sql\nSELECT Category, AVG(Amount) FROM SALES\nGROUP BY Category\nHAVING COUNT(*) > 1 AND AVG(Amount) > 1000;\n```
- A.Category | AVG(Amount)
IT | 4383.33 - B.Category | AVG(Amount)
IT | 4383.33
Furniture | 1000.00 - C.Category | AVG(Amount)
Furniture | 1000.00 - D.Empty set (No rows returned)
Which of the following statements about "thrashing" in virtual memory is/are correct?\n\nI. Thrashing occurs when the operating system spends more time swapping pages in and out of secondary storage than executing actual program instructions.\nII. Increasing the capacity of physical RAM can help resolve the thrashing problem.\nIII. Defragmenting the hard disk is the most effective way to eliminate thrashing.
- A.I only
- B.I and II only
- C.II and III only
- D.I, II and III
During the fetch-decode-execute cycle of a CPU, which register is updated to store the address of the next instruction to be fetched immediately after an instruction is fetched?
- A.Memory Address Register (MAR)
- B.Program Counter (PC)
- C.Instruction Register (IR)
- D.Accumulator (ACC)
Consider a relation `BOOK_LOAN` with attributes:\n`{LoanID, StudentID, StudentName, BookID, BookTitle, LoanDate}`\n\nAssume that:\n- `LoanID` is the primary key.\n- Each student has a unique `StudentID` and a single `StudentName`.\n- Each book has a unique `BookID` and a single `BookTitle`.\n\nWhich of the following normal forms does this relation satisfy?\n\nI. First Normal Form (1NF)\nII. Second Normal Form (2NF)\nIII. Third Normal Form (3NF)
- A.I only
- B.I and II only
- C.II and III only
- D.I, II and III
A software development company wants to develop and deploy a new web application. They want to focus entirely on coding and managing the application, without worrying about managing the underlying operating systems, hardware servers, storage, or network infrastructure. Which cloud computing service model is most suitable for them?
- A.Infrastructure as a Service (IaaS)
- B.Platform as a Service (PaaS)
- C.Software as a Service (SaaS)
- D.Database as a Service (DBaaS)
Consider the following pseudocode:
```
Integer Array A[0..5] = {3, 8, 2, 9, 5, 4}
Integer i, temp
For i = 0 To 4 Do:
If A[i] > A[i+1] Then:
temp = A[i]
A[i] = A[i+1]
A[i+1] = temp
EndIf
EndFor
```
What is the content of array `A` after executing the pseudocode?
- A.{2, 3, 4, 5, 8, 9}
- B.{3, 2, 8, 5, 4, 9}
- C.{3, 8, 2, 5, 4, 9}
- D.{3, 2, 5, 4, 8, 9}
A database table `STUDENT` contains fields `StudentID`, `Name`, `Class`, and `Score`. Which of the following SQL queries can correctly display the class name and the number of students in each class who scored 60 or above?
- A.`SELECT Class, COUNT(*) FROM STUDENT WHERE Score >= 60 GROUP BY Class;`
- B.`SELECT Class, COUNT(*) FROM STUDENT GROUP BY Class HAVING Score >= 60;`
- C.`SELECT Class, COUNT(Score) FROM STUDENT WHERE Score >= 60 GROUP BY StudentID;`
- D.`SELECT Class, SUM(Score) FROM STUDENT WHERE Score >= 60 GROUP BY Class;`
In a relational database, table `PROJECT` has a composite primary key `(ProjID, MemberID)`. Table `MEMBER` has a primary key `MemberID`. Which of the following statements about referential integrity is/are correct?
(1) `MemberID` in `PROJECT` is a foreign key referencing `MemberID` in `MEMBER`.
(2) `MemberID` in `PROJECT` cannot contain duplicate values.
(3) A record cannot be added to `PROJECT` if its `MemberID` does not exist in `MEMBER`.
- A.(1) only
- B.(1) and (3) only
- C.(2) and (3) only
- D.(1), (2) and (3)
Consider the following Entity-Relationship (ER) diagram representing a library system:
`[Reader] <---- (1:N) ---- [Borrow] ---- (N:1) ----> [Book]`
Which of the following descriptions about the relationship between `Reader` and `Book` is correct?
- A.A reader can borrow multiple books, and a book can be borrowed by multiple readers at different times.
- B.Each reader can only borrow one book, and each book can only be borrowed by one reader.
- C.The relation `Borrow` should have a composite primary key consisting of keys from both `Reader` and `Book` tables only, without any other fields allowed.
- D.The relationship between `Reader` and `Book` is a one-to-one (1:1) relationship.
A computer has the IP address `192.168.10.75` and the subnet mask `255.255.255.240`. Which of the following is the network address (or subnet ID) of the subnet to which this computer belongs?
- A.`192.168.10.0`
- B.`192.168.10.64`
- C.`192.168.10.72`
- D.`192.168.10.80`
An audio file is recorded with the following specifications:
- Sampling rate: \(44.1 \text{ kHz}\)
- Sampling size: \(16\text{-bit}\)
- Channel: Stereo (2 channels)
- Duration: \(2\text{ minutes}\)
If no compression is applied, what is the estimated file size of the recorded audio file in megabytes (MB)? (Assume \(1 \text{ MB} = 10^6 \text{ bytes}\))
- A.\(5.3 \text{ MB}\)
- B.\(10.6 \text{ MB}\)
- C.\(21.2 \text{ MB}\)
- D.\(42.3 \text{ MB}\)
Which of the following descriptions about different types of computer memory is/are correct?
(1) Cache memory is faster than main memory (RAM) and is used to store frequently accessed data.
(2) ROM is non-volatile and is typically used to store the BIOS/UEFI boot programs.
(3) RAM is volatile, meaning its content is lost when the power is turned off.
- A.(1) and (2) only
- B.(1) and (3) only
- C.(2) and (3) only
- D.(1), (2) and (3)
Alice wants to send a confidential document to Bob over the Internet. To ensure both **confidentiality** (only Bob can read the document) and **authenticity** (Bob can verify that Alice is the sender), which of the following encryption methods should Alice use?
- A.Encrypt the document using Alice's private key, then encrypt the result using Bob's public key.
- B.Encrypt the document using Bob's private key, then encrypt the result using Alice's public key.
- C.Encrypt the document using Alice's public key, then encrypt the result using Bob's private key.
- D.Encrypt the document using Bob's public key, then encrypt the result using Alice's public key.
A software company wants to deploy a web application. Instead of managing physical servers, they decide to rent virtual machines and storage from a cloud service provider, allowing them to install their own operating systems, databases, and application software. Which cloud computing service model are they utilizing?
- A.Software as a Service (SaaS)
- B.Platform as a Service (PaaS)
- C.Infrastructure as a Service (IaaS)
- D.Database as a Service (DBaaS)
Which of the following are the typical tasks performed by an operating system (OS)?
(1) Allocating memory space to different running applications.
(2) Managing input/output devices using device drivers.
(3) Scanning files to detect and remove computer viruses.
- A.(1) and (2) only
- B.(1) and (3) only
- C.(2) and (3) only
- D.(1), (2) and (3)