I need help with these questions on my Computer Organization homework. 6. File f
ID: 3872668 • Letter: I
Question
I need help with these questions on my Computer Organization homework.
6. File foo consists of the 3 bytes: 0 1 0 0 1 0 0 0 0 1 1 0 1 0 0 1 0 0 1 0 0 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?
8. WEP is a common scheme for securing wireless routers. To connect to therouter 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?
b. Explain your answer.
Explanation / Answer
6. a) When opened in notepad, the file is displayed in the ASCII form. So, each of the 3 bytes are ocnverted to characters and then dislayed. The first byte, 01001000 translates to 72 in decimal, which is the character 'H'. The second byte, 01101001 translates to 105 in decimal, which is the character 'i' in ASCII. The third byte, 00100001 translats to 33 in decimal, which is the character '!'. Thus, the file in notepad shows "Hi!"
6. b) When opened in a hex editor, the first byte corresponds to 48, the second byte to 69 and the third byte to 21. Thus, the file still shows the ASCII values as "Hi!"
6. c) When tried openning with Windows Photo Viewer, it says that the file format is unsupported and the file cannot be opened.
7. a) It is the number 0
7. b) The key is a hexadecimal number, which only supports numbers from 0-9 and letters A-F, thus it cannot be the letter 'O'