Tutorial 3 - 2010
Jump to navigation
Jump to search
Due date(s): | 30 September 2010 |
(PDF) | Tutorial questions |
Other instructions | Hand-in at class. |
<rst> <rst-options: 'toc' = False/> <rst-options: 'reset-figures' = True/>
.. |m3| replace:: m\ :sup:`3` .. highlight:: python
.. rubric:: Tutorial objectives
- Understand computer representation of decimal numbers and chemical engineering data.
.. rubric:: Recap of tutorial rules
- Tutorials must be handed in at the start of class on **Thursday**, 30 September - thanks!
Question 1 [1]
===
- Convert from binary to decimal: :math:`(0.10101)_2`
- Convert from decimal to binary: :math:`(32.625)_{10}`
- Convert from decimal to binary: :math:`(0.2)_{10}`
Question 2 [1]
===
- . Write, in binary form, the representation for the most negative floating point number that can be stored in an 8-bit word, using 1 bit for the sign, 3 bits for the signed exponent and the remainder for the significand (in normalized form).
- . What is the decimal equivalent of this number?
- . What is the machine number next to this one (both in binary and in decimal please)?
- . Calculate the maximal interval-to-value ratio around these two values. Does it agree with the limit for theoretical machine precision?
- . As which machine number would -7.22 be stored if the machine used (a) chopping, or (b) rounding?
Question 3 [1.5]
=====
- . Increasingly we are seeing cameras being used in chemical processes to monitor and control the process, especially systems that deal with foods and solid products. How much space, in kilobytes, is required to store a digital photo with 640 rows and 480 columns of pixels and 3 layers (red, green and blue) using ``uint8`` integer representation?
- . Computer systems are used to archive data from each electronic measurement, such as temperature, pressure, flow measurements, *etc*. Each measurement is called a tag. At your plant, you wish to store 16,525 tags, recorded once per second and stored in double precision. How much space would be required on the company's server, in terabytes, to store a single copy of 1 year of data? What difference does it make to store the data in single precision?
- . How many data points can you store in double precision in 1500 megabytes of RAM? (For example, MATLAB on a 32-bit Windows Vista machine cannot create arrays greater than 1428 megabytes.)
Use the fact that:
* 1024 bytes = 1 kilobyte * 1024 kilobytes = 1 megabyte * 1024 megabytes = 1 gigabyte * 1024 gigabyte = 1 terabyte = 2\ :sup:`40` bytes
Question 4 [1]
=====
Consider the following system of linear algebraic equations:
.. math:: \left\{\begin{array}{rcl} 2 x_1 -2x_2 +4 x_3 & = & 0 \\ x_1 -3 x_2 + 4x_3 & = & -1 \\ 3x_1 - x_2 +5x_3 &= & 0 \end{array}\right.
- . Use Gauss elimination (forward elimination and backward substitution) to solve these equations for :math:`(x_1,x_2,x_3)`.
- . Validate your solution in either Python or MATLAB.
.. raw:: latex
\vspace{0.25cm} \hrule %\begin{center}END\end{center}
</rst>