Lecture Notes 09/06/05 Fall 2005, CISC103 Announcements: (1) Calendar is now online * reading assignments * labs Both are my best guess, and are subject to change I will update with links as time permits, and will announce any changes via email. Labs are also online on web page. Questions and Answers: How do we access copland from a Mac? Look at my web page for CISC181, and click on UnixAtUD, then go to the FAQ for Macintosh uses to access strauss. Everything that applies to strauss there applies equally to copland. How do we access copland from our PC at home? The same way you do in Memorial 028.. using ssh. To download ssh to your PC, go to http://udeploy.udel.edu (2) A practical skill... uploading files to copland (to your web page). Uploaded with ssh file transfer program "Right click" on files to change "permission modes" rwxr-xr-x corresponds to 755, normal permission mode for directory rw-r--r-- corresponds to 644, normal permission mode for file What would the following correspond to: r--r--r-- 444 rw-rw-r-- 664 rwxrw-r-- 764 rwxrwxr-x 775 (3) Review, and more on number systems. Last time we looked at number systems: binary decimal octal hexadecimal (hex for short) We looked at two practical reasons to know octal and hex octal: file permission modes on unix, which are often needed to make web sites available hex: colors character entities for Unicode characters (learn more about that later...) The philosophical reason to understand binary is: All information on computers or computer networks is represented in binary. We looked at how to convert between binary to decimal: 0111010 First, it is helpful to separate the bits into groups of four, starting from the right. (You can add zeros at the start if you need to: 0011 1010 Then, put the powers of two on top. The powers of two start from the right, at 1, and double each time: 32 16 8 4 2 1 0 0 1 1 1 0 1 0 Then just add up the numbers where you see the ones: 32 + 16 + 8 + 2 = 58 We looked at how to convert between binary to octal: 0 0 1 1 1 0 1 0 Start from the right, and group in groups of three, adding zeros at the left if needed: 0 0 0 1 1 1 0 1 0 Then, for each group of three, use the pattern: 4 2 1 and convert to a digit in the range of 0 through 7: 0 0 0 1 1 1 0 1 0 (base 2) 0 7 2 (base 8) 000111010 = 072 2 8 We looked at how to convert between octal to decimal 0 7 2 (base 8) I start at the right, and the first digit from the right is the 1's place. Then each place from right to left is the previous one times 8. 64 8 1 0 7 2 In this case, 2 is in the one's place, 7 is in the eight's place and 0 is in the sixty-four's place (64, because 8 x 8 is 64). The next place over, for example, if the octal numebr were 1072 base 8, instead of 072, the 1 would be in the _____'s place? Answer: 512, because 64 * 8 is 512... so 072 in octal is (7 * 8) + (2 * 1) = 58 Now what about hexadecimal? In binary, base 2, the digits are 0, 1 in decimal, base 10, the digits are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 In octal, base 8, the digits are 0, 1, 2, 3, 4, 5, 6, 7 What about hexadecimal, which is base 16? Digits are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9... what then? We need "single symbols" to represent 10, 11, 12, 13, 14, 15 A B C D E F From binary to hex, just group in groups of 4 instead of 3, and use 8421 8421 8421 instead of 421 421 421...