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


Main Examination Period 2019-2020

ECS404U

Computer Systems and Networks



Question 1

Computer Architecture

(a)  In a circuit diagram the symbol in figure 1 represents a transistor. Name the type of

transistor and the different connections to it, and explain how it functions as a switch. You are not asked for a physical explanation, just an explanation in terms of the roles of the different connections. [5 marks]




Figure 1: a transistor


(b)  Figure 2 below depicts a logic gate.

(i)  Detailing which transistors give open or closed circuits, explain the output at C when the input at A=0 and the input at B=1.

(ii)  Identify the connective being computed by this logic gate and explain your answer.


High=1



Low=0


A T1    B T2

A


T4



C


Figure 2: a logic gate


[8 marks]

(c)  Figure 3 below depicts a DRAM cell.

(i)  What is the function of a capacitor?

(ii)  Explain how this cell operates to store a single bit, making clear the roles of the

capacitor, transistor, word line and bit line.

(iii)  Explain why the information in this cell is lost when the power to it is cut off.




bit line


word line



capacitor

reference ground


Figure 3: DRAM


[6 marks]

(d)  The chip in Figure 4 has the Intel Kaby Lake architecture. Some of it marked as being L3S, which stands for Level 3 Cache.

(i)  In the context of Computer Architecture, what is a cache? (ii)  Why do computer and chip designers use cache?

(iii)  What is the function of this particular cache?

(iv)  Why is it described as Level 3?



Figure 4: Intel Kaby Lake chip (Question 1-(d)).


[6 marks]

Question 2

Digital Representation

Simply giving an answer will never achieve full marks.  You must always explain your methods.

(a)  These bit sequences represent numbers in 8-bit 2’s complement.  Explain which numbers they are and how you know whether the numbers are positive or negative.

(i)  11110011

(ii)  00000110

[5 marks]

(b)   (i)  Show that you understand how to do long multiplication in binary by multiplying 11110011 and 00000110.

(ii)  What are the rightmost 8 bits of your answer?

(iii)  What do they represent as a number in 8-bit two’s complement.

[6 marks]

(c)  This part is about floating point representation. The bit sequence below represents a number in 64-bit IEEE floating point format:

11000000  00100101  00000000  00000000  00000000  00000000  00000000  00000000


(i)  The first bit represents the sign of the number. Is this number positive or negative? (ii)  The next 11 bits represent the exponent. In this format, we get the exponent by

subtracting 1023 from the number represented by this bit sequence. What is the actual exponent?

(iii)  The remaining bits give the part after the point in the significand.  What is the significand in binary format and what is it as a decimal number?

(iv)  Explain how these components are put together to give the final number repre-

sented, and give the number.

[6 marks]

(d)  The MAC address of my device is: 2c:8a:72:bd:ef:38

(i)  Explain the format being used and how it represents a bit sequence. (ii)  What is the bit sequence?

[4 marks]

(e)  In ASCII, the decimal code for the character ’A’ is 65, and for lower case ’a’ it is 97.

(i)  Put these into binary and explain why it makes sense to have the upper and lower case characters differ by 32.

(ii)  Explain the limitations with ASCII that prompted the development and adoption of Unicode.

(iii)  How many bytes are used to represent an ASCII character and how many bytes


to represent one in UTF-8?

[4 marks]


Question 3

Instruction Set Architecture, Assembly Language

(a)  Can we use compilers that are designed for different architectures interchangeably?

For instance, can we use an Intel/AMD C++ compiler to compile our code to be used on a CPU with ARM or MIPS architecture? Your answer should be supported by brief reasoning.

[4 marks]

(b)  Explain why “branching” in the programmes (that is, when there is a conditional jump)

can cause a problem for “pipelining” and reduce its efficiency.

[5 marks]

(c)  A 32-bit MIPS instruction is 0x21490023 (that is, 21490023 in HEX representa- tion).

(i)  What is the actual bit-sequence of this instruction?

(ii)  The opcode of this instruction corresponds to ADDI (add-immediate). Using the

following reminder about the 3 different formats of the 32-bit MIPS instructions (Figure 5) and its register names (Table 1), along with your answer to the previous part, fully identify the instruction. Namely, identify the operands of the instruction, express it in MIPS Assembly mnemonics, and briefly describe in words what operation it performs.

6 bits      5 bits    5 bits    5 bits     5 bits      6 bits


opcode

rs

rt

rd

shamt

funct



6 bits      5 bits    5 bits


16 bits



opcode

rs

rt

IM (Immediate Value)



6 bits


26 bits



opcode

target address

Figure 5: The 3 different formats for 32-bit MIPS instructions (Question 3(c)-ii).


[8 marks]




Reg. No.

Reg. Name

purpose (usage)

$0

$zero

always holds 32 bits of zeros (no overwrite)

$1

$at

Reserved to be used by the assembler

$3

$v0, $v1

Return values from subroutines

$7

$a3

Arguments to subroutines

$15

$t7

General purpose (temporary registers)

$16

$s7

General purpose (save registers)

.

Table 1: The naming convention for some of the 32-bit MIPS registers (Question 3(c)-ii).


(d)  A programme in 32-bit MIPS Assembler is shown in the following: