Presentation is loading. Please wait.

Presentation is loading. Please wait.

CMSC 104, Section 301, Fall 20021 Lecture 03, 9/09/02 Operating Systems and Using Linux Topics Review Number Systems. Go over Homework 1 Solution. CSHC.

Similar presentations


Presentation on theme: "CMSC 104, Section 301, Fall 20021 Lecture 03, 9/09/02 Operating Systems and Using Linux Topics Review Number Systems. Go over Homework 1 Solution. CSHC."— Presentation transcript:

1 CMSC 104, Section 301, Fall 20021 Lecture 03, 9/09/02 Operating Systems and Using Linux Topics Review Number Systems. Go over Homework 1 Solution. CSHC Hours of Operations. What is an Operating System?

2 CMSC 104, Section 301, Fall 20022 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.

3 CMSC 104, Section 301, Fall 20023 Lecture 03, 9/09/02 The Number System (con’t) Example:44 10 10 1 10 0 4 4 ------------ 4 x 10 + 4 = 44 10

4 CMSC 104, Section 301, Fall 20024 Lecture 03, 9/09/02 The Number System (con’t) Binary Decimal Hexadecimal 0 0 0 1010 10 A 1 1 1 1011 11 B 10 2 2 1100 12 C 11 3 3 1101 13 D 100 4 4 1110 14 E 101 5 5 1111 15 F 110 6 6 111 7 7 1000 8 8 1001 9 9

5 CMSC 104, Section 301, Fall 20025 Lecture 03, 9/09/02 Converting From Hexadecimal to Decimal Example: Convert 1A5F 16 to decimal. 1 A 5 F 16 3 16 2 16 1 16 0 4096 256 16 1 Recall: A 16 = 10 10 and F 16 = 15 10. = 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 = 6751 10

6 CMSC 104, Section 301, Fall 20026 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 143 10 to hex. 143 / 16 = 8 rem = 15 10 = F 16 8 / 16 = 0rem = 8 Done answer = 8F 16 To Check: 8 x 16 + 15 = 128 + 15 = 143 10

7 CMSC 104, Section 301, Fall 20027 Lecture 03, 9/09/02 Example of Equivalent Numbers Binary: 1 0 1 0 0 0 0 1 0 1 0 0 1 1 1 2 Decimal: 20647 10 Hexadecimal: 50A7 16 Notice that the number of digits needed is smaller as the base increases.

8 CMSC 104, Section 301, Fall 20028 Lecture 03, 9/09/02 Homwork Solution 1 Go over homework solution 1!

9 CMSC 104, Section 301, Fall 20029 Lecture 03, 9/09/02 Operating Systems and Using Linux Topics What is an Operating System?

10 CMSC 104, Section 301, Fall 200210 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

11 CMSC 104, Section 301, Fall 200211 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.

12 CMSC 104, Section 301, Fall 200212 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.

13 CMSC 104, Section 301, Fall 200213 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.


Download ppt "CMSC 104, Section 301, Fall 20021 Lecture 03, 9/09/02 Operating Systems and Using Linux Topics Review Number Systems. Go over Homework 1 Solution. CSHC."

Similar presentations


Ads by Google