project3 - Programming Assignment#3 Submit file is due...

Info icon This preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Programming Assignment #3 Submit file is due Tuesday, October 24, at 10am. Hard copy is due at the beginning of class the same day This is another short assignment to give you a chance to apply some of the techniques we’ve been discussing (bit manipulation, binary/text file I/O, mixing C/C++, etc.) and a to give you some practice in following an algorithm. The goal is to create a program that encodes a file using a uuencode algorithm and decodes it with a uudecode algorithm. A uuencode algorithm takes input, either binary or text, and converts it into plain text output. This is essentially how email programs can send binary files (e.g. zip files) across a text only network protocol (e.g. SMTP or email). The crux of the algorithm is that it converts 3 8-bit characters (24-bits) into 4 6-bit characters (also 24-bits.) The value 32 is added to each 6-bit character which guarantees that all new characters are plain ASCII printable characters. For example, given a file (named test.txt ) containing the single 3-letter word cat , this is what the uuencoded text (placed in a file called test.uue) looks like: begin 644 test.txt #8V%T ` end The actual encoding of the word cat is in the second line. Dividing the 3 8-bit characters into 4 6-bit characters and adding 32 can be shown graphically: c a t 0 1 1 0 0 0 1 1 0 1 1 0 0 0 0 1 0 1 1 1 0 1 0 0 +32 8 V % T 011000=24, 110110=54, 000101=5, 110100=52 and ASCII(8)=56, ASCII(V)=86, ASCII(%)=37, ASCII(T)=84. A longer passage (preamble.txt): When, in the course of human events, it becomes necessary for a people to advance from that subordination in which they have hitherto remained, and to assume among
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern