Escolar Documentos
Profissional Documentos
Cultura Documentos
Exercise 5 (1 pt): Multiply the following binary numbers, and express the
product in binary:
10111010 1101
Exercise 6 (1 pt): Multiply the following binary numbers, and express the
product in binary:
110101 11011
Exercise 7 (1 pt): Multiply the following binary numbers, and express the
product in binary:
1110010111 10000000000
11111111
11111111
11111111
11111111
11111111
11111111
11111111
11111111
11111111
11111111
11111111
11111111
11111111
11111111
11111111
+11111111
PROGRAM B:
a = 1;
b = a - 3;
a
b
b = a - 3;
a = 1;
a
b
Exercise 13 (1 pt):
What output results when the following Matlab
program executes (in order, from top to bottom)?
a
b
c
d
=
=
=
=
1
3;
2*a - 3*b;
c^2
Exercise 14 (1 pt):
What output results when the following Matlab
program executes (in order, from top to bottom)? (HINT: pi is an
INTRINSIC I.E., BUILT-IN MATLAB CONSTANT)
a
b
c
d
=
=
=
=
cos(pi);
sin(pi/2);
2*a*b - 3;
a - b + c*c*c
Exercise 15 (2 pts):
What output results when the following Matlab
program executes (in order, from top to bottom)? (HINT: Remember the
ORDER OF OPERATIONS)
a
a
b
c
d
=
=
=
=
=
(1 + 2 - 3*4 - 1)/5
((a + a)*a)/a
-1*a/4
b^3 - 4
a - b + c*c*c
Exercise 16 (2 pts):
What output results when the following Matlab
program executes (in order, from top to bottom)?
a = 2^3;
b = cos(0);
c = abs(sqrt(16));
d = a*c - b*c;
d1 = a;
d2 = d;
d3 = d1 - d2 + d*2*(d1/c)
1 2
g t +vt +h
2
Where: Y is a variable assigned the value of the height (in meters) of the
object above the Earths surface; t is a variable assigned the value of the
elapsed time (in seconds); g is a variable assigned the value of the Earths
constant acceleration due to gravity (in meters per second 2), v is a variable
assigned the value of the objects initial velocity (in meters per second), and
h is a variable assigned the objects initial height above the Earths surface
(in meters).
PROBLEM:
A small object is released at an initial height above the Earths surface of h =
935.0 meters. Its initial velocity is v = -18.0 meters per second, and the
Earths acceleration due to gravity is g = 9.81 meters per second 2. What is
the height of this object above the Earths surface after one second has
elapsed? After three seconds have elapsed? After eight seconds have
elapsed? How many seconds will elapse before the object hits the surface of
the Earth? (NOTE: The object hits the surface of the Earth when Y = 0.0
meters. You dont have to obtain Y = 0.0 exactly, just get close enough,
where close enough means within 2.0 meters. In other words, keep
varying t, running your program each time you do, until you obtain a final
value for Y that is between 2.0 meters and -2.0 meters. The corresponding
value of t that produced this final value for Y, is the answer youre looking
for.)
NOTE:
You will need to translate the above equation into CORRECT MATLAB
SYNTAX so that your program will run. Meaning: if you write vt , hoping
that Matlab will figure out that you really meant to write v*t , well, youre
asking too much because Matlab aint that smart! And so you will get an
error if you do this.