FIT1047 S1 2019 Sample Exam Solutions
FIT1047 S1 2019 Sample Exam Solutions
FIT1047 S1 2019 Sample Exam Solutions
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 June 5th for you to check that your solutions
are correct. However, you should try to complete all questions without looking at solutions first.
• 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
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 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
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 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
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 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 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. [6 marks]:
Draw a sketch of the von Neumann Architecture and name the different components.
Question 2. [2 marks]
a) How many bits are needed to express 1024 numbers?
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
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.
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
Question 8. [3 marks]
Using a truth table show that 𝑦𝑦(¬𝑥𝑥 + 𝑥𝑥) = 𝑦𝑦 for all values of 𝑥𝑥and 𝑦𝑦.
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
Page 10 of 18
This circuit adds two 3-bit numbers A1A2A3 and B1B2B3 and also outputs a carry bit.
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.
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.
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.
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.
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
Page 13 of 18
Question 18. [1 marks]
What does the abbreviation “POST” stand for in a computer's boot process?
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.
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.
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.
Page 15 of 18
Question 26. [2 marks]
Name two different methods for transmitting digital data through cables.
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.
HTTP
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.
Page 16 of 18
Question 31. [2 marks]
What is the difference between interior and exterior routing protocols?
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.
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.
• 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
Page 18 of 18