java checksum

david001
hw2.zip

rls02.1/baseTest.sh

#!/bin/bash case $1 in checksum.c) rm a.out gcc checksum.c EXE="./a.out" ;; checksum.cpp) rm a.out g++ checksum.cpp EXE="./a.out" ;; checksum.java) rm checksum.class javac checksum.java EXE="java checksum" ;; *) echo "Invalid source file name" echo "-> should be checksum.c, checksum.cpp, or checksum.java" exit 1 esac for i in $(ls i?.txt); do echo Processing: $i eval $EXE $i 8 # comment this line out by placing a # in front of eval... eval $EXE $i 16 # comment this line out by placing a # in front of eval... eval $EXE $i 32 # comment this line out by placing a # in front of eval... done

rls02.1/hw2Test.sh

#!/bin/bash case $1 in checksum.c) rm a.out gcc checksum.c EXE="./a.out" ;; checksum.cpp) rm a.out g++ checksum.cpp EXE="./a.out" ;; checksum.java) rm checksum.class javac checksum.java EXE="java checksum" ;; *) echo "Invalid source file name" echo "-> should be checksum.c, checksum.cpp, or checksum.java" exit 1 esac echo "Case #1 - in10A.txt - 8 bit checksum" eval $EXE in10A.txt 8 >s10A-Output8.txt diff s10A-Output8.txt s10A-Base8.txt echo "Case #1 - in10A.txt - 16 bit checksum" eval $EXE in10A.txt 16 >s10A-Output16.txt diff s10A-Output16.txt s10A-Base16.txt echo "Case #1 - in10A.txt - 32 bit checksum" eval $EXE in10A.txt 32 >s10A-Output32.txt diff s10A-Output32.txt s10A-Base32.txt echo "Case #2 - in17A.txt - 8 bit checksum" eval $EXE in17A.txt 8 >s17A-Output8.txt diff s17A-Output8.txt s17A-Base8.txt echo "Case #2 - in17A.txt - 16 bit checksum" eval $EXE in17A.txt 16 >s17A-Output16.txt diff s17A-Output16.txt s17A-Base16.txt echo "Case #2 - in17A.txt - 32 bit checksum" eval $EXE in17A.txt 32 >s17A-Output32.txt diff s17A-Output32.txt s17A-Base32.txt echo "Case #3 - in18A.txt - 8 bit checksum" eval $EXE in18A.txt 8 >s18A-Output8.txt diff s18A-Output8.txt s18A-Base8.txt echo "Case #3 - in18A.txt - 16 bit checksum" eval $EXE in18A.txt 16 >s18A-Output16.txt diff s18A-Output16.txt s18A-Base16.txt echo "Case #3 - in18A.txt - 32 bit checksum" eval $EXE in18A.txt 32 >s18A-Output32.txt diff s18A-Output32.txt s18A-Base32.txt echo "Case #4 - inRF2.txt - 8 bit checksum" eval $EXE inRF2.txt 8 >sRF2-Output8.txt diff sRF2-Output8.txt sRF2-Base8.txt echo "Case #4 - inRF2.txt - 16 bit checksum" eval $EXE inRF2.txt 16 >sRF2-Output16.txt diff sRF2-Output16.txt sRF2-Base16.txt echo "Case #4 - inRF2.txt - 32 bit checksum" eval $EXE inRF2.txt 32 >sRF2-Output32.txt diff sRF2-Output32.txt sRF2-Base32.txt echo "Case #5 - inWC2.txt - 8 bit checksum" eval $EXE inWC2.txt 8 >sWC2-Output8.txt diff sWC2-Output8.txt sWC2-Base8.txt echo "Case #5 - inWC2.txt - 16 bit checksum" eval $EXE inWC2.txt 16 >sWC2-Output16.txt diff sWC2-Output16.txt sWC2-Base16.txt echo "Case #5 - inWC2.txt - 32 bit checksum" eval $EXE inWC2.txt 32 >sWC2-Output32.txt diff sWC2-Output32.txt sWC2-Base32.txt

rls02.1/i1.txt

a

rls02.1/i2.txt

aa

rls02.1/i3.txt

aaa

rls02.1/i4.txt

aaaa

rls02.1/i5.txt

aaaaa

rls02.1/in10A.txt

AAAAAAAAAA

rls02.1/in17A.txt

AAAAAAAAAAAAAAAAA

rls02.1/in18A.txt

AAAAAAAAAAAAAAAAAA

rls02.1/in19A.txt

AAAAAAAAAAAAAAAAAAA

rls02.1/inRF1.txt

The first principle is that you must not fool yourself and you are the easiest person to fool. Richard Feynman

rls02.1/inRF2.txt

The highest forms of understanding we can achieve are laughter and human compassion. Richard Feynman

rls02.1/inWC1.txt

A fanatic is one who can't change his mind and won't change the subject. Sir Winston Churchill

rls02.1/inWC2.txt

A love for tradition has never weakened a nation, indeed it has strengthened nations in their hour of peril. Sir Winston Churchill

rls02.1/s10A-Base16.txt

AAAAAAAAAA X 16 bit checksum is 509d for all 12 chars

rls02.1/s10A-Base32.txt

AAAAAAAAAA X 32 bit checksum is c3c38cda for all 12 chars

rls02.1/s10A-Base8.txt

AAAAAAAAAA 8 bit checksum is 94 for all 11 chars

rls02.1/s10A-Output16.txt

AAAAAAAAAA X 16 bit checksum is 509d for all 12 chars

rls02.1/s10A-Output32.txt

AAAAAAAAAA X 32 bit checksum is c3c38cda for all 12 chars

rls02.1/s10A-Output8.txt

AAAAAAAAAA 8 bit checksum is 94 for all 11 chars

rls02.1/s17A-Base16.txt

AAAAAAAAAAAAAAAAA 16 bit checksum is 4b12 for all 18 chars

rls02.1/s17A-Base32.txt

AAAAAAAAAAAAAAAAA XX 32 bit checksum is 460f5d5c for all 20 chars

rls02.1/s17A-Base8.txt

AAAAAAAAAAAAAAAAA 8 bit checksum is 5b for all 18 chars

rls02.1/s17A-Output16.txt

AAAAAAAAAAAAAAAAA 16 bit checksum is 4b12 for all 18 chars

rls02.1/s17A-Output32.txt

AAAAAAAAAAAAAAAAA XX 32 bit checksum is 460f5d5c for all 20 chars

rls02.1/s17A-Output8.txt

AAAAAAAAAAAAAAAAA 8 bit checksum is 5b for all 18 chars

rls02.1/s18A-Base16.txt

AAAAAAAAAAAAAAAAAA X 16 bit checksum is 55a1 for all 20 chars

rls02.1/s18A-Base32.txt

AAAAAAAAAAAAAAAAAA X 32 bit checksum is 46460f5c for all 20 chars

rls02.1/s18A-Base8.txt

AAAAAAAAAAAAAAAAAA 8 bit checksum is 9c for all 19 chars

rls02.1/s18A-Output16.txt

AAAAAAAAAAAAAAAAAA X 16 bit checksum is 55a1 for all 20 chars

rls02.1/s18A-Output32.txt

AAAAAAAAAAAAAAAAAA X 32 bit checksum is 46460f5c for all 20 chars

rls02.1/s18A-Output8.txt

AAAAAAAAAAAAAAAAAA 8 bit checksum is 9c for all 19 chars

rls02.1/sRF2-Base16.txt

The highest forms of understanding we can achieve are laughter and human compass ion. Richard Feynman X 16 bit checksum is b1ba for all 102 chars

rls02.1/sRF2-Base32.txt

The highest forms of understanding we can achieve are laughter and human compass ion. Richard Feynman XXX 32 bit checksum is 321cd7ff for all 104 chars

rls02.1/sRF2-Base8.txt

The highest forms of understanding we can achieve are laughter and human compass ion. Richard Feynman 8 bit checksum is 1 for all 101 chars

rls02.1/sRF2-Output16.txt

The highest forms of understanding we can achieve are laughter and human compass ion. Richard Feynman X 16 bit checksum is b1ba for all 102 chars

rls02.1/sRF2-Output32.txt

The highest forms of understanding we can achieve are laughter and human compass ion. Richard Feynman XXX 32 bit checksum is 321cd7ff for all 104 chars

rls02.1/sRF2-Output8.txt

The highest forms of understanding we can achieve are laughter and human compass ion. Richard Feynman 8 bit checksum is 1 for all 101 chars

rls02.1/sWC2-Base16.txt

A love for tradition has never weakened a nation, indeed it has strengthened nat ions in their hour of peril. Sir Winston Churchill 16 bit checksum is 5d9d for all 134 chars

rls02.1/sWC2-Base32.txt

A love for tradition has never weakened a nation, indeed it has strengthened nat ions in their hour of peril. Sir Winston Churchill XX 32 bit checksum is ef00c701 for all 136 chars

rls02.1/sWC2-Base8.txt

A love for tradition has never weakened a nation, indeed it has strengthened nat ions in their hour of peril. Sir Winston Churchill 8 bit checksum is e3 for all 134 chars

rls02.1/sWC2-Output16.txt

A love for tradition has never weakened a nation, indeed it has strengthened nat ions in their hour of peril. Sir Winston Churchill 16 bit checksum is 5d9d for all 134 chars

rls02.1/sWC2-Output32.txt

A love for tradition has never weakened a nation, indeed it has strengthened nat ions in their hour of peril. Sir Winston Churchill XX 32 bit checksum is ef00c701 for all 136 chars

rls02.1/sWC2-Output8.txt

A love for tradition has never weakened a nation, indeed it has strengthened nat ions in their hour of peril. Sir Winston Churchill 8 bit checksum is e3 for all 134 chars