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

MCD4700 Sample Exam Paper- Solutions

Part A: Multiple Choice Questions

Instructions: Each question has only one correct answer. Select the single, best choice for each 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

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

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

4.    Subtracting 01110011 from 00001011 using 2's complement notation equals?

a)   10011000

b)  11010101

c)   00101100

d)  11010100

e)   None of the above

5.    How many different numbers can be represented with n bits?

a)   n

b)  2n

c)   log2 (n)

d)  16

e)   32

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

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

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

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.

e)  All of the above

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

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.

12.  HTTPS means that

a)  A VPN is used for communication

b)  A communication between client and server is encrypted using ASE 128

c)   It is hypertext transfer protocol via TLS.

d)  The authenticity of the server is always guaranteed.

e)   None of the above

13. 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.

e)  All of the above

14.  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.

15.  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.

16. 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

17. 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

18. 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

19. Digital signatures ensure that a message has not been

a)   intercepted

b)  delayed

c)  forwarded

d)  forged

e)   read

20. 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

21. Assuming you are using a 4-bit number system. You are given a binary number that has decimal value -7 when interpreted using the signed-magnitude representation. Now, if you interpret the same bits using the 2’s complement representation, what will be it’s decimal value in this representation?

a)     -7

b)    0

c)     - 1

d)    -8

22. Select the simplified expression for the following Boolean equation: F = ABC + A’B’C’+A’BC+ABC’:

a)   AB + BC + A’B’C’,

b)   A’B’ + BC + AC’,

c)   ABC + A’B’C’

d)   A + B + A’B’

23. Which of the following logic gates or circuit will show or hold it’s output as long as there is(are) input(s) present:

a)   AND gate,

b)   S- R Flip-flop

c)    D Flip-flop circuit

d)   Clock.

24. Which of the following components is NOT a part of the MARIE Simulator?

a)   Accumulator (AC),

b)   Memory Buffer Register (MBR),

c)    Instruction Register (IR),

d)   Cache.

25.  MARIE memory:

a)    uses either MAR or MBR for address reference,

b)   uses MAR for address reference and MBR for data or instruction,

c)    uses AC for address reference

d)   uses IR to store addresses.

26. Which of the following MARIE instructions will “use the address stored at X to load the value from that address to the AC?”

a)    Load X,

b)   StoreI X

c)    LoadI X

d)   Store X.

27.  In a computer system, which of the following devices is not connected to the CPU via I/O interfaces:

a)   Touch Screen,

b)   Wireless Network Interface Card

c)    ROM (Read Only Memory, a part of Main Memory)

d)   Keyboard.

28.  “Memory Management” is one of the responsibilities of an Operating System (OS). Which of the following statements is true regarding protection” in the context of virtualisation of memory?

a)    Processes cannot access their memory directly,

b)   The OS cannot access the memory of any process.

c)    Processes cannot read or write other processes' memory.

d)   Processes can only read other processes’ memory.

29. A Virtual Private Network (VPN) logically connects a client to a network via an _________ channel.

a)    Physical,

b)   Secret,

c)   Open,

d)   Encrypted.

30. A(n) _____________  ______________ key is known to more than one principal.

a)   Asymmetric cryptographic,

b)   Symmetric cryptographic,

c)    Digital Signature,

d)   Trust Worthy.

31. CPUs are designed to decode the Opcodes and execute the operations (implied in the Opcodes). In relation to the above fact, which of the following statements is false?

a)    In MARIE simulator, Registers Transfer Language (RTL) is used to define what needs to be done for an Opcode

b)   involves Fetch- Decode- Execute cycle

c)   One Opcode needs several clock cycles

d)   CPU works on data that are placed either in registers or in (main) memory.

32.  In relation to the functions of the transport layer in TCP/IP model, which of the following statements is true?

a)    breaking long messages into several smaller messages,

b)   deciding which route, a packet should take,

c)    linking the physical layer to the network layer

d)   specifying the type of connection and the electrical signals, radio waves, or light pulses that pass through it.

33.  In Wireless LAN (WLAN), roaming is achieved by implementing Extended Service Set (ESS). What is an ESS?

a)   Several WLAN Access Points (AP) working together to enable higher transmission rates,

b)   Several WLAN channels being linked to enable roaming,

c)   Several WLAN Access Points working together to enable roaming,

d)   Several WLAN channels being linked to enable higher transmission rates.

34.  IP (version 4) addresses are 32 bits long, and Port numbers are 16 bits long. We write these addresses using _________ and __________ notations respectively.

a)   Octal, Hexadecimal

b)   Hexa-decimal, Base 3 Number System,

c)    Dotted-decimal, Hexadecimal,

d)   Dotted-decimal, Decimal.

35.  In relation to information in the Internet accessible through Deep Web” and Dark Web”, which of the following statements is false:

a)    In “Dark Web”, both the clients and the servers are hidden,

b)   Information that we don't want to see or know about are available in Deep Web”,

c)    “Dark Web” uses the TOR network (The Onion Router),

d)   In “Deep Web”, both the clients and the servers are hidden.

36. At the end of the following program, what base 10 value can be found in variable number’?

Load number

Subt number

Skipcond 400

Store number

Load number

Add number

Store number

Halt

number, hex 6

a)    0

b)   6

c)    -6

d)    12

37. The number of chips is required to design a 256K x 32 memory out of 4K x 8 chips is:

a)    64

b)    128

c)    256

d)   512

38. Which one of the following is the signed binary representation of the number -6810 in 16 bits representation?

a)    10000000 01000100

b)   00000000 01000100

c)    11101010 00000000

d)    11111111 01101010

39.  How do we calculate CRC for a message?

a)    Count the number of ‘1’ bits in the message.

b)   Add up all the data and divide by an agreed upon divisor.

c)    Join data into a large number and divide by an agreed upon divisor.

d)    Insert random bits in data.

40.  Find the mantissa bits (23 bits) for (101.110001)2  using single precision IEEE 754 Floating Point Standard.

a)   01000000000000000000000

b)  01110001000000000000000

c)   10111000100000000000000

d)  00010111000100000000000

e)   None of these options

Part B: Short Answer Questions

41. (3 Marks):

Draw a sketch of the von Neumann Architecture and name the different components.

42. (1 + 1 + 1 = 3 Marks):

a) How many bits are needed to express 1024 numbers?

10

b) How many bits are in 32 Gib? (Give answer in power of 2)

One Gib are 230  bits. 32 times one Gib means 25  times 230 . Thus,

the correct result is 235

c) How many chips are required to design a 128K x 16 memory out of 16K x 8 chips?

= 16 chips

43. (2 + 2 + 2 = 6 Marks):

Convert the decimal integer -65 to an 8-bit binary representation in the following formats. Show all workings.

a)   Signed-Magnitude

First convert 65 to binary, fill with leading 0s till bit number 7, then put 1 into the sign bit (bit number 8).

64  32  16  8   4   2   1

1     0     0    0  0  0   1

64+1 = 65

65= 0100 0001

-65 = 1100 0001

b)   1’s Complement

First convert 65 to binary, fill with leading 0s and then filp 1 to 0 and 0 to 1.

65= 0100 0001 → flip

-65= 1011 1110

c)  2’s Complement

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

65= 0100 0001 → Flip all bits

-65 in 8bits 1’s comp = 1011 1110 → add 1

-65 in 8bits 2’s comp = 1011 1111

44. (2 + 2 = 4 Marks):

a)  Describe the difference between a directjump and an indirectjump 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.

b)  Briefly explain the difference between sequential and combinational circuits.

The output of a sequential circuit depends upon present as well as past input/s or past output (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.

45. (1 + 2 = 3 Marks):

Assume a memory that can store 216 bytes. What are the lowest and highest addresses, and how many bits are needed to store those addresses, if the memory is

a)  Byte addressable (1 mark)

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

b)  Word addressable with a word size of 16 bits (2 marks)

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

46. (2 + 2 + 2 = 6 Marks):

Given the following truth table

x

y

z

F(x,y,z)

0

0

0

1

0

0

1

1

0

1

0

0

0

1

1

0

1

0

0

0

1

0

1

1

1

1

0

1

1

1

1

1

a)  Write the Boolean expression.

F = Z̅ + Z +  X Z +  X y Z̅ +  X y Z

b)  Draw the corresponding logic circuit.

c)   Simplify it using K-maps

.

. Z

. Z

. Z̅

1

1

0

0

X

1

1

1

F = . . + . Z + X. y

47. (3 + 3 + 3 + 3 = 12 Marks):

a)  Briefly explain the concept of a process, including the states it can be in.

A process is a program that is currently being executed. A process can be in the ready, running or blocked states. Running means that it is currently running on the CPU. Blocked means it is waiting for I/O to finish. Ready means it could be running, but the OS has not scheduled it yet.

b)  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.

c)  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 and 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.