Semester 1 2021 FIT 1047 Sample Exam
Faculty of Information Technology
Note that this is a sample exam only. It is only made available for training purposes and does not contain questions from the actual exam.
The goal is to self-test and get an idea of the character of questions that can be expected in the actual exam.
In the actual exam it is not permitted to use any material, books, or calculators.
The idea of this exam is to try to solve all the questions on your own and if you don’t know the answers, go back to the material or to consultation to understand the topic. Very often, just looking at the solution can create the illusion that you would also be able to do it yourself.
Solutions for this sample exam will be available from week-12 for you to check that your solutions are correct. However, you should try to complete all questions without looking at solutions first.
Important Disclaimer: Preparing for Your eEXAM
• This sample questions are only limited and small samples chosen to give
you some directions with type of Q to expect.
• We have in the lecture slides & covered in the lab/tutorials are all
important and it is expected you should study and prepare from them
It is advisable to complete your required preparation(s) as quickly as possible and be prepared at least 1 weeks before your exam. The sample exam and coverage can provide ONLY sample preparation materials to help you prepare for the exam. The Sample exam Questions above ARE NOT designed to provide you with all exam coverage for final exam assessment of your current skill levels, but to orient you to the style of question used in the actual final exam assessment. DO NOT treat the sample questions as the ONLY scope for your practice exam, or as the actual exam. The final
Questions will vary considerably in their content, coverage and the level of difficulty.
Page 1 of 18
Part A: Multiple Choice Questions (The actual exam will have 30 MCQs for 30 marks in total)
Instructions:
1. Each question has only one correct answer. Select the single, best choice for each question. 2. No penalty is applied for incorrect answers.
3. Ambiguous responses will be ignored.
4. Incorrect filling of the solution table with lead to marks not being correctly assigned.
Question 1. Which base is usually used to display a binary file to a user? a) Base 2
b) Base 8
c) Base 10
d) Base 16
e) None of the above
Question 2. Adding the two signed magnitude binary numbers 01000101 and 00011101 equals? a) 10001101
b) 11101010
c) 11010101
d) 01100010
e) None of the above
Question 3. What are the decimal values for the two signed magnitude numbers 01001101 and 10011101?
a) 77 and 28
b) 72 and -22
c) 77 and -29
d) -80 and -16
e) None of the above
Question 4. Subtracting 01110011 from 00001011 using 2’s complement notation equals? a) 10011000
b) 11010101
c) 00101100
d) 11010100
e) None of the above
Question 5. How many different numbers can be represented with n bits? a) nn
b) 2
c) log2(n) d) 16
e) 32
Question 6. Which of the following basic circuits is used in an ALU? a) An S/R adder
b) A multiplexer
c) A D-Flipflop
d) A 2’s complement e) A decoder
Page 2 of 18
Question 7. Assume a computer architecture where instructions are 64 bits long, which contain a 56 bit memory address, and enough bits to address 8 registers. How many different opcodes can this computer architecture support?
a) 3 b) 7 c) 5 d) 16 e) 32
Question 8. Which sequence of instructions in MARIE assembly code results in the value stored at address 123 to be negated?
a) Load 0, Subt 123, Store 123 b) Clear, SubtI 123, StoreI 123 c) Load 0, SubtI 123, Store 123 d) Clear, Subt 123, Store 123 e) Load 0, Subt 123, StoreI 123
Question 9. What is a context switch?
a) The operating system switching from one process to another
b) An I/O device that requests that the CPU deals with new input
c) A signal raised by the currently running process that causes the operating system to perform
I/O.
d) A timer event that causes the operating system to perform process scheduling.
Question 10. Which of the following is not a typical function of operating systems? a) Managing the CPU’s fetch-decode-execute cycle
b) Handling hardware interrupts
c) Managing virtual memory
d) Providing a graphical user interface e) Providing access to I/O devices
Question 11. Which of the following is a difference between preemptive timesharing and cooperative timesharing?
a) Preemptive t. is used in practice, cooperative t. is not.
b) Preemptive t. can interrupt malicious or buggy processes, cooperative t. cannot.
c) Preemptive t. does not require hardware support, cooperative t. does.
d) Preemptive t. does not require cooperation from the user, cooperative t. does. e) Preemptive t. makes processes run more efficiently compared to cooperative t.
Question 12. Which of the following scheduling mechanisms can achieve fairness? a) Round-robin scheduling
b) Cooperative scheduling
c) First-come first-served
d) Last-in first-out
e) Memory scheduling
Question 13. ARQ means that
a) a receiver that detects an error in a message asks the sender to retransmit the message until it
is received without error.
b) the common carrier Automatically Returns Queries to the subscriber upon receipt of such queries.
c) a sender is using a data link protocol called Asynchronous Repeating reQuest.
Page 3 of 18
d) a fiber optic cable meets the American Registered Quality, a certification standard for use in high-quality data communication transmission lines.
e) a sender is using a parity scheme called Array Resource Quality.
Question 14. Which of the following problems is addressed by the CA part of CSMA/CA? a) The “hidden node” problem in wireless LANs.
b) The “spam” problem in email networks.
c) The “Certification Authority” problem in public key cryptography.
d) The “Collision Avoidance” problem in wired Ethernet.
Question 15. How does TCP identify the application layer process that should handle a message? a) Using the IP address.
b) Using the MAC address.
c) Using the port number.
d) Using the process ID.
e) Using the application ID.
Question 16. Which of the following is not part of the TCP protocol? a) The four-way handshake.
b) The three-way handshake.
c) Acknowledgement numbers.
d) Sequence numbers.
e) HTTP status codes.
Question 17. A “client-server” architecture approach
a) places all or almost all of the application logic on the client b) places all or almost all of the application logic on the server c) places all or almost all of the data storage logic on the client d) places all or almost all of the presentation logic on the server e) places all or almost all of the network logic on the client
Question 18. Which of the following parameters deteriorates with distance between sender and receiver?
a) Bandwidth
b) Burst rate
c) Frame rate
d) Committed Information Rate e) Latency
Question 19. Which of the following is an independent malicious program that enables the attacker to remotely control the computer?
a) Virus
b) Worm
c) Trojan Horse d) Backdoor
e) Botnet
Question 20. Digital signatures ensure that a message has not been a) intercepted
b) delayed c) forwarded d) forged
e) read
Page 4 of 18
Question 21. One main role of a packet-filter firewall is to drop packets that do not match the criteria defined in policy rules. What are typical parameters?
a) Content on application layer
b) MAC addresses
c) source and destination IP addresses and ports d) route of the packet
e) digital signatures
Question 22. Which does IDS stand for in network security? a) Information Decryption System
b) Intelligent Data Security
c) International Defense Society
d) Internet Decoding Specification
e) Intrusion Detection System
Question 23. Which property is required for storing passwords? a) Confidentiality
b) Authenticity
c) Non-repudiation
d) Privacy e) Integrity
Question 24. Which of the following mechanism can be instantiated as software on individual PCs or in hardware as a special device in the network ?
a) Firewalls
b) Virus scanners
c) Intrusion detection d) Backup
e) All of the above
Page 5 of 18
Part B: Short Answer Questions (Marks show for questions are just indicative, the short answer questions part will have 70 marks in total)
Question 1. [4 marks]:
Name and briefly explain the feature of modern CPUs that is used to restrict applications from accessing certain CPU functionality such as I/O.
Name of the feature:
Kernel mode versus user mode (system calls can also be accepted) (2 marks)
Explanation:
Processes in user mode cannot execute functions restricted to kernel mode.
Need to use system calls e.g. for I/O functionality. Thus, the operating system kernel can control access and enforce access control.
It is also okay to use an example to explain the use of system calls. (2 marks)
Question 2. [4 marks]
a) How many bits are needed to express 1024 numbers?
1024=210, thus 10 bits are needed.
b) How many bits are in 32 Gibit? (Give answer in power of 2)
One Gibit are 230 bits. 32 times one Gib means 25 times 230. Thus, the correct result is 235
Question 3. [3 marks]
Explain the subtraction of two positive integers using 2’s complement arithmetic.
Subtracting B from A is the same as adding A and –B. To negate B in 2’s complement arithmetic, we flip all bits and add 1. We can then add the result to A using normal binary addition.
Page 6 of 18
Question 4. [3 marks]
A 16-bit word in memory contains two 7-bit ASCII characters and one additional even parity bit for each character. The parity bit is the right-most bit.
a) If you find 01101000 10001110. Would this be a valid representation of two characters?
No, because the first byte has an odd number of 1s.
b) Which two characters are encoded in 10001101 01101010?
F5
ASCII Hexadecimal ASCII Binary (7-bit) Character Value
030 0110000 0
031 0110001 1
032 0110010 2
033 0110011 3
034 0110100 4
035 0110101 5
036 0110110 6
037 0110111 7
038 0111000 8
039 0111001 9
041 1000001 A
042 1000010 B
043 1000011 C
044 1000100 D
045 1000101 E
046 1000110 F
047 1000111 G
048 1001000 H
Page 7 of 18
Question 5. [3 marks]
Give one reason why signed integer arithmetic is not suitable for computation of 3D graphics.
Large number calculations in 3D modelling are much more efficient in floating point.
Question 6. [6 marks]
Convert the following numbers as specified. Show all workings.
1. From base 10 to base 16: 1286
506
2. From base 10 to base 2: 2050 100000000010
3. From base 16 to base 2: A F81C 10101111100000011100
Page 8 of 18
Question 7. [6 marks]
Convert the decimal integer -65 to an 8-bit binary representation in 2 ́s complement notation. Show all workings.
First convert 65 to binary, fill with leading 0s and then convert to 2’s complement : 65 in binary is 1000001, we need 8 bit: 01000001
Flip all bits: 10111110, add 1: 10111111
Thus, the answer is:
10111111
Using a truth table show that 𝑦𝑦(¬𝑥𝑥 + 𝑥𝑥) = 𝑦𝑦 for all values of 𝑥𝑥and 𝑦𝑦. 𝑋𝑋 𝑌𝑌 ¬𝑋𝑋 + 𝑋𝑋 𝑌𝑌(¬𝑋𝑋 + 𝑋𝑋)
Question 8. [3 marks]
0
0
1
0
0
1
1
1
1
0
1
0
Page 9 of 18
Question 9. [2 marks]
Draw a combinational circuit for the following Boolean function using only NOT, OR, and AND gates:
𝐹𝐹(𝑋𝑋1, 𝑋𝑋2, 𝑋𝑋3) = X1¬X2¬X3 + X1X2¬X3 + ¬X1X2¬X3
Thus, the resulting optimized function is:
(𝑿𝑿𝑿𝑿, 𝑿𝑿𝑿𝑿, 𝑿𝑿𝑿𝑿) = 𝑿𝑿𝑿𝑿¬𝑿𝑿𝑿𝑿 + 𝑿𝑿𝑿𝑿¬𝑿𝑿𝑿𝑿
Question 10. [5 marks]
Identify the function of the circuit below. Give an example of inputs A and B (by writing into the squares) and fill in all intermediate and final outputs (dotted squares and circles).
Page 10 of 18
This circuit adds two 3-bit numbers A1A2A3 and B1B2B3 and also outputs a carry bit.
Question 11. [6 marks]
Identify and briefly explain the roles of the three main components of a Central Processing Unit.
ALU (Arithmetic Logic Unit): Performs arithmetic computations CU (Control Unit): Performs the fetch, decode, execute cycle Registers: Temporary storage for data and instructions
Page 11 of 18
Question 12. [3 marks]
Describe the difference between a direct jump and an indirect jump instruction, using the MARIE system as an example.
A direct jump causes the CPU to continue execution at the given address (e.g. address X for the instruction Jump X). An indirect jump continues execution at the address pointed to by the given address. E.g. JumpI X jumps to the address stored in memory location X.
Question 13. [6 marks]
Consider the program below, written in MARIE assembly language. The addresses at which the individual instructions and data values are stored in memory are shown in the left column, for your convenience.
000 Loop,
001
002
003
004 005
006 Compute,
007
008
009
00A 00B
00C One,
00D Result,
00E Addr,
00F 010 011
012
LoadI Addr
SkipCond 400
Jump Compute
Load Result
Output
Halt
Add Result
Store Result
Load Addr
Add One
Store Addr
Jump Loop
DEC 1 DEC 0
HEX 010
DEC 3
DEC 6
DEC 9
DEC 0
/ Skip if AC=0
Assume that the processor starts executing the program from address 000.
a) How many times will the instruction at address 001 be executed before the program reaches the Halt instruction?
The program will jump back to Loop as long as the value in the the memory cell with the address in Addr is not 0. It starts with 010 (value Dec 6) and each loop 1 is added. Second time it is 011 (value Dec 9). Third time, it is 012 (Value Dec 0). Thus, the answer is three times.
b) Which value will be stored at address 00E when the program reaches the Halt instruction? HEX 012
c) What is the value printed by the Output instruction (assuming the output mode is set to “decimal”)?
First loop, it adds DEC 6 to Result, second loop it adds DEC 9 to Result, third time, it skips the jump and outputs Result. Thus, the output is DEC 15
Page 12 of 18
Question 14. [1 mark]
Identify which MARIE instruction corresponds to the following RTL code:
1. MAR ← PC
2. MBR ← M[MAR] 3. IR ← MBR
4. PC ← PC+1
5. MAR ← X
6. MBR ← PC
7. M[MAR] ← MBR 8. AC ← MAR
9. PC ← AC + 1
JnS X
Explanation (not necessary in exam question): The first four lines of this RTL code just fetch the instruction and increase the program counter (PC+1). Line 5.-7. stores the address of the next instruction (PC+1) into the memory location X. This is the return address. Line 8. And 9. then compute the address X+1 (which is where the subroutine starts) and writes this into PC, which means a jump to that address.
Question 15. [3 marks]
Briefly explain the concept of a flipflop circuit. Name a computer component where a flipflop is used.
A flipflop is a sequential circuit that can store one bit of information, and the stored information can be read and changed at a later point in time. It can be used to implement registers.
Question 16. [3 marks]
Briefly explain the difference between sequential and combinational circuits.
The output of a sequential circuit depends on previous inputs (e.g. a flipflop). The output of a combinatorial circuit only depends on its current inputs, i.e., it simply computes a Boolean function of the inputs.
Question 17. [3 marks] 16
Assume a memory that can store 2 bytes. What are the lowest and highest addresses, and how many bits are needed to store those addresses, if the memory is
1. Byte addressable
Each byte needs to be addressed, thus we have 216 addresses. This needs 16 bits. Thus, the lowest address would be 0000000000000000 and the highest would be 1111111111111111
2. Word addressable with a word size of 16 bits
Each word consists of 2 bytes. Thus, we only need 216/2 = 215 addresses. This needs 15 bits and the lowest address is 000000000000000, while the highest is 111111111111111
Page 13 of 18
Question 18. [1 marks]
What does the abbreviation “POST” stand for in a computer’s boot process?
Power On Self Test
Question 19. [2 marks]
Give one possible reason why 3D graphics are usually not available for firmware (BIOS/UEFI) configurations.
Different answers are possible. Examples:
– Drivers are not available before OS is started. – BIOS storage space is restricted
Question 20. [2 marks]
Briefly explain the concept of a process, including the states it can be in.
A process is a program in execution, in addition to the instructions, it also includes the context (state of the registers, memory, etc.). After a process is created it always is in one of the states running, waiting, or blocked until it is terminated.
Question 21. [3 marks]
Briefly explain how the hardware and operating system work together to control how programs access I/O devices.
The hardware (the CPU) has a kernel mode and a user mode, and in user mode it restricts processes so that they cannot access I/O devices directly. The operating system provides a set of system calls, which are basically subroutines that implement I/O functionality and that user mode processes can call. That way, the OS can control what kind of I/O each process is allowed to perform.
Page 14 of 18
Question 22. [3 marks]
Name and briefly explain the mechanism that operating systems use to provide each process with its own address space.
Virtual memory: when processes access a location in memory, the hardware maps that virtual location to a physical memory location, e.g. using a base register storing the physical address for the current process. The OS sets up the base register when it switches between processes.
Question 23. [4 marks]
Name the layers of the TCP/IP architecture (also called the Internet Model), and briefly explain the function of layer 2.
Application, Transport, Network, Data Link, Physical
Layer 2 is the Data Link layer:
This layer is the interface to the hardware; it encodes digital data into signals to be sent over the physical medium and it controls access to the physical medium.
Question 24. [2 marks]
Briefly explain how a switch works.
A switch connects different devices in a Local Area Network. When it receives a packet, it looks into its forwarding table to find out to which port the device with the destination MAC address is connected to. If the destination is not in the forwarding table, it sends the message to all ports. When a packet comes in e.g. from MAC address A on port 3, it adds that information to the forwarding table.
Question [2 marks]
Briefly explain how a router works.
A router provides the connection between different IP networks. When a packet comes in, it looks up the destination IP address in its routing table. It then sends the packet either directly to the destination (if the destination is directly connected to the router), or to another router. Routing tables can be configured statically or using dynamic routing protocols.
Question 25. [3 marks]
Briefly describe the two-tier email architecture (using a diagram).
Show in a diagram: sender-client sends to sender’s mail-server, mail-server sends to receiver’s mail server. Finally, receiver’s client retrieves mail from receiver’s mail server.
Page 15 of 18
Question 26. [2 marks]
Name two different methods for transmitting digital data through cables.
Unipolar or bipolar encoding
(Alternatively, NRZ and Manchester encoding would also be acceptable, also other notions, e.g. baseband and passband or parallel vs. serial are acceptable)
Question 27. [3 marks]
Explain the advantage of roaming in wireless networks.
Roaming enables devices to automatically move from one access point to another, without losing the network connection. This enables us to build large wireless networks by combining access points that each have a limited range.
Question 28. [1 mark]
Name the acronym of the application layer protocol used for accessing the World Wide Web.
HTTP
Question 29. [3 marks]
Are wireless LANs more or less secure than wired Ethernet? Explain your answer.
In a wired Ethernet an attacker needs to get access to the cable or the switch to read or manipulate communication or to access devices. In a wireless LAN, interfaces are accessible over the air. Physical access control (walls, locked doors, etc.) does not provide protection. Also, interfaces are accessible without physical access and could be used to attack a device. Thus, in general wireless LANs can be considered less secure.
Question 30. [3 marks]
Explain the high-level structure of the Internet.
The Internet is a network of networks. Each of these large-scale network is called an Autonomous System (AS), and is typically run by a single organisation (e.g. an ISP, or a university). Autonomous Systems are inter-connected using routers that use the BGP protocol for exchanging routing information.
Page 16 of 18
Question 31. [2 marks]
What is the difference between interior and exterior routing protocols? Interior routing: Routing within autonomous systems
Exterior routing: Routing packets between different autonomous systems
Question 32. [4 marks]
What are the end-points of the encrypted channel in a VPN connection? Explain why a VPN does not provide end-to-end security between a home-office PC and a PC in the enterprise network.
The end-points are a VPN client, often a PC, laptop or other personal device and a VPN gateway to the internal network. As the encrypted channel ends at the gateway, traffic from the gateway to the PC within the internal network is not encrypted and there is no end-to-end security between the two PCs.
Question 33. [3 marks]
Certificates are used to identify servers when using TLS. Give one reason, why certificates can be problematic.
A certificate needs to be related to a particular server, be valid and signed by a trusted certification authority. Some possible problems are:
– A certificate check in the browser fails, but the user needs to accept the certificate in order to use a service.
– There is a long list of certification authorities installed in a browser. It is unclear if all of them are trustworthy. There have been cases of malicious certificates.
– Everybody can buy a certificate for their website. Thus, the certificate does not say anything about how trustworthy the site is.
Question 34. [6 marks]
Explain the term demilitarised zone and provide 2 examples of firewall placements for such a zone.
A demilitarised zone lies between an internal network and the Internet. It usually contains those servers and gateways that need to be accessible from outside the network. A DMZ can be realized with one firewall (three-legged), one leg is the Internet, the second the DMZ and the third is the internal network. Better is a DMZ with two firewalls, one towards the Internet and a second one towards the internal network and the DMZ between the two.
(You could also draw a diagram to explain).
Page 17 of 18
Question 35. [3 marks]
Compare public Message Authentication Codes and Hash Functions showing 1 similarity and 2 differences.
Explanation: The term public means that both functions are publicly known and can be easily computed by anybody.
One similarity: Both map longer messages to shorter values of a fixed length. Thus, they can both can be used to check if a message was changed.
One difference: The MAC uses a key (secret) in addition to the actual message as input. Thus, in a message exchange, an attacker is not able to create a valid MAC for a manipulated message, while the attacker could easily compute a valid Hash value for any message.
Question 36. [3 marks]
What is a currently recommended hash function for use in digital signatures and which hash function is still used, but no longer recommended.
Currently recommended: SHA256, SHA512, SHA2 Still in use, but no longer recommended: SHA1
Important Disclaimer: Preparing for Your EXAM
• This sample questions are only limited and small samples chosen to give
you some directions with type of Q to expect.
• We have in the lecture slides & covered in the lab/tutorials are all
important and it is expected you should study and prepare from them
It is advisable to complete your required preparation(s) as quickly as possible and be prepared at least 1 weeks before your exam. The sample exam and coverage can provide ONLY sample preparation materials to help you prepare for the exam. The Sample exam Questions above ARE NOT designed to provide you with all exam coverage for final exam assessment of your current skill levels, but to orient you to the style of question used in the actual final exam assessment. DO NOT treat the sample questions as the ONLY scope for your practice exam, or as the actual exam. The final
Questions will vary considerably in their content, coverage and the level of difficulty.
Page 18 of 18