Day 2HW: Due Day 3.
3.1: p.136, 1c, 2c, (counting binary)
Do 3abce, 4bcde by hand. Do 3df and 4af using the
PC's calculator. (bin->dec)
Do 5bcde
by hand. Check by looking at your list made in class.
Do a and f with
the calculator. Then write the result in the "powers of two" form
and check it.(dec->bin)
7 (range of numbers in n bits)
8all (addition, binary)
A. Assuming an 8-bit cell, add 1111 1100 and 0000 0101 by
hand.
Add it on the PC calculator, using the Byte size. Note the loss
of
the carry.
3.4 p 140 27all (count in hex)
28 all by hand. 162 =(24 )2
=28 = 256. 163 =(24 )3
=212 = ?, 164 =(24 )4 =216
= ?
36 It might be easier to rewrite as hex first. (code from binary
ASCII)
A. Write your first name or nickname and last initial, followed
by period, in ASCII ( hex version) (e.g. I would do Sally
S.)
Don't forget the space.
B. What is the difference between the ASCII code for A and a?
B and b? X and x? (Look at the binary) Make a guess as to what
the shift key on the
keyboard
does.
C. What do you have to do to the ASCII digit "3" to change it
to the unsigned binary byte representing 3? What do you have to
do
to go the other way? Does this work for the other digits 0-9?
Notes: On PC's, the Calculator
(Programs>Accessories>Calculator:
View>Scientific) will do numerical conversions. Type the
number in
in one form, then choose the button for another form.
For non-decimal numbers (binary, hex) it limits sizes: "Word"
is 16 bits (2 bytes), "Dword" is double-word is 32 bits (4 bytes), etc.
It
simply
loses the carry, if there is one.
Next: The Pep8 simulator is working, so: We'll start
with the computer architecture,
chapter
4, thru p. 159, then start chapter 5.
| To Sievers Home Page |
CS225-Fall06/Day2.htm
|
|