Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit


Main Examination Period 2018-2019

ECS404U

Computer Systems and Networks



Question 1

This question is about Computer Architecture

(a)  Explain how a modern mobile phone is similar in architecture to a modern laptop. A

good answer should cover the components of each, the way they are put together, and acknowledge where there are differences. [5 marks] (b)  A laptop computer with a solid state disk (SSD) will typically run faster than an

otherwise identical computer with a conventional magnetic hard disk (HDD). But the peak data transfer rates for the two forms of disk are broadly similar.  Define the concepts of bandwidth and latency and use these to explain the observed patterns in performance. In addition to the definitions, a good answer will explain (briefly) the physical reasons why the SSD has better performance than the HDD.

[5 marks]

(c)  List two places where you might expect to find a hardware cache in a computer architecture. Taking one of these as an example, explain how that cache might be expected to improve the computer’s performance. [5 marks]

(d)  Draw the circuit diagram symbol for a pmos transistor and explain how it operates as a switch (labelling the parts you mention). [5 marks]

(e)  Figure 1 below depicts an and gate.

(i)  Explain the sense in which this circuitry can be said to compute the logical function and (A).

(ii)  Explain in detail how the circuitry works to compute the correct answer for the

operation True A False.


High=1 A

B

C



Low=0


Figure 1: and gate


[5 marks]


Question 2

This question is about forms of digital representation.

(a)  This part is about the binary representation of unsigned integers.

(i)  The following bit sequences represent unsigned integers in binary form. Translate them to standard decimal giving your reasoning:

·  11110101

·  00001001

(ii)  Using the standard binary long addition algorithm, compute the sum of 11110101 and 00001001 as unsigned binary integers.  Your answer should also be an unsigned binary integer.

(iii)  Using the standard binary long multiplication algorithm, compute the product of 11110101 and 00001001 as unsigned binary integers. Your answer should also be an unsigned binary integer. [7 marks]

(b)  This part is about the binary representation of signed integers.

The bit sequences 11110101 and 00001001 are now viewed as representations of signed integers using 8-bit twos complement.

(i)  In two’s complement, how can we tell whether a bit sequence represents a positive or a negative number?

(ii)  What numbers are represented by 11110101 and 00001001?

(iii) Using binary methods only, calculate the sum and product of 11110101 and

00001001 as 8-bit two’s complement numbers. Marks will mainly be given for the method(s) being used, which should be clearly explained. You need not repeat any calculations carried out previously. [8 marks]

(c)  The 64-bit IEEE floating point representation uses 1 bit for the sign, 11 bits for the exponent and the remaining 52 bits for the trailing significand.

(i)  Using a decimal floating point example, explain the meanings of the terms sign, exponent and significand.

(ii)  Using the example 11000000 00001100 00000000 ... explain which bit sequences give the sign, the exponent and the significand and how they are put together to make a floating point number.   You do not need to calculate the decimal representation of the number.   What is sought is an explanation of how the representation works in this example.

[5 marks]

(d)  In UTF-8 the character ’A’ is represented in Hex by 41 and the character ’Ω’ is represented in Hex by CEA9.

(i)  What are the actual bit sequences that represent ’A’ and ’Ω’?

(ii)  Explain the relationship between ASCII and UTF-8, using ’A’ and ’Ω’ as examples

to make your points. [5 marks]



Question 3

This question is about Assembly Language and Instruction Set Architecture.

(a)  Processors are often described as 32-bit or 64-bit. Explain what these terms mean,

making clear the difference between them.

[4 marks]

(b)  Briefly describe the idea of “pipelining” in computer architecture.

[4 marks]

(c)  Provide one advantage and one disadvantage of a “Reduced Instruction Set Computer (RISC)” (like MIPS) as compared to a “Complex Instruction Set Computer (CISC)” (like the x86-family).

[4 marks]

(d)  A short piece of 32-MIPS Assembly code is shown in Figure 2. Trace the execution of this code by giving the values in registers $t0 and $t1 as you step through the execution. That is, write down the values of both registers $t0 and $t1 (as a pair) each time either one of them changes as you step through the programme until the programme finishes execution. You may assume the execution is started at line 1 with 0 in all registers, and proceeds until the program halts. [6 marks]



addi $t0 , $zero , 4

addi $t1 , $zero , 3

LOOP:

$t0 , $zero , DONE $t1 , $t1 , $t1 $t0 , $t0 , -1

#branch on equals

LOOP

# jump

DONE:

addi $v0 , $zero , 10

# s e t v0 t o 1 0 t o s e l e c t the e x i t s y s c a l l

s y s c a l l

# i n v o k i n g the s y s c a l l t o e x i t .




Figure 2: 32-MIPS Assembly code



Page 5


(e)  Write down the equivalent MIPS assembly for the java code in Figure 3.  Assume that the values of variables a and b are already loaded in registers $t0 and $t1 respectively, i.e., $t0 holds a and $t1 holds b.  You do not need to initialise the variables, or insert the exit system call, so something like lines 4-10 of Figure 2 will do.


while   ( a  < b ) {

b  =  b  -   10;

a  =  a  +  2;

}


Figure 3: Java code


[7 marks]



Question 4

This question is about Computer Networks.

(a)  This part is about TCP (Transmission Control Protocol) and UDP (User Datagram

Protocol): two of the main transport layer protocols in the internet.

For each of the items in the following list, determine whether it is present in the header of the datagram of the protocol. That is, for each of the following, state whether it is part of a TCP header, part of the UDP header, both, or neither.  Your answers must include a short explanation explaining the role played by the port or sequence numbers, and why that means they are, or are not present in the header.

·  (source and destination) port numbers

· datagram sequence number

[8 marks]

(b)  This part is also about TCP and UDP.

Which of the two protocols, TCP and UDP, is more suitable for communication of live audio and video in a voice-over-IP application (like Skype)? Justify your answer.

[7 marks]

(c)  When data frames are routed from a client computer to a remote server over many hops, using TCP/IP, determine which one of the following stays the same throughout the trip and which one changes. Provide a brief reasoning for each answer.

· destination port number

· destination MAC address

[5 marks]

(d)  Explain how TCP can find out whether the communicated datagrams are corrupted (due to noise on the communication channel).

[5 marks]