CISC 3310 Assn 1 (Chapter 2) due Feb. 15, 2012
1. Do the following conversions:
a. 15610 to base 2 b. 57410 to base 16
c. 27F16 to base 10 d. 6BC216 to base 2
e. 10111010100111010102 to base 16 f. 101110012 to base 10
2. Represent each of the following numbers in two's complement notation, in two ways, binary and hexadecimal. Use 8 bit notation if the value is in the range -128 to -1 (decimal); if it is larger, use 16 bits.
a. -8 b. -57 c. -418
Exercises (pp. 106 on).
I copied some of these from the book another term, so I have copied them again below. Go to the book for the ones in boldface type.
4. Convert the following decimal fractions to binary with a maximum of 6 places to the right of the binary point.
a. 25.84375 b. 57.55
Note that exercises 6 and 7 ask you to represent each number 3 ways
6. Represent the following decimal numbers in binary in 3 ways: 8-bit signed magnitude, one's complement, and two's complement; in some cases the result will be the same, and in other cases it will be different.
c. 119 d. -107
7. Represent the following decimal numbers in binary in 3 ways: 8-bit signed magnitude, one's complement, and two's complement; in some cases the result will be the same, and in other cases it will be different.
c. 20 d. -20
8
10 You must EXPLAIN your answers.
11. Using a "word" of 3 bits, list all of the possible signed binary numbers and their decimal equivalents that are representable in these 3 systems. My note: Create a table for your answers, in order either by binary or decimal; list both the binary value and its equivalent decimal value in each of the 3 forms. You can create 3 separate tables if you wish.
a. signed magnitude
b. one's complement
c. two's complement
26 You must EXPLAIN any unusual results in your answers.
29. Assume we are using the simple model for floating-point representation as given in this book (the representation uses a 14-bit format, 5 bits for the exponent with a bias of 16, a normalized mantissa of 8 bits, and a single sign bit for the number):
a. Show how the computer would represent the numbers 100.0 and 0.25 using this floating point format.
b. Show how the computer would add the two floating-point numbers in part a by changing one of the numbers so they are both expressed using the same power of 2.
c. Show how the computer would represent the sum in part b using the given floating-point representation. What decimal value for the sum is the computer actually storing? Explain.
33. Show how each of the following floating-point values would be stored using IEEE-754 single precision (be sure to indicate the sign bit, the exponent, and the significand fields):
b. -1.5 d. 26.625
37.a. Given that the ASCII code for A is 1000001, what is the ASCII code for J?
b. Given that the EBCDIC code for A is 1100 0001, what is the EBCDIC code for J?
Look these up in the tables!
39
40