XYZ What is the difference between volatile and nonvolatile memory? Is RAM volatile or nonvolatile? Is ROM
Question:
XYZ What is the difference between volatile and nonvolatile memory? Is RAM volatile or nonvolatile? Is ROM volatile or nonvolatile? 7.9 Registers perform a very important role in the fetch-execute cycle. What is the function of registers in the fetch-execute instruction cycle? 7.10 Explain each of the fetch part of the fetch-execute cycle. At the end of the fetch operation, what is the status of the instruction? Specifically, what has the fetch operation achieved that prepares the instruction for execution? Explain the similarity between this operation and the corresponding operation performed steps performed by the Little Man. 7.11 Once the fetch operation is complete, what is the first step of the execution phase for any instruction that accesses a memory address for data (e.g., LOAD, STORE)? 7.12 Using the ADD instruction as a model, show the fetch-execute cycle for a SUBTRACT instruction. 7.13 Assume the following values in various registers and memory locations at a given point in time: PC: 20 A: 150 Memory location 20: 160 [ADD 60] Memory location 60: 30. Show the values that are stored in each of the following registers at the completion of the instruction: PC, MAR, MDR, IR, and A. 7.14 Define a bus. What are buses used for? 7.15 What three types of ''data'' might a bus carry? 7.16 Explain how data travels on a bus when the bus is simplex. Half-duplex. Full-duplex. 7.17 What is the difference between a multipoint bus and a point-to-point bus? Draw diagrams that illustrate the difference. 7.18 Briefly describe each of the major disadvantages of parallel buses. 7.19 Which Little Man Computer instructions would be classified as data movement instructions? 7.20 What operations would you expect the arithmetic class of instructions to perform? 7.21 Explain the difference between SHIFT and ROTATE instructions. 7.22 What do program control instructions do? Which LMC instructions would be classified as program control instructions? 7.23 What is a stack? Explain how a stack works. Cr eate a diagram that shows how PUSH and POP instructions are used to implement a stack. 7.24 What is a privileged instruction? Which LMC instructions would normally be privileged? 7.25 Show a 32-bit instruction format that allows 32 different op codes. How many bits are available for addressing in your format? 7.26 Show an instruction format that could be used to move data or perform arithmetic between two registers. Assume that the instruction is 32 bits wide and that the computer has sixteen general-purpose data registers. If the op code uses 8 bits, how many bits are spares, available for other purposes, such as special addressing techniques?
quantum computer to approximately simulate the operator e iHt for some t. It is possible to build quantum circuits U1 and U2 to perform the operations U1 = e iH1t U2 = e iH2t Give a circuit, U, consisting of one of more instances of U1 and U2 that approximates e iHt such that e iHt U = O(t 3 ). Show your calculations to verify that the circuit does indeed achieve this. [8 marks] (c) Quantum Phase Estimation can be used to estimate the ground state energy of quantum mechanical systems. The Inverse Quantum Fourier Transform is a key component of Quantum Phase Estimation. Give the circuit for the 2-qubit Inverse Quantum Fourier Transform using only gates from the set {H, CT, CNOT}, where CT is a controlled T gate. [4 marks] 15 CST2.2021.9.16 15 Types (a) In a simply-typed lambda calculus augmented with first-class continuations, booleans, a list nd its iterator (i.e., fold, but not full recursion), function every : (X Bool) List X Bool such that every p xs returns true if every element of xs satisfies p, and false otherwise. This function should also stop iterating over the list as soon as it finds a false element. You may use SML- or OCaml-style notation if desired, but explain any notation used beyond the basic lambda calculus. [4 marks] (b) In the monadic lambda calculus with state, suppose we change the typing rule for reading locations to not cause a monadic effect: If we suggest changing the monadic lambda calculus to permit treating reads as pure: l : X ; ` !l : X (i) Is this rule still typesafe? Informally but carefully justify your answer. [2 marks] (ii) Is the following common subexpression elimination transformation sound? Either give an argument why it is, or supply a counterexample and explain why it shows it is not. [6 marks] let x = return e1; let x = return e1; let y = e2; =====> let y = e2; let z = return e1; [z/x]e3 e3 (c) In System F augmented with existential types, give an existential type for the interface of the natural numbers, and give an implementation for it. [8 markssuch that a = qb + r and 0 r < b. [6 marks] (b) Prove further that the highest common factor of a and b is equal to the highest common factor of b and r. [2 marks] (c) Derive Euclid's algorithm for finding the highest common factor of two numbers. [3 marks] (d) Determine the algorithm's efficiency by finding a limit for the number of divisions required in its execution expressed as a function of a. [3 marks] (e) Find all values x, y Z satisfying 72x + 56y = 40. [3 marks] (f ) Find all values z Z satisfying 56z 24(mod 72). Express the answer in the form z a(mod m). [3 marks] Computer System Modelling A database system has a central processor and three (different) discs. Measurements are taken for 1000 transactions on a lightly loaded system and the following observations are made. The CPU scheduler initiated or resumed transaction processing 10,000 times. The total CPU usage was 25 seconds. Disc 1 made 5000 transfers with an average transfer time of 10 ms. Disc 2 made 2000 transfers with an average transfer time of 50 ms. Disc 3 made 2000 transfers with an average transfer time of 20 ms. Derive the visit counts, service times and transaction service demands. What is the bottleneck device? What is the maximum throughput of the system measured in transactions per second? [6 marks] Describe two balanced systems which bound the throughput of the system. What is the maximum throughput of these systems? [7 marks] Recall that the throughput of a balanced system with K devices, N customers and service demand D per device is X(N) = N (N + K 1) 1 D How many transactions do you expect to be in the system with a throughput of 7 transactions per second? [7 marks] 4 CST.2000.9.5 8 Neural Computing Give evidence supporting the view that the main computational load that has shaped the evolution of the human brain is "social computation", with sexual success being the ultimate measure of the value of an algorithm or neural design feature. Say what implications this has for: The cognitive skills and perceptual faculties that have been selected for in brain evolution, as contrasted with the goals which are the traditional focus of AI. The design of face recognition algorithms, which aim to interpret facial expression, gesture, and intent, as well as gender and identity. The construction of the theory that other persons have minds, too. Models of action, planning, and interaction between self and others. [8 marks] Comment on whether this "social computation" view of human brain evolution implies that brain science is less relevant to the goals of computer science than is usually thought. [2 marks] Answer any five of the following seven short questions: (a) Roughly what is the total number of neurones in the human brain? (b) Roughly what is the total number of synapses in the human brain? How does this compare with the total number of stars in our galaxy, and with the total number of galaxies in the known universe? (c) Why is nerve impulse propagation described as "saltatory", and what purposes are achieved by this method of signalling? (d) What is the approximate speed of nerve impulse propagation in warm-blooded animals, in metres/sec? (e) Why is "white matter" white, what cells are responsible for this, and what purpose do they serve? (f ) Name the three principal ions involved in nerve membrane current flows, and identify which two of them transit through voltage
Assuming the premise is correct, i.e. "cracking RSA is NP-complete", does the conclusion follow? Why or why not? What is the relationship, more generally, between encryption systems and NP-completeness? y (a) Recall that a Boolean formula is in 3-CNF if it is the conjunction of clauses, each of which is the disjunction of at most three literals. A literal is either a variable or a negated variable. Consider the following two decision problems: 3-SAT: given a Boolean formula in 3-CNF, decide whether or not it is satisfiable. 3-VAL: given a Boolean formula in 3-CNF, decide whether or not it is valid. (i) One of the two problems above is known to be in the complexity class P. Which one, and why? [2 marks] (ii) Describe a polynomial time algorithm for the problem you identified in part (i). [6 marks] (iii) What can you say about the complexity of the other problem? State precisely any standard results you use in your answer. [4 marks] (b) Say that a Boolean formula is in 3-DNF if it is the disjunction of terms, each of which is the conjunction of at most three literals. We now consider the following two decision problems: 3-DNF-SAT: given a Boolean formula in 3-DNF, decide whether or not it is satisfiable. 3-DNF-VAL: given a Boolean formula in 3-DNF, decide whether or not it is valid. What can you conclude about the complexity of these two problems? (a) Explain how we can associate a unique number dPe to each register machine program P. [5 marks] (b) Consider the following two partial functions S : N * N and T : N * N on the natural numbers. S(dPe) = ( n if the program P when started with 0 in all registers halts after n steps; 0 otherwise. T(dPe) = ( n if the program P when started with 0 in all registers halts after n steps; undefined otherwise. (i) Which, if any, of S and T is computable and which is uncomputable? [4 marks] (ii) Give full justification for your answers above. State carefully any standard results that you use. [11 marks] 4 Computation Theory (a) State precisely what it means for a function f : N k N to be primitive recursive, giving exact
It is convenient to be able to specify colours in terms of a three-dimensional?
coordinate system. Three such coordinate systems are: RGB, HLS, L*a*b*.
Choose two of these three coordinate systems and for each of your chosen two:
(a) describe what each of the three coordinates represents [2 marks each]
(b) describe why the coordinate system is a useful representation of colour?
[2 marks each]
Draw either the first eight one-dimensional Haar basis functions or the first eight
one-dimensional Walsh-Hadamard basis functions. [4 marks]
Calculate the coefficients of your chosen eight basis functions for the following
one-dimensional image data:
12 16 20 24 24 16 8 8 [4 marks]?
Explain why, in general, the Haar or Walsh-Hadamard encoded version of an image
is preferable to the original image for storage or transmission. [4 marks]?
2
CST.97.6.3
SECTION B
5 Programming in C and C++
declaration of a C++ class that might be used to implement a binary tree
with each node able to hold an integer. Your implementation (i.e. the class itself
and those bodies which conveniently fit within it) should make it impossible for
casual programmers to access the pointer fields that link parts of the tree together
except through cleanly specified access functions. Show how you would overload
the "+" operator in C++ to provide a neat notation for adding a new item into
such a tree. [20 marks]
6 Compiler Construction
Investigate whether the following grammar for regular expressions is SLR(1) by
attempting to construct its Action and Goto matrices.
S -> R eof
R -> F | R + F
F -> P | F P
P -> x | ( R ) | P *
Suppose you are given a supply string S[0 . . N 1] of period n, which includes symbols a and b. Suppose further that you are given a sample string P[0 . . M 1] of duration m n, consisting of symbols a, b, and , representing a sample to be located in string S. The image is a "wild card" symbol, which fits a unmarried image, both a or b. The different symbols should fit precisely.
The problem is to output a sorted listing M of valid "match positions", which might be positions j in S such that pattern P suits the substring S[j . . J + example, if S = a b a b b a b and P = a b , then the output M must be [0, 2].
(a) Describe a honest, nave algorithm to clear up the hassle. Your
set of rules should run in time O(nm).
(b) Give an set of rules to solve the trouble with the aid of reducing it to the trouble of polynomial multiplication. Specifically, describe how to convert strings S and P into polynomials such that the manufactured from the polynomials lets in you to determine the solution M. Give examples to illustrate your polynomial representation of the inputs and your way of determining outputs from the product, based totally on the instance S and P strings given above.
(c) Suppose you combine your approach to Part (b) with an FFT algorithm for
polynomial multiplication. What is the time complexity of the resulting approach to the string matching problem?
(d) Now consider the identical problem however with a larger image alphabet. Specifically, think you are given a representation of a DNA strand as a string D[0 . . N1] of period n, including symbols A, C, G, and T; and you're given a pattern string P[0 . . M 1] of length m n, such as symbols A, C, G, T, and . The hassle is, again, to output a taken care of list M of legitimate "fit positions", which can be positions j in D such that pattern P fitsPinstance, if D = A C G A C C A T and P = A C A, then the output M have to be [0, 3]. Based to your solutions to Parts (b) and (c), provide an efficient set of rules for this placing. Illustrate your algorithm on the example above.
The Architecture of Computer Hardware, Systems Software and Networking An Information Technology App
ISBN: 978-1118322635
5th edition
Authors: Irv Englander