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

Info iconThis 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 the powers of the earth, the equal and independent station to which the laws of
Background image of page 1

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

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

This lab report was uploaded on 04/18/2008 for the course CS 225 taught by Professor Volper during the Fall '06 term at DigiPen Institute of Technology.

Page1 / 2

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

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online