SI110 Spring AY13 Alpha:___________ Name:________________________________

advertisement
SI110 Spring AY13
choose one:
(or more)
Alpha:___________
□ Received
no help
□ Received help from:
□ Collaborated with:________________________________________
Homework:
b
|
|
128
Name:________________________________ Page 1 of 2
b
|
|
64
/SI110/The Cyber Battlefield/Digital Data
b
|
|
32
b
|
|
16
b
|
|
8
b
|
|
4
b
|
|
2
b
|
|
1
1. What non-negative integer does
bit pattern 01101011 represent?
5/4/3/0
2. What 8-bit pattern represents
the value 105 ?
5/4/3/0
3. Exactly how many bits are in
a 9 KB (kilobyte) file?
5/4/3/0
4. How many bytes would be needed
for an ASCII text file containing
only these characters GO NAVY!
5/4/3/0
5. What string is represented by
this sequence of ASCII values:
65 110 116
5/4/3/0
6. File foo consists of the 3 bytes: 0 0 1 1 1 0 1 0 0 0 1 0 1 1 0 1 0 0 1 0 1 0 0 1
a. What exactly is displayed if foo is opened in notepad?
b. What exactly is displayed if the file is opened in Frhed (hex editor)?
c. What would happen if you tried to open this with Windows Photo Viewer?
7. Consider the file:
10 / 8 / 5 / 0
10 / 8 / 5 / 0
10 / 8 / 5 / 0
http://rona.cs.usna.edu/~si110/lec/l01/hw/tiger.zip
a. The file extension leads you to believe it is what type of file?
5/3/3/0
b. What type of file is it, really?
5/3/3/0
c. How did you determine your answer to b?
5/3/3/0
SI110 Fall AY13
Alpha:___________
Name:________________________________ Page 2 of 2
8. WEP is a common scheme for securing wireless routers. To connect to the
router you have to enter a "key", where the key is really a number written
in hex. Suppose your friend wrote down his router's WEP key for you, and
there's a character in it that might be the number 0, or it might be the
letter O.
a. Which is it?
5/3/3/0
b. Explain your answer:
10 / 8 / 6 / 0
9. Go to http://rona.cs.usna.edu/~si110/lec/l01/hw/gifar.html and follow the
directions there to save the file foobar to your desktop.
a. Change the name of the file foobar to foobar.jpg.
icon. What happens?
Double-click on the file’s
b. Change the file’s name to foobar.jar, then double-click on the file’s icon.
What happens? (Note: Don’t worry, we’re only joking!)
5/3/3/0
5/3/3/0
c. The file foobar is what’s known as a “gifar”. It satisfies the file format rules
for jpg image files as well as java jar files. (Java jar files are files for the
program “java”.) So here’s the big question: Changing a file’s name does not
5/3/3/0
change the bytes within the file at all. So why is it that something completely
different happens when you double-click on the icon for the file foobar after
naming it foobar.jpg than after naming it foobar.jar?
Page 2 of 2
Download