0% found this document useful (0 votes)
49 views

Assignment 2

Uploaded by

bereket
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
49 views

Assignment 2

Uploaded by

bereket
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

2.

Perform the following base conversions using subtraction or division-remainder:


a) 58810 = _______3
3 | 588 0
3 | 196 1
3 | 65 2
3 | 21 0
3|7 1
3|2 2
210210
b) 225410 = _______5
5 | 2254 4
5 | 450 0
5 | 90 0
5 | 18 3
5|3 3
33004
c) 65210 = _________7
7 | 654 3
7 | 93 2
7 | 13 6
7|1 1
1623
d) 310410 = ________9
9 | 3104 8
9 | 344 2
9 | 38 2
9|4 4
4228

8. Convert the following decimal fractions to binary with a maximum of six places to the
right of the binary point:
a) 25.84375
2 | 25 1
2 | 12 0
2|6 0
2|3 1
2|1 1
11001
2 * .84375 = 1.6875 1
2 * .6875 = 1.375 1
2 * .375 = 0.75 0
2 * .75 = 1.5 1
2 * .5 = 1.0 1
11001.11011
b) 57.55
2 | 57 1
2 | 28 0
2 | 14 0
2|7 1
2|3 1
2|1 1
111001
2 * .55 = 1.1 1
2 * .1 = .2 0
2 * .2 = .4 0
2 * .4 = .8 0
2 * .8 = 1.6 1
2 * .6 = 1.2 1
111001.100011

c) 80.90625
2 | 80 0
2 | 40 0
2 | 20 0
2 | 10 0
2|5 1
2|2 0
2|1 1
1010000
2 * .90625 = 1.8125 1
2 * .8125 = 1.625 1
2 * .625 = 1.25 1
2 * .25 = .5 0
2 * .5 = 1.0 1
1010000.11101
d) 84.874023
2 | 84 0
2 | 42 0
2 | 21 1
2 | 10 0
2|5 1
2|2 0
2|1 1
1010100
2 * .874023 = 1.748046 1
2 * .748046 = 1.496092 1
2 * .496092 = 0.992184 0
2 * .992184 = 1.984368 1
2 * .984368 = 1.968736 1
2 * .968736 = 1.937472 1
1010100.110111
25. Using a “word” of 4 bits, list all the possible signed binary numbers and their decimal
equivalents that are representable in:
a) Signed magnitude
1001 -1
1010 -2
1011 -3
1100 -4
1101 -5
1110 -6
1111 -7
0000 0
0001 1
0010 2
0011 3
0100 4
0101 5
0110 6
0111 7
b) One’s complement
1110 -1
1101 -2
1100 -3
1011 -4
1010 -5
1001 -6
1000 -7
1111 -8
0000 0
0001 1
0010 2
0011 3
0100 4
0101 5
0110 6
0111 7
c) Two’s complement
1111 -1
1110 -2
1101 -3
1100 -4
1011 -5
1010 -6
1001 -7
1000 -8
0001 1
0010 2
0011 3
0100 4
0101 5
0110 6
0111 7
26. From the result of the previous two questions, generalize the range of values (in
decimal) that can be represented in any given x number of bits using:
a) Signed magnitude
-(2x-1 – 1) : 2x-1 - 1
b) One’s complement
-2x-1 : 2x-1 - 1
c) Two’s complement
-2x-1 : 2x-1 - 1
37. Perform the following binary multiplications, assuming unsigned integers:
a) 1011 * 101
1011
101
1011
0000
1011__
110111
b) 10011 * 1011
10011
1011
10011
10011
00000
10011___
11010001
c) 11010 * 1011
11010
1011
11010
11010
00000
11010___
100011110
45. If the floating-point number representation on a certain system has a sign bit, a 3-bit
exponent, and a 4-bit significand:
a) What is the largest positive and the smallest positive number that can be stored on this
system if the storage is normalized? (Assume that no bits are implied, there is no biasing,
exponents use two’s complement notation, and exponents of all zeros and all ones are
allowed.)
Largest: 11110002 (12010)
Smallest: 0.12 (0.52)
b) What bias should be used in the exponent if we prefer all exponents to be non-negative?
Why would you choose this bias?
3, because it is midway between 0 and 7 (the exponent has 3 bits, 23 = 8 possible values)
48. What causes divide underflow, and what can be done about it?
Divide underflow occurs when the divisor is much smaller than the dividend, which the
computer sees as the equivalent of division by zero.
49. 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?
So that there are not synonymous forms of the same number, which are not well-suited for digital
computers. When using bias to represent signed integers, simpler integer circuits designed for
unsigned integers may be used
58. Decode the following ASCII message, assuming 7-bit ASCII characters and no parity:
1001010 1001111 1001000 1001110 0100000 1000100 1001111 1000101
JOHN DOE
66. Suppose we want an error-correcting code that will allow all single-bit errors to be
corrected for memory words of length 10.
a) How many parity bits are necessary?
4 parity bits
b) 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
10011010111000

77. Using the CRC polynomial 1011, compute the CRC code word for the information
word, 1011001. Check the division performed at the receiver.
1011001011
1011001011
1011
0000001011
1011
0000

You might also like