-
Hints and Answers Perform the following base conversions using subtraction or division-remainder:
-
Hints and Answers 45810 = ________ 3
-
Hints and Answers 67710 = ________ 5
-
Hints and Answers 151810 = _______ 7
-
Hints and Answers 440110 = _______ 9
-
Perform the following base conversions using subtraction or division-remainder:
-
58810 = _________ 3
-
225410 = ________ 5
-
65210 = ________ 7
-
310410 = ________ 9
-
Hints and Answers Convert the following decimal fractions to binary with a maximum of six places to the right of the binary point:
-
Hints and Answers 26.78125
-
Hints and Answers 194.03125
-
Hints and Answers 298.796875
-
Hints and Answers 16.1240234375
-
Convert the following decimal fractions to binary with a maximum of six places to the right of the binary point:
-
25.84375
-
57.55
-
80.90625
-
84.874023
-
Represent the following decimal numbers in binary using 8-bit signed magnitude, one's complement, and two's complement:
-
Hints and Answers 77
-
Hints and Answers 42
-
119
-
107
-
Using a "word" of 3 bits, list all of the possible signed binary numbers and their decimal equivalents that are representable in:
-
Signed magnitude
-
One's complement
-
Two's complement
-
Using a "word" of 4 bits, list all of the possible signed binary numbers and their decimal equivalents that are representable in:
-
Signed magnitude
-
One's complement
-
Two's complement
-
From the results of the previous two questions, generalize the range of values (in decimal) that can be represented in any given x number of bits using:
-
Signed magnitude
-
One's complement
-
Two's complement
-
Given a (very) tiny computer that has a word size of 6 bits, what are the smallest negative numbers and the largest positive numbers that this computer can represent in each of the following representations?
-
Hints and Answers One's complement
-
Two's complement
-
You have stumbled on an unknown civilization while sailing around the world. The people, who call themselves Zebronians, do math using 40 separate characters (probably because there are 40 stripes on a zebra). They would very much like to use computers, but would need a computer to do Zebronian math, which would mean a computer that could represent all 40 characters. You are a computer designer and decide to help them. You decide the best thing is to use BCZ, Binary-Coded Zebronian (which is like BCD except it codes Zebronian, not Decimal). How many bits will you need to represent each character if you want to use the minimum number of bits?
-
Perform the following binary multiplications:
-
Hints and Answers
-
-
-
Perform the following binary multiplications:
-
-
-
-
Perform the following binary divisions:
-
Hints and Answers 101101 ÷ 101
-
10000001 ÷ 101
-
1001010010 ÷ 1011
-
Perform the following binary divisions:
-
11111101 ÷ 1011
-
110010101 ÷ 1001
-
1001111100 ÷ 1100
-
Hints and Answers Use the double-dabble method to convert 102123 directly to decimal. (Hint: you have to change the multiplier.)
-
Using signed-magnitude representation, complete the following operations:
+ 0 + (-0) =
(-0) + 0 =
0 + 0 =
(-0) + (-0) =
-
Hints and Answers Suppose a computer uses 4-bit one's complement numbers. Ignoring overflows, what value will be stored in the variable j after the following pseudocode routine terminates?
0 ® j // Store 0 in j.
-3 ® k // Store -3 in k.
while k ≠ 0
j = j + 1
k = k - 1
end while
-
If the floating-point number storage on a certain system has a sign bit, a 3-bit exponent, and a 4-bit significand:
-
What is the largest positive and the smallest negative number that can be stored on this system if the storage is normalized? (Assume no bits are implied, there is no biasing, exponents use two's complement notation, and exponents of all zeros and all ones are allowed.)
-
What bias should be used in the exponent if we prefer all exponents to be nonnegative? Why would you choose this bias?
-
Hints and Answers Using the model in the previous question, including your chosen bias, add the following floating-point numbers and express your answer using the same notation as the addend and augend:
Calculate the relative error, if any, in your answer to the previous question.
-
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):
-
Show how the computer would represent the numbers 100.0 and 0.25 using this floating-point format.
-
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.
-
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.
-
What causes divide underflow and what can be done about it?
-
Why do we usually store floating-point numbers in normalized form? What is the advantage of using a bias as opposed to adding a sign bit to the exponent?
-
Let a = 1.0 x 29, b = -1.0 x 29 and c = 1.0 x 21. Using the floating-point model described in the text (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), perform the following calculations, paying close attention to the order of operations. What can you say about the algebraic properties of floating-point arithmetic in our finite model? Do you think this algebraic anomaly holds under multiplication as well as addition?
b + (a + c) =
(b + a) + c =
-
-
Given that the ASCII code for A is 1000001, what is the ASCII code for J?
-
Given that the EBCDIC code for A is 1100 0001, what is the EBCDIC code for J?
-
Hints and Answers Assume a 24-bit word on a computer. In these 24 bits, we wish to represent the value 295.
-
Hints and Answers If our computer uses even parity, how would the computer represent the decimal value 295?
-
Hints and Answers If our computer uses 8-bit ASCII and even parity, how would the computer represent the string 295?
-
Hints and Answers If our computer uses packed BCD, how would the computer represent the number +295?
-
Decode the following ASCII message, assuming 7-bit ASCII characters and no parity: 1001010 1001111 1001000 1001110 0100000 1000100 1000101
-
Hints and Answers Why would a system designer wish to make Unicode the default character set for their new system? What reason(s) could you give for not using Unicode as a default?
-
Write the 7-bit ASCII code for the character 4 using the following encoding:
-
Non-return-to-zero
-
Non-return-to-zero-invert
-
Manchester code
-
Frequency modulation
-
Modified frequency modulation
-
Run length limited
(Assume 1 is "high," and 0 is "low.")
-
Why is NRZ coding seldom used for recording data on magnetic media?
-
Assume we wish to create a code using 3 information bits, 1 parity bit (appended to the end of the information), and odd parity. List all legal code words in this code. What is the Hamming distance of your code?
-
Are the error-correcting Hamming codes systematic? Explain.
-
Hints and Answers Compute the Hamming distance of the following code:
0011010010111100
0000011110001111
0010010110101101
0001011010011110
-
Compute the Hamming distance of the following code:
0000000101111111
0000001010111111
0000010011011111
0000100011101111
0001000011110111
0010000011111011
0100000011111101
1000000011111110
-
Suppose we want an error-correcting code that will allow all single-bit errors to be corrected for memory words of length 10.
-
How many parity bits are necessary?
-
Assuming we are using the Hamming algorithm presented in this chapter to design our error-correcting code, find the code word to represent the 10-bit information word: 1001100110.
-
Hints and Answers Suppose we are working with an error-correcting code that will allow all single-bit errors to be corrected for memory words of length 7. We have already calculated that we need 4 check bits, and the length of all code words will be 11. Code words are created according to the Hamming algorithm presented in the text. We now receive the following code word:
1 0 1 0 1 0 1 1 1 1 0
Assuming even parity, is this a legal code word? If not, according to our error-correcting code, where is the error?
-
Repeat exercise 35 using the following code word:
0 1 1 1 1 0 1 0 1 0 1
-
Name two ways in which Reed-Soloman coding differs from Hamming coding.
-
When would you choose a CRC code over a Hamming code? A Hamming code over a CRC?
-
Hints and Answers Find the quotients and remainders for the following division problems modulo 2.
-
Hints and Answers 10101112 ÷ 11012
-
Hints and Answers 10111112 ÷ 111012
-
Hints and Answers 10110011012 ÷ 101012
-
Hints and Answers 1110101112 ÷ 101112
-
Find the quotients and remainders for the following division problems modulo 2.
-
11110102 ÷ 10112
-
10101012 ÷ 11002
-
11011010112 ÷ 101012
-
11111010112 ÷ 1011012
-
Hints and Answers Using the CRC polynomial 1011, compute the CRC code word for the information word, 1011001. Check the division performed at the receiver.
-
Using the CRC polynomial 1101, compute the CRC code word for the information word, 01001101. Check the division performed at the receiver.
-
* Pick an architecture (such as 80486, Pentium, Pentium IV, SPARC, Alpha, or MIPS). Do research to find out how your architecture approaches the concepts introduced in this chapter. For example, what representation does it use for negative values? What character codes does it support?