Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Clustered superscalar processors parcel practical units into bunches. Information sending inside a bunch works as ordinary permitting subordinate guidelines to execute on successive clock cycles.

Clustered superscalar processors parcel practical units into bunches. Information sending inside a bunch works as ordinary permitting subordinate guidelines to execute on successive clock cycles. Correspondence between groups ordinarily causes an unexpected setback of 1 or 2 clock cycles. The grouping thought may likewise be stretched out to incorporate the issue cushion (otherwise called the issue window). T should also have constructor(s) which initialise n to an integer argument passed as a parameter or to zero if no argument is given; T should also have a destructor. The constructor(s) and destructor should print the value of the n field of the object being constructed or destructed. Noting that 5 is the threshold mark for a First in an individual subject and that

each candidate offers four subjects, the Examiners agree further that 20 marks

(4 5) should be the threshold mark for a First overall in the Examination. They

reason, incorrectly, that using 20 as the threshold about one-third of the candidates

will gain Firsts overall.

When they meet after the Examination, the Examiners are astonished to discover

that, using a threshold of 20 marks, considerably fewer than one-third of the

candidates gain Firsts.

(a) Assuming that dice throws are independent, what is the probability that a

candidate obtains 20 or more marks overall? [12 marks]

(b) To what value should the Examiners lower the threshold mark for a First

overall to ensure that approximately one-third of the candidates gain Firsts?

[5 marks] For each of the sketched examples in part (a), describe how the design work so far could be evaluated before proceeding to the next phase Describe a sequence of events that would allow external modification of an object stored within an IntListArray, despite correct copying on insertion. How could this be addressed in IntListArray? [3 marks] (iii) By adding protected void add(Object o) {mArray.add(o);} to the ConstrainedArray class, the mArray field can be made private. Show how this would affect your IntListArray class and discuss the advantages of the change from protected to private. [5 marks] (c) The solutions in parts (a) and (b) both involve a get() method returning an Object reference. (i) Explain why this is bad practice. [1 mark] You have acquired a C program which declares an array v, populates it, and later jots it to a file in binary: #define NITEMS 100 struct Elem { signed long val; char flags; } v[NITEMS]; ... fjot(file, 1, sizeof(v), v); When run on a legacy processor (which no longer exists) this produces a file containing 500 bytes, but when re-compiled and executed on three modern desktops using various compilers it produces files containing respectively 800, 1200 and 1600 bytes. On all implementations char is an 8-bit value. (i) Explain what might be happening in the four versions in terms of compiler assumptions of alignment and size, in bits, of type long. Also give the values of sizeof(struct Elem). [3 marks] (ii) You now wish to read a file produced by the legacy processor into a version of the program running on your new desktop machine (one of the three above). Outline the changes, if any, you would need to make to the call to fread, mirroring the call to fjot above, so that the resulting v may be successfully processed by the rest of the program. You may any sensible assumptions about the legacy machine and your desktop machine provided you state them explicitly. Indicate how your program might be able to read both legacy- and new-format binary files. [10 marks] (b) (i) Jot a C++ class T which contains a const integer field n. T should also have constructor(s) which initialise n to an integer argument passed as a parameter or to zero if no argument is given; T should also have a destructor. The constructor(s) and destructor should print the value of the n field of the object being constructed or destructed. Indicate why, or why not, any of your fields or methods are qualified with virtual. [3 marks] (ii) Explain how objects of class T are allocated and deallocated, for each of the three areas: heap, stack and static store, noting one case where appropriate use of virtual is essential. What, if any, overlap in programmer convenience is there between stack-allocated objects with destructors and try-finally in Java?

Jot java program to find if a particular element is present in a multi-dimensional array. a Java program to find the shortest distance using Travelling Salesman Problem (Dynamic Programming Algorithm). Construct a uniquely decodable prefix code for the symbols. Explain why it is uniquely decodable and why it has the prefix property. [2 marks] (v) Relate the bits in the code words forming your prefix code to the 'yes/no' questions that you proposed in (i). [2 marks] (b) Explain how the bits in an IrisCode are set by phase sequencing. Discuss how quantisation of the complex plane into phase quadrants sets each pair of bits; why it is beneficial for quadrant codes to form a Gray Code; how much entropy is thereby typically extracted from iris images; and why such bit sequences enable extremely efficient identity searches and matching. [5 marks] (c) Consider a noisy analog communication channel of bandwidth = 1 MHz, which is perturbed by additive white Gaussian noise whose total spectral power is N0 = 1. Continuous signals are transmitted across such a channel, with average transmitted power P = 1,000. Give a numerical estimate for the channel capacity, in bits per second, of this noisy channel. Then, for a channel having the same bandwidth but whose signal-to-noise ratio P N0 is four times better, repeat your numerical estimate of capacity in bits per second. [5 marks]

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Logic And Computer Design Fundamentals

Authors: M. Morris Mano, Charles Kime, Tom Martin

5th Edition

0133760634, 978-0133760637

More Books

Students also viewed these Programming questions

Question

=+a) What kind of study was this?

Answered: 1 week ago