* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Operating Systems and Using Linux
Survey
Document related concepts
Transcript
Operating Systems and Using Linux Topics • Review Number Systems. • Go over Homework 1 Solution. • CSHC Hours of Operations. • What is an Operating System? CMSC 104, Section 301, Fall 2002 1 Lecture 03, 9/09/02 The Number System Position Number System • The same digits have different meaning depending on their position in the numeral. • The value of a digit depends on the digit itself of its position. • Binary, decimal, hexadecimal are all position number system. CMSC 104, Section 301, Fall 2002 2 Lecture 03, 9/09/02 The Number System (con’t) • Example: 4410 101 100 4 4 -----------4 x 10 + 4 = 4410 CMSC 104, Section 301, Fall 2002 3 Lecture 03, 9/09/02 The Number System (con’t) Binary Decimal Hexadecimal 0 1 10 11 100 101 110 111 1000 1001 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 CMSC 104, Section 301, Fall 2002 Binary 1010 1011 1100 1101 1110 1111 4 Decimal Hexadecimal 10 11 12 13 14 15 A B C D E F Lecture 03, 9/09/02 Converting From Hexadecimal to Decimal • Example: Convert 1A5F16 to decimal. 1 A 5 F 163 4096 162 161 160 256 16 1 Recall: A16 = 1010 and F16 = 1510. = 1 x 4096 + A x 256 + 5 x 16 + F x 1 = 1 x 4096 + 10 x 256 + 5 x 16 + 15 x 1 = 4096 + 2560 + 80 + 15 = 675110 CMSC 104, Section 301, Fall 2002 5 Lecture 03, 9/09/02 Converting From Decimal to Hexadeciaml • • • Perform successive divisions by 16, placing the remainder (0-9, A-F) in each of the positions from right to left. Continue until the quotient is zero. Example: Convert 14310 to hex. 143 / 16 = 8 8 / 16 = 0 Done rem = 1510 = F16 rem = 8 answer = 8F16 To Check: 8 x 16 + 15 = 128 + 15 = 14310 CMSC 104, Section 301, Fall 2002 6 Lecture 03, 9/09/02 Example of Equivalent Numbers Binary: 1 0 1 0 0 0 0 1 0 1 0 0 1 1 12 Decimal: 2064710 Hexadecimal: 50A716 Notice that the number of digits needed is smaller as the base increases. CMSC 104, Section 301, Fall 2002 7 Lecture 03, 9/09/02 Homwork Solution 1 Go over homework solution 1! CMSC 104, Section 301, Fall 2002 8 Lecture 03, 9/09/02 Operating Systems and Using Linux Topics • What is an Operating System? CMSC 104, Section 301, Fall 2002 9 Lecture 03, 9/09/02 Computer Science Help Desk • CSHC (Computer Science Help Center) is staffed by student tutors. • Help with homework and projects. • Text editors and Linux questions. • ECS 332A – Hours of Operations: • Monday – Thursday 12 - 8 PM • Friday 12 – 4 PM CMSC 104, Section 301, Fall 2002 10 Lecture 03, 9/09/02 What is an Operating System (OS)? • A computer program • Performs many operations, such as: • Allows you to communicate with the computer (tell it what to do) • Controls access (login) to the computer • Keeps track of all processes currently running • At this point, your main concern is how to communicate with the computer using the OS. CMSC 104, Section 301, Fall 2002 11 Lecture 03, 9/09/02 How Do I Communicate With the Computer Using the OS? • You communicate using the particular OS’s user interface. • Graphical User Interface (GUI) - Windows • Command-driven interface - DOS, UNIX, Linux • We will be using the Linux operating system, which is very similar to UNIX. CMSC 104, Section 301, Fall 2002 12 Lecture 03, 9/09/02 How Do I Communicate With the Computer Using the OS? (con’t) • When you log in to the Linux system here, a user prompt will be displayed: linux#[1]% _ where # is the number of the Linux server that you have connected to. You may use any of the Linux servers. • The number in the brackets will change as you work. It is the “number” of the command that you are about to type. • If this prompt is not on the screen at any time, you are not communicating with the OS. CMSC 104, Section 301, Fall 2002 13 Lecture 03, 9/09/02