University of Victoria Midterm Exam 1 January 30 2020 Computer Science 349A
University of Victoria Midterm Exam 1 January 30 2020 Computer Science 349A
dc
= −kc
dt
where t is time in days (d) and k is a constant with units of inverse days (d−1 ).
(a) [4 points] Use Euler’s method to derive a numeric approximation to the concentration
of a radiactive contaminant at time ti+1 days, c(ti+1 ), given the concentration at time
ti days, c(ti ).
(b) [2 points] Let k = 0.175d−1 and suppose that c(0) = 100 Bq/L. Approximate the
concentration at time 0.1d using your method from (a).
JAN 30, 2020 CSC 349A, 3
sm se t1 t2 t3 t4 e1 e2
where sm is the sign of the mantissa and se is the sign of the exponent (0 for positive, 1
for negative), ti are the trits of the mantissa, and ej are the trits of the exponent.
(a) [2 points] What is the computer representation of 3(10) + 91 (10) in this system?
(b) [2 points] What is the smallest positive non-zero number that can be represented in
this system in decimal?
(c) [2 points] What is the size of the gap between any two consecutive numbers in the
interval 9(10) and 27(10) in this ternary floating-point system? Your answer should be
in decimal.