Assignment 1, due Aug 26

Part of the homework for 22C:60 (CS:2630), Fall 2011
by Douglas W. Jones
THE UNIVERSITY OF IOWA Department of Computer Science

On every assignment, write your name legibly as it appears on your University ID card! Homework is due on paper at the start of class on the day indicated (usually Friday). Exceptions will be made only by advance arrangement (excepting "acts of God"). Late work must be turned in to the TA's mailbox (ask the CS receptionist in 14 MLH for help). Never push homework under someone's door!

  1. What is your E-mail address? (probably firstname-lastname@uiowa.edu, but this does not always work, for example, douglas-jones@uiowa.edu is not teaching this course.)

    Real Homework!

  2. Background: Prior to 1928, punched cards were primarily used for numeric data, Each "character" was coded by one column on the card, by punching in just one of the 12 rows of the card. If we represent punches with 1 and no punch with 0, the character set was:
            000000000000 space      
            100000000000 + (sometimes)    000000100000 4
            010000000000 - (sometimes)    000000010000 5
            001000000000 0                000000001000 6
            000100000000 1                000000000100 7
            000010000000 2                000000000010 8
            000001000000 3                000000000001 9
    

    In 1928, IBM extended their code, supporting upper case letters encoded with 2 punches (they called these multipunch codes), one punch in positions +, - or 0 (the zone punch) positions, and one punch in the 1 through 9 positions (the numeric punch):

            100100000000 A (+ 1)          010000000010 Q (- 8)
            100010000000 B (+ 2)          010000000001 R (- 9)
            100001000000 C (+ 3)          001010000000 S (0 2)
                - - -                     001001000000 T (0 3)
            100000000010 H (+ 8)              - - -
            100000000001 I (+ 9)          001000000010 Y (0 8)
            010100000000 J (- 1)          001000000001 Z (0 9)
            010010000000 K (- 2)
    

    Question: Give the punched card encoding for "HELLO WORLD" (not including the quotes). Your answer should be given as a single column of 12-bit binary numbers in the notation given above. (1 point)

  3. Background: When the first computers were developed, IBM decided on a 36 bit word, allowing 3 12-bit codes to be packed per word, but this is very inefficient when 6 6-bit codes could handle the kinds of character sets in current use. This led to the development of 6-bit codes. One 6-bit code used for punched-card codes used 2 bits to encode the zone punch and 4 bits to encode the numeric punch. For each block, the zero indicated no punch, while nonzero values in that block indicated which hole was punched, from left to right. For example:
            000000000000 space coded as 000000
            001000000000 0              110000
            000100000000 1              000001
            000000000001 9              001001
            100100000000 A (+ 1)        010001
            100000000001 I (+ 9)        011001
            010000000010 Q (- 8)        101000
            001001000000 T (0 3)        110011
    

    Question: Give the 6-bit encoding for "HELLO WORLD" (not including the quotes). Your answer should be given using the notation given above, and may be in a column to the right of the answer to the previous question. (1 point)

  4. A Problem: Give the 7-bit ASCII representation of the text "= CS:2630 =" Don't include the quotes. Give your result as a column of binary numbers. To save paper, put your answer in a column to the right of your answers to the above two questions. (1 point)