Always, on every assignment, please write your name legibly as it appears
on your University ID and on the class list! All assignments will be due
at the start of class on the day indicated, and unless there is what
insurance companies call "an act of God" - something outside your
control; the only exceptions to this rule will be by advance arrangement.
-
Repeat exercise k from chapter 2 for a total of 3 times. Show your work,
including the conversion from decimal back to binary.
-
Show each of your binary numbers from the previous problem in hexadecimal
and in octal.
-
Show the one's complement and two's complement of each of the binary numbers
you used in the first problem.
-
Explain why, if you use the following formula to evaluate the value of
a number in an arbitrary base, using pencil and paper, you end up converting
it to decimal, while if you write a computer program in a language such as
C, C++ or Java, you end up converting the number to binary.
| i=digits(S)-1 |
|
value(S) =
|
|
v(S[i]) × ri
(radix r)
|
| i = 0 |
|
-
Once upon a time, several computer manufacturers built machines with 18-bit
words.
This was back in the era before two's complement arithmetic had become
universally accepted for signed integer arithmetic, so some of these machines
used one's complement arithmetic or signed magnitude representations.
So for each signed number system mentioned above, what is the greatest positive
integer and the most extreme negative integer.
Give each answer to the above question in
binary, unsigned octal, unsigned hexidecimal, and the conventional
signed decimal representation.
-
Give the 4 consecutive Hawk memory addresses starting at
0000,475B16, in hexadecimal, and identify which of
these are legal byte addresses, legal halfword addresses, and legal word
addresses.
-
Give SMAL assembly code to assemble the null-terminated ASCII
string "Several words of text" into
the first locations of the Hawk RAM, with the next legal Hawk word in memory
containing a count of the number of bytes in that string (including the
terminating null byte).