Assignment 1 Solutions

Part of the homework for 22C:60, Fall 2010
by Douglas W. Jones
THE UNIVERSITY OF IOWA Department of Computer Science

  1. What is your E-mail address? (If you have more than one, give the address you'd prefer used for class purposes.)

    No Solution Provided

    Real Homework!

  2. Background: The most interesting character set supported by any printing device in the 1950's was that of the Fridden Flex-O-Writer. One version of this had 86 printable characters and 8 control codes.

    Question: The Flex-O-Writer did not have an obvious "best" size for characters. Briefly suggest how you could support this character set on a computer with a 6-bit character code. Both the Illiac code and Unicode's UTF-8 encoding offer hints about how this could be done. (1 point)

    Warning: There is, if you search hard enough, documentation on the real Flex-O-Writer on the Internet. The actual character code of the Flex-O-Writer was bizarre enough that it is unlikely to help you answer this question, but it might be fun to look at after you think you have a decent answer.

    Borrowing from the Illiac I character set's F/S (Figure Shift) and L/S (Letter Shift) codes, we could reserve 2 of the 64 6-bit codes for shift-in and shift-out, allowing the remaining 62 code to have two meanings each, one shifted in, and one shifted out. This is the basis of the solution used by the real Flex-O-Writer.

    Or, borrowing from UTF-8, we could invent a 6-bit code where a leading zero allowed for the 32 most common characters (probably the lower case letters, space, and the most common punctuation marks), while a leading one indicated a multi-byte sequence, for example, 10xxxx could be the lead-in on a 2-byte sequence, while 11xxxx could be the second byte of a 2-byte sequence, allowing encoding of 256 codes.

  3. Show what "COMP. ORG., FALL 2010" would look like as a punched paper tape in the ILLIAC I character encoding. Don't include the quotes. (1 point)

    See below

    Suggestion: Your answers to this problem and the next can be arranged as parallel vertical columns, although because of differences in coding, the columns will not be the same length, even though they encode the same characters.

  4. Give the 7-bit ASCII representation of the text "COMP. ORG., FALL 2010" Don't include the quotes. Give your result as a column of binary numbers. (1 point)
            Illiac        ASCII
           |O oO  |                Letter-Shift
       C   |OOoO O|      1000011
       O   | Oo  O|      1001111
       M   |OOo O |      1001101
       P   |  o   |      1010000
           |OOoOOO|      0100000   space
       O   | Oo  O|      1001111
       R   |  oO  |      1010010
       G   |OOo  O|      1000111
           |OOo OO|                Figure-Shift
       .   |OOo O |      0101110
       ,   |O oO O|      0101100
           |OOoOOO|      0100000   space
           |O oO  |                Letter-Shift
       F   | OoOO |      1000110
       A   |O oOO |      1000001
       L   | OoOOO|      1001100
       L   | OoOOO|      1001100
           |OOoOOO|      0100000   space
           |OOo OO|                Figure-Shift
       2   |  o O |      0110010
       0   |  o   |      0110000
       1   |  o  O|      0110001
       0   |  o   |      0110000