Textbook Notes (367,974)
Canada (161,538)
York University (12,784)
ITEC 1000 (31)
Chapter

Itec1000 Assign2Solutions

7 Pages
288 Views
Unlock Document

Department
Information Technology
Course
ITEC 1000
Professor
Peter Khaiter
Semester
Winter

Description
AP/ITEC1000 Sections A and B "Introduction to Information Technologies" Fall 2011 Assignment # 2 Answers and Solutions 1) a) Convert 121 to its binary represen10tion: 1212= 01111001 . Positive numbers are always represented by themselves. The answer: 01111001 b) Convert -121 to its binary represen10tion: -1212= -01111001 . Using the second method for negative numbers, invert and then add 1. The answer: 10000111 c) Convert 54 to its binary repres10tation: 542= 00110110 . Positive numbers are always represented by themselves. The answer: 00110110 2) Yes. The four least significant bits of the EBCDIC code match the four least significant digits of ASCII. 3) Between -79999 and +79999. This is because 20 bits provide five four-bit locations. The highest (left most) 4 bits, one bit is used for the sign, leaving 3 bits for digits. These 3 bits can accommodate numbers between 0 and 7. 4) a) 15765 is a positive number and is represented by itself 99999 - 8773 = 91226 b) 15765 +91226 106991 add the carry into the result + 1 06992 The leading digit in the complement is 0. Therefore, it represents a positive decimal number: 6992. c) There was no overflow condition because the inputs in the sum have opposite signs and overflow cannot occur. There was a carry condition because in the result, the number of digit exceeded the specified number (i.e., five) and the carry was added to the result. d) 15765 is a positive number and is represented by itself 100000 - 8773 = 91227 e) 15765 +91227 106992 Ignore the carry and the result is: 6992 f) Diminished radix complement arithmetic requires an additional step of adding the carry bit to the result. Radix complement arithmetic does not require this step, because the carry is simply ignored. The latter is easier. 5) Replace each decimal digit by its 4-bit BCD representation and add the corresponding sign pattern in the low-order bits. a) -924 = 1001001001001101 b) 80356 = 100000000011010101101111 c) +981 = 1001100000011100 6) a) The leading digit is between 0 and 4 and, therefore, represents a positive number. Positive numbers are represented by themselves. The answer: 3589 b) The leading digit is between 5 and 9 and, therefore, represents a negative number. To get its magnitude, subtract the complement from the base: 999 -541 458 The answer: -458 7) First, convert each item in the sum to its floating point sign-and-magnitude and excess-50 representation: 96.775 = 0.96775 x 10 = 05296775 0 0.96775 = 0.96775 x 10 = 05096775 Align the exponents by shifting the lower mantissa in the second item two places right and add the two mantissas: 05296775 0520096775 05297742(75) Cut the mantissa to five digits and present the result in floating point format: 0.97742 * 10 = 97.742 (can be 97.743 with rounding) The absolute precise result would be 97.74275. This difference is caused by the rounding due to the limited space for mantissa. 8) a) First, convert to the exponential notation: 111011.0101 = 111011.0101 x 2 . 0 Adjust exponent to get the n0mber in the normali5ed form by shifting the radix point five bits to the left: 111011.0101 x 2 = 1.110110101 x 2 . Represent exponent in the excess-127 notation: 127 + 5 = 132 = 10000100 2 Drop initial "1." in the mantissa, add sign bit as the left most bit and pad with zeros to get single precision IEEE 754 format: 01000010011011010100000000000000 Convert the answer to hexadecimal format: 426D4000 b) 0 First, convert to the exponential notation: -1001.101101 = -1001.101101 x 2 . Adjust exponent to get the number in the normalized form by shifting the radix point three 0 3 bits to the left: -1001.101101 x 2 = -1.001101101 x 2 Represent exponent in the excess-127 notation: 127 + 3 = 130 = 10000010 2 Drop initial "-1." in the mantissa, add sign bit as the left most bit and pad with zeros to get single precision IEEE 754 format: 11000001000110110100000000000000 Convert the answer to hexadecimal format: C11B4000 c) 0 First, convert to the exponential notation: -0.00101011 = -0.00101011 x 2 . Adjust exponent to get the number in the normalized form by shifting the radix point three bits to the right: -0.00101011 x 2 = -1.01011 x 2 -3 Represent exponent in the excess-127 notation: 127 + (-3) = 124 = 01111100 2 Drop initial "-1." in the mantissa, add sign bit as the left most bit and pad with zeros to get single precision IEEE 754 format: 10111110001011000000000000000000 Con
More Less

Related notes for ITEC 1000

Log In


OR

Join OneClass

Access over 10 million pages of study
documents for 1.3 million courses.

Sign up

Join to view


OR

By registering, I agree to the Terms and Privacy Policies
Already have an account?
Just a few more details

So we can recommend you notes for your school.

Reset Password

Please enter below the email address you registered with and we will send you a link to reset your password.

Add your courses

Get notes from the top students in your class.


Submit