===========================================
Assignment #03 - Conversions and Characters
===========================================
- Ian! D. Allen - idallen@idallen.ca - www.idallen.com
Available online: 4pm Wednesday September 30, 2009
Due date in the Blackboard Digital Dropbox:
due at 11:45 AM on Wednesday October 7, 2009 *** NEW DUE DATE ***
*** DUE DATE CHANGED by class agreement in Friday's lecture ***
Answers will be posted by noon on Wednesday so that you can check your
answers before coming to class. I go over every assignment in class.
See the heading "Homework Exercises / Assignments" in the week01notes.txt
file (in the course notes) for the marking scheme for this assignment.
Upload drop box file name template: abcd0001_03_conv.txt
Use your own userid, not abcd0001. The rest of the name must be exactly
as given. Typing mistakes in the name mean no credit. Be precise.
Upload only plain text, not HTML, not MSWord. No fonts. Plain text only.
Plain text only. Did I mention that the format is plain text?
------------------
You will not have access to any calculators during the mid-term test.
You need to know how to do these conversions using pencil and paper.
You need to memorize the starting locations of the letters, numbers,
SPACE, CR, and LF in the ASCII table.
1. Convert these unsigned 12-bit hex numbers into decimal:
D8A 948 C8B ACE 276 35A 839 BDF
ANSWERS:
2. Convert the same hex numbers into decimal assuming 12-bit twos-complement:
ANSWERS:
3. Convert the same hex numbers into decimal assuming 12-bit sign-magnitude:
ANSWERS:
4. Convert the same hex numbers into decimal assuming 12-bit ones-complement:
ANSWERS:
5. Try to do the following ASCII conversion exercises without using a
previously created ASCII table - build a small table yourself from your
memory of a few key ASCII character points. You won't have an ASCII
table during the tests; you will need to remember a few key values and
extrapolate from those.
Convert the following two lines of text into an ASCII encoded sequence
(shown in hexadecimal) assuming DOS/Windows line-endings for each line:
DAT2343
Computer Systems Architecture
ANSWER:
6. Decode the hex sequence below into one or more lines of ASCII text.
(Use the mini ASCII table you created from memory, above.)
4A 75 73 74 20 37 0D 44 61 7A 20 0D
ANSWER:
7. What operating system is the likely source for the text in the
question above, and how can you tell?
ANSWERS:
8. Convert the following 2 lines of text into an EBCDIC encoded sequence
(shown in hexadecimal) using 8 character fixed-length records.
(Remember: No line-end characters are used in fixed-length records.)
You may use an existing EBCDIC table to look up the values. You will
not be required to memorize any EBCDIC table values for any tests.
1 YEAR
52 weeks
ANSWER:
9. Decode the EBCDIC sequence, below, into one or more lines of text.
You may use an existing EBCDIC table to look up the values. You will
not be required to memorize any EBCDIC table values for any tests.
C9 95 40 F1 F4 F9 F2 40 40 C3 96 93
A4 94 82 A4 A2 40 A2 81 89 93 85 84
40 40 40 E3 88 85 40 A2 85 81 40 40
ANSWER:
10. What is the most likely record length for the data in the above question?
ANSWER:
11. Encode the decimal values +274.625 and -12 as 32-bit IEEE-754 floating
point fields and show your answers in hexadecimal.
ANSWERS:
12. Assuming the following eight-byte hex dump contains two Big-Endian,
32-bit, IEEE-754 encoded values: C2 2D C0 00 3F 60 00 00
decode both values shown in this dump as separate decimal values.
ANSWERS:
13. The IEEE 754 floating-point number 81234567h is negative. Without
converting, give the hexadecimal for the same number, only positive.
ANSWER:
14. The IEEE 754 floating-point number 7EDCBA98h is positive. Without
converting, give the hexadecimal for the same number, only negative.
ANSWER:
15. Without converting, select all the IEEE 754 negative numbers:
1837A654h 7A6A3B65h 87B5CDE2h 90A5B5EFh A0000037h D1B8765Ah F0000000h
ANSWER: