Computer Systems Fundamentals PDF

Summary

This document provides a basic introduction to computer systems, covering fundamental concepts like hardware, input/output devices, and data representation. It outlines the key components and functions of a computer system.

Full Transcript

A World of information Computers are everywhere: at work, at school, and at home. Mobile computers and mobile devices are small enough to carry. Mobile devices, such as many cell phones, often are classified as computers. Mobile devices are Computers?!!! Computers are a primary m...

A World of information Computers are everywhere: at work, at school, and at home. Mobile computers and mobile devices are small enough to carry. Mobile devices, such as many cell phones, often are classified as computers. Mobile devices are Computers?!!! Computers are a primary means of local and global communication for billions of people. Through computers, society has instant access to information from around the globe. A World of information Banks place ATMs (automated teller machines) (embedded computer) all over the world, so that customers can deposit and withdraw funds anywhere at anytime. Vehicles include onboard navigation systems (embedded computer) that provide directions, call for emergency services, and track the vehicle if it is stolen. People also spend hours of leisure time using a computer. They play games, listen to music or radio broadcasts, ……….. What Is a Computer? A computer is an electronic device, operating under the control of instructions stored in its own memory. A computer can: accept data, process the data according to specified rules, produce results, and store the results for future use Data and Information Computers process data into information. What is Data?! Data is a collection of unprocessed items, which can include text, numbers, images, audio, and video. Information conveys meaning and is useful to people. Computers process several data items to print information in the form of a cash register receipt. Information Processing Cycle Computers process data (input) into information (output). Computers carry out processes using instructions, instructions are the steps that tell the computer how to perform a particular task. A collection of related instructions organized for a common purpose is referred to as software. The series of input, process, output, and storage activities as the information processing cycle. Most computers today communicate with other computers. As a result, communications also has become an essential element of the information processing cycle. The Components of a Computer A computer contains many electric, electronic, and mechanical components known as hardware. These components include: input devices, output devices, a system unit, storage devices, and communications devices. Input Devices An input device is any hardware component that allows you to enter data and instructions into a computer. Five widely used input devices are the keyboard, mouse, microphone, scanner, and Web cam. What is the job of each previous mentioned device?!!!! Output Devices An output device is any hardware component that conveys information to one or more people. Three commonly used output devices are: a printer, a monitor, and speakers System Unit The system unit is a case that contains the electronic components of the computer that are used to process data. The circuitry of the system unit usually is part of or is connected to a circuit board called the motherboard Two main components on the motherboard are: processor and memory. The processor, also called a CPU (central processing unit), is the electronic component that interprets and carries out the basic instructions that operate the computer. Memory consists of electronic components that store instructions waiting to be executed and data needed by those instructions. The computer memory is volatile, which means its contents are erased when the computer is shut off. Storage Devices Storage holds data, instructions, and information for future use. For example, computers can store hundreds or millions of customer names and addresses. Storage holds these items permanently. Examples of storage media are USB flash drives, hard disks, optical discs, and memory cards. A storage device records (writes) and/or retrieves (reads) items to and from storage media. A USB flash drive is a portable storage device that is small and lightweight enough to be transported on a keychain or in a pocket. A hard disk provides much greater storage capacity than a USB flash drive. Hard disks are enclosed in an airtight, sealed case. Although some are portable, most are housed inside the system unit Portable hard disks are either external or removable. Communications Devices A communications device is a hardware component that enables a computer to: send (transmit) and receive data, instructions, and information to and from: one or more computers or mobile devices. A widely used communications device is a modem. Communications occur over cables, telephone lines, cellular radio networks, satellites, and other transmission media. Some transmission media, such as satellites and cellular radio networks, are wireless, which means they have no physical lines or wires. Computer Characteristics Speed: When data, instructions, and information flow along electronic circuits in a computer, they travel at incredibly fast speeds. Reliability: The electronic components in modern computers are dependable and reliable because they rarely break or fail. Consistency: Given the same input and processes, a computer will produce the same results — consistently. Storage: A computer can transfer data quickly from storage to memory, process it, and then store it again for future use. Communications: Most computers today can communicate with other computers, often wirelessly. Computers with this capability can share any of the four information processing cycle operations — input, process, output, and storage — with another computer or a user. Computers Misuse Health Risks: Prolonged or improper computer use can lead to injuries or disorders of the hands, wrists, elbows, eyes, neck, and back. Computer users can protect themselves from these health risks through proper workplace design, good posture while at the computer, and appropriately spaced work breaks. Two behavioral health risks are computer addiction and technology overload. Violation of Privacy: Nearly every life event is stored in a computer somewhere... in medical records, credit reports,… Individuals could have find their privacy violated and identities stolen Public Safety: Adults, teens, and children around the world are using computers to share publicly their photos, videos, journals, music, and other personal information. Do not share information that would allow others to identify or locate you and do not disclose identification numbers, passwords. Networks and the Internet A network is a collection of computers and devices connected together, often wirelessly, via communications devices and transmission media. Networks allow computers to share resources, such as hardware, software, data, and information. Sharing resources saves time and money. The server controls access to the resources on a network. The other computers on the network, each called a client or workstation, request resources from the server What major differences between the server and client computers? Home networks usually are small, existing within a single structure. Business and school networks can be small, such as in a room or building, or widespread, connecting computers and devices across a city, country, or the globe. The world’s largest computer network is the Internet! The Internet The Internet is a worldwide collection of networks that connects millions of businesses, government agencies, educational institutions, and individuals. People around the world use the Internet daily for a variety of reasons: Communicate with and meet other people Conduct research and access a wealth of information and news Shop for goods and services Bank and invest Participate in online training Engage in entertaining activities, such as planning vacations, playing online games, listening to music, watching or editing videos. Download music and videos Share information, photos, and videos Access and interact with Web applications With instant messaging, you can have a live conversation with another connected user. In a chat room, you can communicate with multiple users at the same time — much like a group discussion. You also can use the Internet to make a telephone call The Web, short for World Wide Web, is one of the more popular services on the Internet. The Web contains billions of documents called Web pages. Web pages often have built-in connections, or links, to other documents, graphics, other Web pages, or Web sites. A Web site is a collection of related Web pages. A blog is an informal Web site consisting of timestamped articles in a diary or journal format, usually listed in reverse chronological order. A Web application is a Web site that allows users to access and interact with software from any computer or device that is connected to the Internet. Ex: Web applications include those that allow you to send and receive e-mail messages, prepare your taxes, organize digital photos, create documents, and play games. Thank you! Lecture 3: Computer Software OBJECTIVE Learn the types of software and the purpose of each type. Understand the function of the operating system. Recognize the types of the operating system. Differentiate between the generations of programming languages. COMPUTER SOFTWARE Programs that execute on hardware Program: collection of instructions to carry out in order to complete some task Computer software can be broadly classified into: System Software (such as Operating system) Application software (such as web browser TYPE OF SOFTWARE Application software is used by the users to perform specific tasks System software provides the basic functions that are performed by the computer. SYSTEM SOFTWARE Provides basic functionality to computer, Controls computer hardware, Acts as an interface between user, application software and computer hardware Categorized based on Function: Management: BIOS, OS, Device Driver, System Utilities Development: Compiler, Interpreter, Linker. OPERATING SYSTEM Special program loaded automatically when computers start. Designed to allow application software and users to interact with hardware without having to learn all the details of how the hardware works. Managing and controlling different resources of computer hardware. Operating system is a large and complex software consisting of several components. Examples: Windows, Android, Linux, and UNIX. OPERATING SYSTEM Main functions of the operating system are: Process Management Memory Management File Management Device Management Protection and Security User Interface or Command Interpreter OPERATING SYSTEM Command Line Interface (Dos,Unix) Graphical User Interface (GUI) OPERATING SYSTEM Single-user, single-task (e.g. Palm OS , MS-DOS) Single-user, multi-tasking (e.g. MS-Windows) Multi-user, Multi-tasking (e.g. UNIX) Multiprocessing (e.g. UNIX) Real-time operating system (RTOS): for real- time applications such as scientific instruments and industrial systems (e.g. LynxOS) Embedded: used in appliances like microwaves, washing machines, traffic control systems SYSTEM SOFTWARE Device Driver System Utilities Anti-virus Data and Disk Compression Cryptographic Disk Cleaners Backup System Profiling Network Managers PROGRAMMING LANGUAGES A Programming Language consists of a set of vocabulary and grammatical rules, to express the computations and tasks that the computer has to perform. Programming languages fall into three categories: Machine Language Assembly Language High-level Language (HLL) TRANSLATOR SOFTWARE Assembler Compiler: Translates an entire program at once Compiled programs are faster to execute e.g. C++, and Java Interpreter: Translates one program line at a time Interpreted programs are easier to debug e.g. Python, and some versions of BASIC HIERARCHYOF PROGRAM EXECUTION Other object code Source Object Executable Compiler Linker Code Code Code High level Language Machine Language Machine Language APPLICATION SOFTWARE Programs that user use, Program are designed for a relatively specific subject purpose or General purpose General-Purpose applications Specialized application GENERAL-PURPOSE APPLICATIONS General purpose or “off-the-shelf” programs such as Word Processing Image Processing Spreadsheet Suite of Software CAD/CAM Geographic Information Systems Web Browser SPECIALIZED APPLICATION Problem-SpecificPrograms,narrowfocuson specificdisciplinesand occupations Programthatauserwritestosolveaspecificproblem SOFTWARE ACQUISITION Retail Software is off-the-shelf software sold in retail stores. OEM Software stands for “Original Equipment Manufacturer” software. It refers to software which is sold and bundled with hardware. Demo Software is designed to demonstrate what a purchased version of the software can do and provides a restricted set of features. Shareware is a program that the user can try for free, for a specified period, as defined in the license. Freeware is software that is free for personal use. Public Domain Software is free software. Unlike freeware, public domain software does not have a copyright owner or license restrictions. Open-Source Software is software whose source code is availableand can be customized and altered within the specified guidelines laid THANKS Introduction to Computer Systems Module 4: Data Representation Dr Islam Alkabbany Outlines Recognize the number systems. Learn the conversion from a number system to another one. Understand binary arithmetic. Floating point binary data representation. Text data representation. Data Representation Data can be in the form of numbers, text, audio, image, video or a combination of these forms which is called multimedia. Any form of data must be represented by symbols 0 and 1 to be stored in or processed by computers. Encoding: The way the data could be represented into 0 and 1 Number System A number system in base (radix) r uses unique symbols for r digits. One or more digits are combined to get a number The digits of a number have two kinds of values: o Digit value o Position value The number is calculated as the sum of Digit * baseposition of each of the digits A number in a particular base is written as: (number)base Number of values could be represented in n digit is rn Number System Example: decimal which has base 10 has 10 digits values (0-9) X = (5432)10 X = 5*103 + 4*102 + 3*101 + 2*100 = 5*1000 + 4*100 + 3*10 + 2*1 =5432 Number of values could be represented in 4 digit = 104 Number Systems In computers, we are concerned with four kinds of number systems: Number Systems Example Decimal Number System: (512.49)10 (512.49)10 = 5x102 + 1x101 + 2x100 + 4x10-1 + 9x10-2 (512.49)10 = 5x100 + 1x10 + 2X1 +4x.1 + 9x.01 (512.49)10 = 512.49 Number Systems Example Octal Number System: (456.41)8 (456.41)8 = 4x82 + 5x81 + 6x80 + 4x8-1 + 1x8-2 (456.41)8 = 4*64 + 5*8 + 6*1 + 4/8 + 1/64 (456.41)8 = 302.515625 Number Systems Example Hexadecimal Number System: (1FA.4C)16 (1FA.4C)16 = 1x162 + 15x161 + 10x160 + 4x16-1 + 12x16-2 (1FA.4C)16 = 1*256 +15*16 +10*1+4/16 + 12/256 (1FA.4C)16 = 506.296875 Number Systems Example Binary Number System: (1101.01)2 (1101.01)2 = 1x23 + 1x22 + 0x21 + 1x20 + 0x2-1 + 1x2-2 (1101.01)2 = 1*8 +1*4 + 0*2 + 1*1 + 0/2 + + 1/4 (1101.01)2 = 13.25 Converting Decimal Integer to Binary, Octal, Hexadecimal A decimal integer is converted to any other base, by using the division operation (integer division) by the base of the new number system. Example: Convert (25)10 to binary, octal and Hexadecimal. Converting Decimal Integer to Binary Number base of Reminder (Quotient) new system 25 ÷2 1 LSB 12 ÷2 0 6 ÷2 0 3 ÷2 1 1 ÷2 1 MSB 0 End when last result =0 (25)10 = (11001)2 (11001)2 = 1x24 + 1x23 + 1x20 Converting Decimal Integer to Octal Number base of new Reminder (Quotient) system 25 ÷8 1 LSB 3 ÷8 3 MSB 0 End when last result =0 (25)10 = (31)8 (31)8 = 3x81 + 1x80 Converting Decimal Integer to Hexadecimal Number base of new Reminder (Quotient) system 25 ÷16 9 LSB 1 ÷16 1 MSB 0 End when last result =0 (25)10 = (19)16 (19)16 = 1x161 + 9x160 Converting Decimal Fraction to Binary, Octal, Hexadecimal A decimal fraction is converted to any other base, by using the multiplication operation by the base. Example: Convert (0.2345)10 to binary, octal and hexadecimal Converting Decimal Fraction to Binary Number base of Integer (Fraction) new system Result 0.2345 *2 0 MSB 0.4690 *2 0 0.9380 *2 1 0.8760 *2 1 0.7520 *2 1 0.5040 *2 1 LSB 0.0080 (0.2345)10 = (0.001111)2 Converting Decimal Fraction to Octal Number base of Integer (Fraction) new system Result 0.2345 *8 1 MSB 0.876 *8 7 0.008 *8 0 0.064 *8 0 0.512 *8 4 0.096 *8 0 LSB 0.768 (0.2345)10 = (0.17004)8 Converting Decimal Fraction to Hexadecimal Number base of Integer (Fraction) new system Result 0.2345 *16 3 MSB 0.752 *16 C 0.032 *16 0 0.512 *16 8 0.192 *16 3 0.072 *16 1 0.152 *16 2 LSB 0.432 (0.2345)10 = (0.3C08312)16 Converting Decimal to Binary, Octal, Hexadecimal Example: convert 234.625 to binary , octal ,hexadecimal 234.625 = (11101010.101)2 234.625 = (352.5)8 234.625 = (EA.A)16 Converting Binary to Octal and Hexadecimal Convert the binary number 1110101100110 to Hexadecimal convert to (1110101100110)2 decimal (1110101100110)2 = 212 +211 +210 +28 +26 +25 +22 +21 = 7526 Number base of Reminder convert 7526 to hexadecimal (Quotient) new system 7526 ÷16 6 470 ÷16 6 7526 = (1D66)16 29 ÷16 13 (1110101100110)2= (1D66)16 1 ÷16 1 0 Converting Binary to Octal and Hexadecimal A binary number can be converted into octal or hexadecimal number using a shortcut method. o An octal digit can be represented as a combination of 3 bits, since 23 = 8. o A hexadecimal digit can be represented as a combination of 4 bits, since 24 = 16. Example: Convert the binary number 1110101100110 to hexadecimal and octal Note: The conversion of a number from octal and hexadecimal to binary uses the inverse of the steps defined for the conversion of binary to octal and hexadecimal. Converting Binary to Hexadecimal Example: Convert the binary number 1110101100110 to hexadecimal (1110101100110)2 = 1 - 1101 - 0110 - 0110 =1- D - 6 -6 = (1D66)16 Converting Binary to Octal Example: Convert the binary number 1110101100110 to octal. (1110101100110)2 = 1 - 110 - 101 - 100 - 110 =1 - 6 -5 -4 -6 = (16546)8 Converting Binary to Octal and Hexadecimal Example: Convert the following binary number 1111010010.01001 to Hexadecimal and octal (1111010010.01001)2 = 11 - 1101 - 0010. - 0100 -1000 = 3 - D - 2. - 4 - 8 = (3D2.48)16 (1111010010.01001)2 = 1 - 111 - 010 - 010. - 010 - 010 = 1 - 7 - 2 - 2. - 2 - 2 = (1722.22)8 Converting Hexadecimal and Octal to Binary Example: Convert to binary (1FA.4C)16 = 1 - F - A. - 4 - c = 0001 - 1111 - 1010. - 0100 - 1100 = (000111111010.01001100)2 (456.41)8 = 4 - 5 - 6. - 4 - 1 = 100 - 101 - 110 - 100 - 001 = (100101110.100001)2 Introduction to Computer Systems Module 4: Data Representation Dr Islam Alkabbany Outlines Recognize the number systems. Learn the conversion from a number system to another one. Understand binary arithmetic. Floating point binary data representation. Text data representation. Binary Arithmetic - Addition Two bits sum Carry 0+0 0 0 (No carry) 0+1 1 0 (No carry) 1+0 1 0 (No carry) 1+1 0 1 (carry) Three bits sum Carry 0+0+0 0 0 (No carry) 0+0+1 1 0 (No carry) 0+1+0 1 0 (No carry) 0+1+1 0 1 1+0+0 1 0 (No carry) 1+0+1 0 1 1+1+0 0 1 1+1+1 1 1 Binary Arithmetic (Subtraction) Two bits Difference Borrow 0-0 0 No borrow 0-1 1 1 1-0 1 No borrow 1-1 0 No borrow Signed and Unsigned Numbers The sign of a binary number has to be represented using 0 and 1, in the computer. In signed binary numbers, the sign bit is usually 0 for a positive number and 1 for a negative number. The left most bit, also called the Most Significant Bit (MSB) is the sign bit. Signed Numbers Sign Magnitude r-1’s complement r’s complement Complement of Numbers Complements are used in computer for the simplification of the subtraction operation. For any number in base r, there exist two complements: r’s complement r-1’s complement. The rule to find the complement of any number N in base r having n digits is: (r − 1)’s complement — (rn − 1) − N (r)’s complement — (rn − 1) − N + 1 = (rn − N) Complement of Decimal numbers 9’s Complement of decimal is number that must be added to it to produce 9’s. it is computed by subtracting each digit from 9 6359 9’s Complement 3640 9’s= 3640 10’s Complement of decimal is number that must be added to it to produce 1 and 0’s.. it is computed by adding 1 to the 9’s complement of the number 10’s Complement 6359 3641 10’s= 3641 Complement of binary numbers 1’s Complement of decimal is number that must be added to it to produce 1’s. It is computed by changing the bits 1 to 0 and the bits 0 to 1 1’s Complement 10011010 01100101 1’s= 01100101 2’s Complement of decimal is number that must be added to it to produce 1 and 0’s. it is computed by adding 1 to the 1’s complement of the binary number. 2’s Complement 10011010 01100110 2’s= 01100110 Signed Numbers Represent +18 and -18 in Sign Magnitude,r-1’s complement, r’s complement? +18 same representation on all systems 0 for sign 10010 for amplitude (010010)2 Subtracting unsigned numbers M-N = M + [N]r’s = M + rn -N = rn + M-N If M >= N ,the sum will produce rn carry out. Result is positive neglect the carry to get the result. If M 0111110 62 Z 1111010 122 HT(Tab) 0001001 9 Introduction to Computer Systems Module 5: Algorithm Development Dr Islam Alkabbany Objectives Recognize the program development life cycle. Select appropriate computer-based methods for Modeling and analyzing problems. Differentiate between algorithm, pseudo code, and flowchart. Software development life cycle Software development life cycle 1- Planning (Problem Definition) In this phase, we define the problem statement and we decide the boundaries of the problem. In this phase we need to understand the problem statement, what is our requirement, what should be the output of the problem solution. These are defined in this first phase of the program development life cycle. Software development life cycle 2- Problem Analysis Precisely define the problem to be solved, and write program specifications – descriptions of the program’s inputs, processing, outputs, and user interface. Software development life cycle 3- Design Develop a detailed logic plan using a tool such as pseudo-code, flowcharts, object structure diagrams, or event diagrams to group the program’s activities into modules; devise a method of solution or algorithm for each module and test the solution algorithms. Software development life cycle 4- Implementation Translate the design into an application using a programming language or application development tool by creating the user interface and writing code; include internal documentation – comments and remarks within the code that explain the purpose of code statements. Software development life cycle 5- Testing and Integration Test the program, finding and correcting errors (debugging) until it is error-free and contains enough safeguards to ensure the desired results. Software development life cycle 6- Maintenance Provide education and support to end- users; correct any unanticipated errors that emerge and identify user-requested modifications (enhancements). Once errors or enhancements are identified, the program development life cycle begins again at Step 1. Software development life cycle Retirement The unofficial eighth step of the SDLC is retirement. No software lives forever. As it ages, stakeholders will find problems that need to be corrected, usually in a new version of the code. Or, they will decide to create an entirely new replacement application. Software development life cycle Documentation The document is to put together all of the materials that have been generated throughout the PDLC process. All of the flowcharts, messages, algorithms, lines of code, and the user manuals are part of this documentation. Internal documentation: is used by other programmers to help them know why you did something a certain way or tell them how you wrote a program. External documentation: includes user manuals and anything that is not the actual code or is part of the listing. This should also include materials that are placed on a website such as FAQs (frequently asked questions) and help areas. Algorithm Algorithm is an ordered sequence of finite, well defined, unambiguous instructions for completing a task. The term Algorithm derives from the name of Muhammad ibn Musa al’Khwarizmi Algorithm (Example) Problem: Find the area of a circle of radius r. Inputs to the algorithm Radius r of the circle. Expected output: Area of the circle Algorithm (Example) Algorithm: Step1: Read/input the Radius r of the circle Step2: Compute Area = 3.14*r*r Step3: Print Area Algorithm (Example) Algorithm to find the greatest among three numbers ALGORITHM 1. Step 1: Read the three numbers A, B, C. Step 2: Compare A and B. If A is greater perform step 3 else perform step 4. Step 3: Compare A and C. If A is greater, output “A is greatest” else output “C is greatest”. Step 4: Compare B and C. If B is greater, output “B is greatest” else output “C is greatest”. Algorithm (Example) Algorithm to find the greatest among three numbers ALGORITHM 2. Step 1: Read the three numbers A, B, C. Step 2: Compare A and B. If A is greater, store A in MAX, else store B in MAX. Step 3: Compare MAX and C. If MAX is greater, output “MAX is greatest” else output “C is greatest”. Algorithm ( Control structure) Sequential instructions are executed in linear order Step1: Read/input the Radius r of the circle Step2: Compute Area = 3.14*r*r Step3: Print Area Algorithm ( Control structure) Selection (branch or conditional): it asks a true/false question and then selects the next instruction based on the answer instructions are executed in linear order Step 1: Read the three numbers A, B, C. Step 2: Compare A and B. If A is greater perform step 3 else perform step 4. Step 3: Compare A and C. If A is greater, output “A is greatest” else output “C is greatest”. Step 4: Compare B and C. If B is greater, output “B is greatest” else output “C is greatest”. Algorithm ( Control structure) Iterative (loop) it repeats the execution of a block of instructions Step1: Read/input the Radius r of the circle Step2: Compute Area = 3.14*r*r Step3: Print Area Step4: Goto step 1 Flowchart is a diagrammatic representation of the logic for solving a task / diagrammatic representation of the Algorithm. Flowchart (Control Structures) Flowchart (Example) 1. Flowchart of a program that computes product of any two numbers Flowchart (Example) 2. Flowchart of a program that computes three numbers and finds the maximum Flowchart (Example) 3. Flowchart of a program that finds the sum of first 100 integers Pseudo Code Pseudo code consists of short, readable and formally-styled English language used for explaining an algorithm. In a pseudo code, some terms are commonly used to represent the various actions. For example: – for inputting data the terms may be (INPUT, GET, READ) – for outputting data (OUTPUT, PRINT, DISPLAY) – for calculations (COMPUTE, CALCULATE) – for incrementing (INCREMENT), initialization (INITIALIZE) Pseudo Code (Control Structures) Pseudo Code Pseudo Code

Use Quizgecko on...
Browser
Browser