CS 103
Homework 2 (Due 10/19)
Homework is due at beginning of class on
the due date. Late submissions will not be accepted.
Be sure to include your name and student ID.
Also, you must staple together all
of your assignment.
-
For your initials (first and last name only)
written in capital letters,
give the
decimal, binary, and hexadecimal
ASCII codes for the two characterss.
-
Take the decimal ASCII codes from the previous
question and subtract 30 (decimal) from each.
Using the resulting two numbers as
ASCII codes (in decimal),
what are the two characters now?
-
Let x be the day of the month
for your birthday.
(For example, if your birthday
is December 25, then x is 25 in decimal.)
Compute x + 20 (in decimal), and
convert the resulting sum into binary
and into hexadecimal.
-
In this problem, we will
define digits y and z in
the following manner.
Let y be the last digit of
your NJIT student ID.
If y is 0, 1, or 2,
then let z = 3.
If y is 3, 4, or 5,
then let z = 4.
If y is 6, 7, 8, or 9,
then let z = 5.
Now write a "C" after the digit z,
and treat zC as a two-digit hexadecimal number.
Convert zC into decimal.