Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

How is the exponent stored and why? How are the exponent, significand and sign bit arranged in memory? [4 marks] (c) Let x denote the

How is the exponent stored and why? How are the exponent, significand and sign bit arranged in memory? [4 marks] (c) Let x denote the floating-point representation of a number x. Define the terms absolute error (x) and relative error (x) in representing x. How are x and x related? The way to compute any given position's value is to add up the numbers to the position's right and left in the preceding row. For instance, to compute the middle number in the third row, you add 1 and 1; the sides of the triangle are always 1 because you only add the number to the upper left or the upper right (there being no second number on the other side).

The program should prompt the user to input a row and a position in the row. The program should ensure that the input is valid before computing a value for the position.

2 ) i need a program that, when run, will print out its source code. This source code, in turn, should compile and print out itself. (Fun fact: a program that prints itself is called a quine.) 3)given an array of integers, the goal is to efficiently find the subarray that has the greatest value when all of its elements are summed together. Note that because some elements of the array may be negative, the problem is not solved by simply picking the start and end elements of the array to be the subarrray, and summing the entire array.

a) In Verilog, what is the difference between continuous assignment and non-blocking assignment? [4 marks] (b) What are the circuit diagrams corresponding to RandomBitsA and RandomBitsB? [8 marks] (c) What is the output from RandomBitsA and RandomBitsB? [8 marks] 4 CST.2000.4.5 6 Data Structures and Algorithms Describe in detail both Prim's and Kruskal's algorithms for finding a minimum cost spanning tree of an undirected graph with edges labelled with positive costs, and explain why they are correct. [7 marks each] Compare the relative merits of the two algorithms. [6 marks] 7 Operating System Functions Why is it important for an operating system to schedule disc requests? [4 marks] Briefly describe each of the SSTF, SCAN and C-SCAN disc scheduling algorithms. Which problem with SSTF does SCAN seek to overcome? Which problem with SCAN does C-SCAN seek to overcome? [5 marks] Consider a Winchester-style hard disc with 100 cylinders, 4 double-sided platters and 25 sectors per track. The following is the (time-ordered) sequence of requests for disc sectors: { 3518, 1846, 8924, 6672, 1590, 4126, 107, 9750, 158, 6621, 446, 11 } The disc arm is currently at cylinder 10, moving towards 100. For each of SSTF, SCAN and C-SCAN, give the order in which the above requests would be serviced. [3 marks] Which factors do the above disc arm scheduling algorithms ignore? How could these be taken into account? [4 marks] Discuss ways in which an operating system can construct logical volumes which are (a) more reliable and (b) higher performance than the underlying hardware. [4 marks] 5 [TURN OVER CST.2000.4.6 8 Computation Theory Let N be the natural numbers {0, 1, 2 . . . What is meant by each of the following statements? The subset S N is recursive. The subset S N is recursively enumerable. [5 marks] How would you extend the definition of recursive enumeration to sets of computable functions? [3 marks] A sequence of natural numbers is a total function s : N N. The sequence is recursive if and only if s is computable. A finite sequence of natural numbers is specified by a pair (l, x), where l N is the number of elements, and x : [1, l] N is a function that defines those elements. The case l = 0 defines the null sequence. In each of the following cases, establish whether the set defined is recursively enumerable: (a) the set of all recursive subsets of N [5 marks] (b) the set of all recursive sequences of natural numbers [2 marks] (c) the set of all finite sequences of natural numbers [5 marks] 6 CST.2000.4.7 9 Numerical Analysis I Define the absolute error x and relative error x in representing a number x. How are these errors related? Which type of error is associated with the term loss of significance? Define machine epsilon m.

Remove all records which have negative values for Q49. This process is only for files

that are not representing missing values that are recognized as such in R.

5) Replace missing values in the predictors with their most frequent value (mode).

6) Hot-encode Q49 for two groups of values 1-7 and 8-10.

7) Use a random number seed so that the results can replicated

8) Run a neural network to predict the hot-encoded Q49 variable. (a) (i) In a Hopfield neural network configured as an associative memory, with all of its weights trained and fixed, what three possible behaviours may occur over time in configuration space as the net continues to iterate in response to a given input? [3 marks] (ii) How many stable content-addressable memories would you expect a fully connected Hopfield network consisting of 100 neurons to be capable of storing? [1 mark] (iii) What property of those memory patterns would make it most probable that you could successfully train the network to store the maximum number, and why? [3 marks] A software module controls a car park of known capacity. () and exit() are triggered when cars enter and leave via the barriers. Give pseudocode for the enter and exit procedures (i) if the module is a monitor [8 marks] (ii) if the programming language in which the module is written provides only semaphores [4 marks] (b) Outline the implementation of (i) semaphores [4 marks] (ii) monitors [4 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

Essentials Of Computer Organization And Architecture

Authors: Linda Null, Julia Labur

6th Edition

1284259439, 9781284259438

More Books

Students also viewed these Programming questions

Question

7:14 pm Sun 21 Mar Answered: 1 week ago

Answered: 1 week ago

Question

What is intrinsic motivation? (p. 257)

Answered: 1 week ago

Question

What are the purposes of promotion ?

Answered: 1 week ago

Question

Define promotion.

Answered: 1 week ago

Question

Name the three methods for recording WORM disks.

Answered: 1 week ago