Exam 2015, questions and answers PDF

Title Exam 2015, questions and answers
Course Computer Organisation and Architecture
Institution Charles Sturt University
Pages 11
File Size 313.3 KB
File Type PDF
Total Downloads 37
Total Views 153

Summary

Exam 2015, questions and answers...


Description

Sample Question of Final Examination ITC161 Computer Systems / ITC544 Computer Organisation and Architecture Total Marks: 100, Time: 2 hours writing, 10 minutes reading

PART A There will be 25 multiple choice questions. Please choose the best answer. Each question weighs 1 mark. (A sample of 5 questions are given below)

1. Identify True/False: The largest value that a 60-bit unsigned binary integer can represent is (260 -1). (True)

2. If a computer uses signed-2's complement representation and 8 bit registers, what range of integers can this computer represent? a. -128 to 127 c. -127 to 128

b. -127 to 127 d. -128 to 128

3. “5 4 3 + × 2 × 6 –” is the reverse polish (postfix) notation of which of the following expressions: a. 5 × 4 + 3 × 2 – 6 b. 5 × (4 + 3) × 2 – 6 c. 5 × (4 + 3) × (2 – 6) d. 5 × 4 + 3 × (2 – 6)

4. What is the overall speedup of a system that spends 65% of its time on I/O with a disk upgrade that provides for 50% greater throughput? a) 22.5% b) 28% c) 45% d) 32.5%

5. What is the output of the following combinational circuit?

a. yz+xz b. xz+ y'z c. x y'z d. none of the above

PART B There are FOUR (4) Questions. Answer any THREE (3)

Question 1 a) In the von Neumann model, explain the purpose of the processing unit and the program counter. [4] b) Show how the following floating point value 26.625 would be stored using IEEE-754 single precision. [6] c) What are the maximum and minimum values that can be represented using 6 bits and i. 2’s complement representation and ii. signed magnitude representations. [4] d) Given the function: F(x,y,z)= xy'z + x'y'z + xyz, simplify the expression using Boolean algebra and identities and draw the logic diagram for the simplified expression. [7] e) Use any method to prove the following either True for False. [4] yz + xyz' + x' y' z = xy + x' z

Question 2 a) How many bits are required to address a 4M × 16 main memory if the memory is i. byte-addressable? ii. word-addressable? [4]

b) A digital computer has a memory unit with 32 bits per word. The instruction set consists of 110 different operations. All instructions have an operation code part (opcode) and two address fields: one for a memory address and one for a register address. This particular system includes eight general-purpose, user-addressable registers. Registers may be loaded directly from memory, and memory may be updated directly from the registers. Direct memory-to-memory data movement operations are not supported. Each instruction is stored in one word of memory. [10] i. ii. iii. iv. v.

How many bits are needed for the opcode? How many bits are needed to specify the register? How many bits are left for the memory address part of the instruction? What is the maximum allowable size for memory? What is the largest unsigned binary number that can be accommodated in one word of memory?

c) What is the difference between - [4] i. Multiprogramming and multiprocessing? ii. Multiprogramming and multithreading? d) Why should assembly language be avoided for general application development? Under what circumstances is assembly language preferred or required? [3+4=7]

Question 3 a) Define the terms seek time, rotational delay, and transfer time. Explain their relationship. [3+2=5] b) Suppose a disk drive has the following characteristics: [3+4=7]    

4 surfaces 1024 tracks per surface 128 sectors per track 512 bytes/sector

 

Track-to-track seek time of 5 milliseconds Rotational speed of 5000 RPM.

i. What is the capacity of the drive? ii. What is the access time?

c) Consider a byte-addressable computer with 16-bit addresses, a cache capable of storing a total of 2K bytes of data, and blocks of 8 bytes. Show the format (include field names and sizes) of a 16-bit memory address for: [3+3+4=10] i. ii. iii.

direct mapped fully associative Where (which block or set) in cache would the memory address 0xBAD0 be mapped for each of two mapping techniques above? You can specify the answer in decimal if you wish.

d) Give an example of the function of the following components of a compiler: i) Lexical analyser; ii) Syntax analyser; iii) Semantic analyser. [3]

Question 4 a) How do micro kernel operating systems differ from monolithic operating systems? Give an advantage of each type over the other type. [4+3=7] b) Of programmed I/O, interrupt-driven I/O, DMA, or channel I/O, which is not suitable for processing the I/O of a: [8] i. Mouse ii. Game controller iii. CD iv. Thumb drive or memory stick c) Suppose that the following instructions are found at the given location in memory: 20 LDA 50 21 ADD 51 50 724 51 006 Show the contents of the IR (Opcode, Operand), PC, MAR, MBR, and ACC at the conclusion of instruction 21. [5] d) What is the difference between a decoder and a multiplexor? Explain with example and their block diagrams. [5]

-End of Exam-

Solution of Part B

Question 1 a) In the von Neumann model, explain the purpose of the processing unit and the program counter. [4] The processing unit performs all of the arithmetic and logic functions. The program counter is responsible for keeping track of the next instruction to fetch.

b) Show how the following floating point value 26.625 would be stored using IEEE-754 single precision. [6] 26.625 = 11010.101 =1.1010101×24 S=0 as the floating point value is positive Mantissa m=10101010...0 (Total 23 bits) Exponent e= k+4 (where k = 127 as 8 bots are used for the exponent) =>e=127+4=131=10000011 Thus the representation is 0 10000011 1010101...0

c) What are the maximum and minimum values that can be represented using 6 bits and i. 2’s complement representation and ii. signed magnitude representations. [4] i.

Max: 31, Min: -32

ii.

Max: 31, Min: 31

d) Given the function: F(x,y,z)= xy'z + x'y'z + xyz, simplify the expression using Boolean algebra and identities and draw the logic diagram for the simplified expression. [7]

xy'z + x'y'z + xyz = (xy'z + xy'z) + x'y'z + xyz = (xy'z + x'y'z) + (xy'z + xyz) = (x + x')y'z + (y' + y)xz = y'z + xz

e) Use any method to prove the following either True for False. [4] yz + xyz' + x' y' z = xy + x' z Using identities: yz + xyz' + x'y'z = (x +x')yz + xyz' + x'y'z = xyz + x'yz + xyz' + x'y'z = (x'y'z + x'yz) + (xyz + xyz') = x'z(y' + y) + xy (z + z') = x'z + xy

Using truth tables:

Question 2 a) How many bits are required to address a 4M × 16 main memory if the memory is i. byte-addressable? ii. word-addressable? [4]

i. ii.

There are 4M × 2 bytes which equals 22 × 220 × 2 = 223 total bytes, so 23 bits are needed for an address There are 4M words which equals 22 × 220 = 222, so 22 bits are required for an address

b) A digital computer has a memory unit with 32 bits per word. The instruction set consists of 110 different operations. All instructions have an operation code part (opcode) and two address fields: one for a memory address and one for a register address. This particular system includes eight general-purpose, user-addressable registers. Registers may be loaded directly from memory, and memory may be updated directly from the registers. Direct memory-to-memory data movement operations are not supported. Each instruction is stored in one word of memory. [10] i. How many bits are needed for the opcode? ii. How many bits are needed to specify the register? iii. How many bits are left for the memory address part of the instruction? iv. What is the maximum allowable size for memory? v. What is the largest unsigned binary number that can be accommodated in one word of memory?

i. ii. iii. iv.

v.

7 bits for opcode. 3 bits 22 bits max memory is 222 or 4MB. Largest unsigned binary number is 232 - 1

c) What is the difference between - [4] i. Multiprogramming and multiprocessing? ii. Multiprogramming and multithreading?

Multiprogramming means having multiple programs (processes) running on one processor, whereas multiprocessing means having multiple processors. Multiprogramming typically refers to multiple processes from multiple users, whereas multithreading generally refers to multiple threads from one user process.

d) Why should assembly language be avoided for general application development? Under what circumstances is assembly language preferred or required? [3+4=7] Assembly programming is more difficult to program and more time consuming to debug than higher-level languages. Assembly language programs are also harder to maintain, as there are more statements for any given amount of functionality that in the equivalent high-level language program. If execution time or space are critical issues, portions of code can be rewritten in assembly language (although most compilers today do a very good job of optimizing the object code). There are typically small chunks of code that are run many times, and these should be optimized so they don't become bottlenecks. Generally between 10-20% of the code requires 8090% of the execution time; it is these code segments that should be investigated. Regarding space: if a programmer is experienced in assembly language, he or she can generally cut out everything that doesn't need to be in the code, resulting in less code. Lastly, it might be that the HLL one is using cannot access the machine operations or device in the manner necessary. In these situations, assembly language is very useful.

Question 3 a) Define the terms seek time, rotational delay, and transfer time. Explain their relationship. [3+2=5] Seek time is the time it takes for a disk arm to position itself over a requested track. Rotational delay is the time that it takes for the required sector to position itself under a read/write head. The sum of the rotational delay and seek time is known as the access time. If we add to the access time the time that it takes to actually read the data from the disk, we get transfer time.

b) Suppose a disk drive has the following characteristics: [3+4=7] • 4 surfaces • 1024 tracks per surface • 128 sectors per track • 512 bytes/sector • Track-to-track seek time of 5 milliseconds • Rotational speed of 5000 RPM. i. What is the capacity of the drive? ii. What is the access time? i. 4 surfaces x 1,024 tracks per surface x 128 sectors per track x 512 bytes/sector = 4*1024*128*512/(2^20 bytes/MB) = 256MB. ii. Rotational delay = (60 seconds/5000 rpm) * (1000ms/second)]/2 = 6 ms + 5ms seek time = 11 ms.

c) Consider a byte-addressable computer with 16-bit addresses, a cache capable of storing a total of 2K bytes of data, and blocks of 8 bytes. Show the format (include field names and sizes) of a 16-bit memory address for: [3+3+4=10] i. direct mapped ii. fully associative iii. Where (which block or set) in cache would the memory address 0xBAD0 be mapped for each of two mapping techniques above? You can specify the answer in decimal if you wish.

i.

ii. iii. BAD016 = 1011 1010 1101 0000 so we have: 10111 01011010 000 for direct mapped, which indicates block 90 of cache 1011101011010 000 for fully associative, which can be placed anywhere

d) Give an example of the function of the following components of a compiler: i) Lexical analyser; ii) Syntax analyser; iii) Semantic analyser. [3] i. ii. iii.

If a keyword is used as a variable name This phase complains about undefined variables If you try to add an integer to a character string, this compiler phase would emit the error message

Question 4

a) How do micro kernel operating systems differ from monolithic operating systems? Give an advantage of each type over the other type. [4+3=7]

Microkernel systems provide minimal functionality, with most services carried out by external programs, whereas Monolithic systems provide most of their services within a single operating system program. Microkernel systems provide better security, easier maintenance, and portability at the expense of execution speed. Monolithic systems give faster execution speed, but are difficult to port from one architecture to another.

b) Of programmed I/O, interrupt-driven I/O, DMA, or channel I/O, which is not suitable for processing the I/O of a: [8] i. Mouse ii. Game controller iii. CD iv. Thumb drive or memory stick

Mice and game controllers are character-based, sequential devices. Either programmed I/O or interrupt-driven I/O is best. CDs and thumb drives are block-oriented devices that lend themselves to DMA. Channel I/O is suitable, but excessive for the small amount of data involved.

c) Suppose that the following instructions are found at the given location in memory: 20 LDA 50 21 ADD 51 50 724 51 006 Show the contents of the IR (Opcode, Operand), PC, MAR, MBR, and ACC at the conclusion of instruction 21. [5] Assuming the execution of instruction is just finished IR: 3051 PC: 022 MAR: 051 MBR: 006 ACC: 730

d) What is the difference between a decoder and a multiplexor? Explain with example and their block diagrams. [5] A decoder is a circuit which has n inputs and 2n outputs, and outputs 1 on the wire corresponding to the binary number represented by the inputs. For example, a 2-4 decoder might be drawn like this:

A multiplexer is a device which allows one of a number of inputs to be routed to a single output. Here is a 4-1 multiplexer.

The control inputs c0 and c1 represent a 2-bit binary number, which determines which of the inputs i0 to i3 is connected to the output d. If c1c0 represents the number n in binary, then the value of the output d is the value of input in.

-End of Exam-...


Similar Free PDFs