Outline a method that could be used for modelling water and other fluids. (b) (i) Show how to find the first intersection between a ray
Outline a method that could be used for modelling water and other fluids.
(b) (i) Show how to find the first intersection between a ray and a finite-length, open-ended cone, of unit slope, centred at the origin, aligned along the y-axis, for which both ends of the finite-length are on the positive y-axis (i.e. 0
(ii) Extend this to cope with a closed cone (i.e. the same cone, but with end caps). Take care to consider any special cases. (iii) Extend this further to give the normal vector at the intersection point. Take care to consider all cases.
address all
SECTION A
1 Processor Architecture Why do processors usually support supervisor and user modes of operation and what are they used for? [6 marks] What is the difference between interrupts, software interrupts (initiated by a SWI instruction on the ARM) and exceptions? [8 marks] What is an imprecise exception and why might a processor designer prefer it to a precise exception mechanism? [6 marks]
2 Computer Architecture Give the circuit diagram and describe the operation of the following types of memory cell: (a) bipolar memory cell (static) [5 marks] (b) MOS memory cell (static) [5 marks] Give the key characteristics of each of the following types of memory: DRAM, ROM, PROM, EPROM and EEPROM. [2 marks each] 1 [TURN OVER CST.96.6.2
3 Digital Communication I
Operations of similar functionality can be performed at different layers of a protocol stack. Discuss this in relation to (a) routing [4 marks] (b) multiplexing [4 marks] (c) error recovery [4 marks] (d) flow control [4 marks] (e) synchronization [4 marks]
4 Graphics What are homogeneous coordinates? [5 marks]
How can they be used in computer graphics to model (a) translation? [5 marks] (b) simple perspective? [10 marks]
SECTION B
5 Programming in C and C++ A grand debate is being planned by a society that has among its members a large number of computer professionals and working programmers. The motion to be put is "That the languages C and C++ should be consigned to outer darkness and their use banned in all serious computer projects". Prepare as your answer to this question a briefing document that could explain to people intending to attend the debate what the major points both for and against C and C++ will be, and the lines of arguments that are liable to be used to show how important they are. You are not required to come down either in favour of or against the languages (but may if you wish). [20 marks] 2 CST.96.6.3
Compiler Construction
Programming languages are usually compiled into the machine code of the target computer, but sometimes an interpretive system is used. Discuss the relative merits of these two approaches. [7 marks]
Outline the key features of the design of an interpretive code that would be suitable for an implementation of the C programming language and describe the overall structure of an interpreter for it. [7 marks]
What techniques could be used to improve (a) the space efficiency, and (b) the time efficiency of interpretive codes? [6 marks]
Prolog for Artificial Intelligence
Describe how lists that are represented by difference lists may be concatenated (or “appended”) in constant time. [6 marks]
Define a procedure rotate(X,Y) where both X and Y are represented by difference lists, and Y is formed by rotating X to the left by one element. [14 marks]
If you were building a computer to be used in outer space, would you be likely to use some form of flash memory or RAM as main memory? Why?
7.9 Using the register operations indicated in this chapter, show the fetch-execute cycle for an instruction that produces the 2's complement of the number in A. Show the fetch-execute cycle for an instruction that clears A (i.e., sets A to 0).
7.10 Many older computers used an alternative to the BRANCH ON CONDITION instruction called SKIP ON CONDITION that worked as follows: if the condition were true, the computer would skip the following instruction and go on to the one after; otherwise, the next instruction in line would be executed. Programmers usually place a jump instruction in the ''in-between'' location to branch on a FALSE 238 PART THREE COMPUTER ARCHITECTURE AND HARDWARE OPERATION condition. Normally, the skip instruction was designed to skip one memory location. If the instruction set uses variable length instructions, however, the task is more difficult, since the skip must still skip around the entire instruction. Assume a Little Man mutant that uses a variable length instruction. The op code is in the first word, and there may be as many as three words following. To make life easy, assume that the third digit of the op code word is a number from 1 to 4, representing the number of words in the instruction. Create a fetch-execute cycle for this machine.
7.11 Suppose that the instruction format for a modified Little Man Computer requires two consecutive locations for each instruction. The high-order digits of the instruction are located in the first mail slot, followed by the low-order digits. The IR is large enough to hold the entire instruction and can be addressed as IR [high] and IR [low] to load it. You may assume that the op code part of the instruction uses IR [high] and that the address is found in IR [low]. Write the fetch-execute cycle for an ADD instruction on this machine
Step by Step Solution
There are 3 Steps involved in it
Step: 1
1 a Method for Modeling Water and Other Fluids One method to model water and other fluids is the Smoothed Particle Hydrodynamics SPH approach a computational method commonly used in fluid dynamics sim...See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started