Computer and Programming Principles 2024/2025 PDF
Document Details
Uploaded by LyricalGorgon
Palestine Polytechnic University
2024
Palestine Polytechnic University
Eng. Yousef A. SalahEng. Mohammad Jabari
Tags
Summary
This document is chapter one of a computer and programming principles textbook for 2024/2025 at Palestine Polytechnic University. It introduces key concepts of computing and information technology, as well as the fundamental functions of computer systems and their impact on daily life. It also outlines intended learning outcomes and further reading.
Full Transcript
PALESTINE POLYTECHNIC UNIVERSITY COMPUTER AND PROGRAMMING PRINCIPLES 2024/2025 ENG. YOUSEF A. SALAH 2025 Page 2 of 177 PALESTINE POLYTECHNIC...
PALESTINE POLYTECHNIC UNIVERSITY COMPUTER AND PROGRAMMING PRINCIPLES 2024/2025 ENG. YOUSEF A. SALAH 2025 Page 2 of 177 PALESTINE POLYTECHNIC UNIVERSITY COMPUTER AND PROGRAMMING PRINCIPLES 2024/2025 ENG. YOUSEF A. SALAH CHAPTER ONE INTRODUCTION TO COMPUTERS PREFACE: This chapter highlights key concepts and terminologies related to computing and information technology. It explores the fundamental functions of computer systems and their significant impact on our daily lives. Additionally, we will examine the various types of computing machines used worldwide, distinguishing between them based on different criteria. INTENDED LEARNING OUTCOMES: 1) Teach the fundamentals of computers and computer terminologies, particularly with respect to personal computer hardware and software. 2) Give students an in-depth understanding of how computers are essential in our daily practices. 3) Recognize the main functions of computing, and gain the awareness of trendy computing sciences. 4) Present the foremost types of computer machines, and give students enough knowledge about the traits of each one. FURTHER READING: 1) Discovering Computers ©2018: Digital Technology, Data, and Devices. 2) Computing Essentials 2017-McGraw-Hill (2017) Daniel O’Leary, Linda I. O’Leary, Timothy J O’Leary. Page 3 of 177 PALESTINE POLYTECHNIC UNIVERSITY COMPUTER AND PROGRAMMING PRINCIPLES 2024/2025 ENG. YOUSEF A. SALAH WHAT IS A COMPUTER? - A Computer is a digital machine that operates under a set of instructions and rules, so that it will be capable of inputting data, performing processing, producing results, and probably storing results for future use. - The computer can be viewed from two perspectives: Hardware: the physical parts of the computer, which consist of electrical, electronic and mechanical parts that compose the computer machine. Software: data and instructions at which when executed will operate and manage the computer hardware. ROLE OF COMPUTERS IN OUR LIFE: Computers are nowadays playing a vital role in every activity in our life. For instance, you may use computers and their applications in: 1) Education and Scientific Research 2) Business, Shopping and Marketing Fields 3) Healthcare sector 4) Banking and Financial contracts 5) Industries 6) Government offices 7) Entertainment 8) Home and Building Management Systems 9) Weather Forecasting 10) Social Communication Page 4 of 177 PALESTINE POLYTECHNIC UNIVERSITY COMPUTER AND PROGRAMMING PRINCIPLES 2024/2025 ENG. YOUSEF A. SALAH Activity: Have you ever created a professional profile on LinkedIn Network! It is the time now to do so and to expose yourself to the world of professional networking on the Internet. Visit: https://www.linkedin.com and start creating your existence there. DATA, INFORMATION, AND KNOWLEDGE: - A computer processes data to produce information: Data Information Processing Data are raw facts and items that don’t convey any meaning. o Data may be: numbers, characters, symbols, texts, sounds, images,…. o Examples: 20, “Ahmad”, ‘A’, 986.35 …. Information: processed data that arranged in a way that looks useful and conveys meaning in an understandable way. 20 20 is an EVEN number Processing - A level that comes after information called “Knowledge”. Knowledge is the understanding of information about a subject that you get by experience, study, perceiving, discovering, or learning. Page 5 of 177 PALESTINE POLYTECHNIC UNIVERSITY COMPUTER AND PROGRAMMING PRINCIPLES 2024/2025 ENG. YOUSEF A. SALAH - Nowadays, computers make many decisions without human intervention. That is, they receive data as input and they process it in a manner that produces decisions and actions as output. This leads to the foremost field in computing which is called “Artificial Intelligence”. - Artificial Intelligence (AI) is to have intelligent machines that mimic human’s minds, based on the perception of its environment, and based on a set of rules that enable the machine to take decision properly, while it learns by experience. BASIC COMPUTING TERMINOLOGIES - Computer Science (CS): CS involves the study of computers and how they work, including how to create software, solve problems using algorithms, and manage data. It involves programming, understanding how hardware and software interact, and learning to think logically to develop efficient solutions for real-world tasks. - Information Technology (IT): IT is the use of computers and software to manage, store, and share information. It focuses on making sure technology systems work well, including hardware, networks, and data security, to help businesses and organizations run efficiently. - ICT is an acronym for “Information and Communication Technology” which revolves around the use of technology to communicate and share information. It includes tools like computers, the internet, mobile phones, and other devices that help people connect, exchange messages, and access information. Activity: Visit: https://www.wikipedia.org and start searching for more details of the aforementioned definitions. Page 6 of 177 PALESTINE POLYTECHNIC UNIVERSITY COMPUTER AND PROGRAMMING PRINCIPLES 2024/2025 ENG. YOUSEF A. SALAH COMPUTER TYPES: Computers may be classified into: Personal Computers (PC) Smart Devices (Mobile Devices) Servers Mainframes Supercomputers Embedded Computers - Before delving into the details of each type, we ought to ensure that any system capable of inputting data, processing or manipulating it, generates results, and storing these results is a Computing Machine. - We’ll classify computers based on different factors like: Uses of the computer Size Number of users at the same time Operating System (OS): The software responsible for the operation and management of the computer. Price Performance Page 7 of 177 PALESTINE POLYTECHNIC UNIVERSITY COMPUTER AND PROGRAMMING PRINCIPLES 2024/2025 ENG. YOUSEF A. SALAH 1 Personal Computers (PC) A Personal Computer is a small computer designed to be used by one person at a time. A PC is available in variety of shapes and sizes like: Desktop Computers: designed to fit on your desk. Portable Computers: comes with built-in screen, keyboard, and battery. They are movable computers from place to place. Laptops are considered personal computers. Suitable for every day computing, browsing the Internet, creating documents, playing games, sending emails and the like. Cheap price and suitable performance. 2 Smart Devices, Mobiles and Tablets These devices are a major part of everyday life, combining computing power with portability and connectivity. Smart devices are gadgets that connect to the internet, interact with other devices, and often operate autonomously to perform tasks. Examples of Smart Devices: Smartphones: Mobile phones with advanced capabilities like internet access, apps, and sensors. Page 8 of 177 PALESTINE POLYTECHNIC UNIVERSITY COMPUTER AND PROGRAMMING PRINCIPLES 2024/2025 ENG. YOUSEF A. SALAH Smartwatches: Wearable devices like Apple Watch or Fitbit that track health, show notifications, and more. Smart Home Devices: Devices like smart speakers (Amazon Echo), thermostats (Nest), or lights that can be controlled via voice commands or apps. Smart TVs: Televisions that can stream content, run apps, and connect to other devices without additional hardware. Prices range from very cheap to expensive, depending on model, with special Operating Systems. Mobile devices include mobile phones, smartphones (mobile phones that access the Internet and run apps), and small tablet devices (such as iPads and Android tablets). 3 Servers A Server is a powerful computer used to host programs and data for a network. It provides services for other computers called clients. Usually have more processing power than Personal Computers. These computers run 24/7. Examples: Email Servers, Web Servers, Game Servers, File Servers, and application servers. Page 9 of 177 PALESTINE POLYTECHNIC UNIVERSITY COMPUTER AND PROGRAMMING PRINCIPLES 2024/2025 ENG. YOUSEF A. SALAH 4 Mainframes Mainframe computers are very powerful and large computers used mainly by big organizations. They handle huge amounts of data and perform many tasks at once, such as running complex applications and managing large databases. Mainframe computers are capable of great processing speeds and data storage. Large size, like the size of a closet. More expensive than servers. Used by Banks, Hospitals, Universities, and research centers that need to manage large amounts of centralized data. Can handle hundreds to thousands of users at the same time. 5 Supercomputers A Supercomputer is the fastest, most powerful computer, and the most expensive. Very large size (size of a room). Supercomputers are typically used to process massive amounts of data. For example, large-scale simulations and applications in medicine, aerospace, automotive design, online banking, weather forecasting, nuclear energy research, and petroleum exploration. Page 10 of 177 PALESTINE POLYTECHNIC UNIVERSITY COMPUTER AND PROGRAMMING PRINCIPLES 2024/2025 ENG. YOUSEF A. SALAH 6 Embedded Computers An embedded computer is a special-purpose computer that functions as a component in a larger machine or device. Found today in most electronic devices like Cars, air planes, home appliances (dishwashers, microwave ovens and refrigerators), Game Consoles (Wii, PlayStation), Printers, Digital Cameras, televisions, and more. Designed and programmed to operate and perform specific tasks in real time. Activity: What is IoT? Is there any relevance between IoT and embedded computer? What is IoT? The Internet of Things (IoT) is a network of physical devices embedded with sensors, software, and internet connectivity, enabling them to collect, exchange, and act on data without human intervention. Examples include smart home devices, wearable tech, and industrial sensors. Relation Between IoT and Embedded Computers Embedded computers are the foundation of IoT devices, acting as the “brains” for data processing and control. These small, dedicated systems enable IoT devices to sense, compute, and communicate. Together, they drive automation and smart technologies like smart appliances and healthcare devices. Activity: In one sheet, and based on what discussed in the class, differentiate between the 6 general types of computers. Page 11 of 177 PALESTINE POLYTECHNIC UNIVERSITY COMPUTER AND PROGRAMMING PRINCIPLES 2024/2025 ENG. YOUSEF A. SALAH CHAPTER QUESTIONS: Q1) State whether each of the following statements is TRUE or FALSE. TRUE / Statement FALSE Computers process information to create data. Hardware consists of a series of instructions that tells the computer what actions to perform and how to perform them. Because embedded computers are components in larger products, they usually are small-sized devices and have limited hardware. Data conveys meaning to users, and information is a collection of unprocessed items, which can include text, numbers, images, audio, and video. Embedded computers generally are special purpose computers. Q2) Choose the best answer: 1 LinkedIn is a: A. Type of Computer B. A Software C. A Server D. Professional Network 2 _____ is/are the steps that tell the computer how A. Data B. Information to perform a particular task. C. Instructions D. Documentation 3 Although not as powerful as a supercomputer, this A. Laptop type of computer is capable of great processing B. Mainframe speeds and data storage. C. Supercomputer D. Desktop Computer 4 The circuitry of the computer is part of: A. Software B. Hardware C. Data D. Firmware 5 A game console is a type of: A. Embedded Computer B. Server C. Mobile Device D. Mainframe Page 12 of 177 PALESTINE POLYTECHNIC UNIVERSITY COMPUTER AND PROGRAMMING PRINCIPLES 2024/2025 ENG. YOUSEF A. SALAH Page 13 of 177 PALESTINE POLYTECHNIC UNIVERSITY COMPUTER AND PROGRAMMING PRINCIPLES 2024/2025 ENG. YOUSEF A. SALAH CHAPTER TWO COMPUTER HARDWARE PREFACE: This chapter provides a broad overview of the primary physical components of a computer system. It also introduces students to different types and characteristics of computer processors, memory, storage devices, and input/output devices. INTENDED LEARNING OUTCOMES: After completing this chapter students will be able to: 1) Introduce students to the basic hardware parts of the computing machine. 2) Illustrate the main components the computer processor made of and their functionalities. 3) Differentiate between main types of computer memory and storage media. 4) Study the metrics used in identifying memory capacity. 5) Present miscellaneous input and output devices. FURTHER READING: 3) Discovering Computers ©2018: Digital Technology, Data, and Devices. 4) Computing Essentials 2017-McGraw-Hill (2017) Daniel O’Leary, Linda I. O’Leary, Timothy J O’Leary. Page 14 of 177 PALESTINE POLYTECHNIC UNIVERSITY COMPUTER AND PROGRAMMING PRINCIPLES 2024/2025 ENG. YOUSEF A. SALAH INTRODUCTION TO COMPUTER HARDWARE - As discussed in Chapter One, computer hardware is the physical and tangible parts of the computer, which include all electronic, electrical and mechanical items inside the computer machine. - The Central Processing Unit (CPU) is the “brain” of a computer system, containing digital logic circuitry able to interpret and execute instructions. - Main Memory is where currently executing programs reside, which the CPU can directly and very quickly access. Main memory is volatile; that is, the contents are lost when the power is turned off. - Secondary Memory is nonvolatile, and therefore provides long-term storage of programs and data. This kind of storage, for example, can be magnetic (hard drive), optical (CD or DVD), or nonvolatile flash memory (such as in a USB drive). - Input/Output Devices (or Peripherals) include anything that allows for input (such as the mouse and keyboard) or output (such as a monitor or printer). - Buses transfer data between components within a computer system, such as between the CPU and main memory. - The figure below shows the main hardware components of a computer system: Page 15 of 177 PALESTINE POLYTECHNIC UNIVERSITY COMPUTER AND PROGRAMMING PRINCIPLES 2024/2025 ENG. YOUSEF A. SALAH - Every computing machine mainly the following basic hardware components: Processing Components Memory Units Storage Components Input/Output Devices Processing Components: Within the processing components, data is processed and information is generated that will be displayed on the output components. Processing Units - The main component is the CPU (Central Processing Unit) or Processor. - The processor contains the following main subparts: o Arithmetic and Logic Unit (ALU) Performs Arithmetic and logical operations, like Addition, Subtraction, Comparing, And, OR, etc … o Control Unit (CU) Controls all operations on CPU, and communicates with both the ALU and memory. o Registers Registers are used by the CPU to store data and intermediary results temporarily during processing. Page 16 of 177 PALESTINE POLYTECHNIC UNIVERSITY COMPUTER AND PROGRAMMING PRINCIPLES 2024/2025 ENG. YOUSEF A. SALAH - The CPU and other important computer components fit onto the Motherboard, as shown in the figure on the side. - A Motherboard is an electronic circuit board which holds and interconnects the hardware together, mainly the CPU and Memory. It also provides connectors for other peripherals. - The Motherboard in a desktop computer is housed in a case (or chassis, or system unit) which collects main hardware components in one place. - The computer case collects in addition to motherboard: o Hard Drives o Optical Drives o Coolers and Fans Dissipate the overheat generated by the electronic components, while keeping them operating at acceptable temperature level. Page 17 of 177 PALESTINE POLYTECHNIC UNIVERSITY COMPUTER AND PROGRAMMING PRINCIPLES 2024/2025 ENG. YOUSEF A. SALAH o Power Supply: Feeds computer hardware with electricity. It also converts Alternative Current (AC) (around 220 Volts) from standard wall outlet to Direct Current (DC) (ranging from 5 to 12 Volts) which is the suitable level of current that computer hardware operates properly. Activity: Had you ever heard about UPS? What is it, and for what it is supposed to be used? - The motherboard contains the System Clock, which is a small quartz crystal circuit to control and synchronize the timing of all computer operations. - Though, computer processing speed is identified by the frequency of this crystal (in Hertz). - The higher the CPU clock means that more instructions can be processed per second. Page 18 of 177 PALESTINE POLYTECHNIC UNIVERSITY COMPUTER AND PROGRAMMING PRINCIPLES 2024/2025 ENG. YOUSEF A. SALAH Activity: - What’s meant by a 2.4 GHz computer processor speed? How the clock speed influences a computer’s performance? - What is a multi-core processor? - Expansion Slots: o Expansion slots are locations (or sockets) on the motherboard into which expansion cards (also called adapter cards) can be inserted to connect those cards to the motherboard. o An adapter card is a circuit board that gives computers additional capabilities, and expand the computer's functionality, like a video card, network card, or sound card. o An adapter card also provides extra connections to peripheral devices. Page 19 of 177 PALESTINE POLYTECHNIC UNIVERSITY COMPUTER AND PROGRAMMING PRINCIPLES 2024/2025 ENG. YOUSEF A. SALAH - Computer Ports: The motherboard also contains the Ports that are used to connect the computer to external devices (peripherals). - PS/2 port - Used to connect a mouse and a keyboard. - USB Port (universal serial bus) - Designed to be universally compatible with a wide variety of devices. - Parallel port - Used to connect an external device, such as a printer. - Serial port - Remote control of equipment, such as routers, switches and mouse. - HDMI port - Used to connect the video monitor or multimedia projector. - Game Port - Used to connect joysticks. - Audio input and output - Used to connect speakers and microphones. - Video Port - Used to connect a video monitor or multimedia projector. Activity: What is Type-C USB port? How it differs from its predecessor USB port? Page 20 of 177 PALESTINE POLYTECHNIC UNIVERSITY COMPUTER AND PROGRAMMING PRINCIPLES 2024/2025 ENG. YOUSEF A. SALAH MEMORY VS. STORAGE - Memory refers to locations, usually inside the system unit (typically random access memory or RAM) that a computer uses to store data on a temporary basis. Typically, Memory refers to chip-based storage. Memory usually consists of one or more chips on the motherboard or some other circuit board in the computer. - Storage refers to the more permanent storage a computer uses usually in the form of the computer’s internal hard drive or removable storage media (such as DVDs and flash memory storage systems), but it can also be in the form of chip-based internal storage—especially in mobile devices. MEMORY CAPACITY - A Byte is the basic storage unit in memory. - When running an application, data and instructions are loaded from storage devices into memory. - Instructions and data exist as bytes in memory. A computer is a digital device where the internal physical and electronic construction (mainly the transistor which is used as an ON/OFF switch) leads to handle data and instructions as patterns of ZEROs and ONEs. The figure below shows a sample digital signal inside a computer. Page 21 of 177 PALESTINE POLYTECHNIC UNIVERSITY COMPUTER AND PROGRAMMING PRINCIPLES 2024/2025 ENG. YOUSEF A. SALAH Integrated circuits (“chips”) (IC), are the building blocks of computer hardware, are comprised of millions or even billions of transistors. The 0’s and 1’s are typically called bits (Binary Digit). A Byte is a group of bits operated on as a single unit in a computer system, which consists of eight bits. The following table shows the measurements of memory sizes (capacity): 1 bit 0 or 1 1 Byte = 8 bits = 23 bits 1 KiloByte (KB) = 1024 Bytes = 210 Bytes = 210 * 23 bits = 213 bits 1 MegaByte (MB) = 1024 KB = 210 KB = 210 * 210 Bytes = 210 * 210 * 23 bits = 223 bits 1 GigaByte (GB) = 1024 MB = 210 MB = 210 * 210 KB = 210 * 210 * 210 Bytes = 233 bits 1 TeraByte (TB) = 1024 GB = 210 GB 1 PetaByte (PB) = 1024 TB = 210 TB Page 22 of 177 PALESTINE POLYTECHNIC UNIVERSITY COMPUTER AND PROGRAMMING PRINCIPLES 2024/2025 ENG. YOUSEF A. SALAH Activity: A memory chip has a 32 KB capacity, answer the followings: a) How many bits can be stored in this memory? b) What is the capacity of this memory in GB? VOLATILE VS. NON-VOLATILE MEMORY - Volatile Memory: Loses its contents when the power is turned off. - Non-Volatile Memory: Keeps its contents when the power is turned off. TYPES OF MEMORY Registers (Volatile memory inside the processor) RAM (Random Access Memory): RAM is part of the main memory. It is Volatile. Used to store the essential parts of the operating system while the computer is running, as well as the programs and data that the computer is currently using. Page 23 of 177 PALESTINE POLYTECHNIC UNIVERSITY COMPUTER AND PROGRAMMING PRINCIPLES 2024/2025 ENG. YOUSEF A. SALAH Activity: - What is the RAM size of your computer? - Can you increase the RAM size in your mobile device? - How RAM size affects the computer performance? - Why when we open a program for the first time it takes longer time to start than the second time? ROM (Read-Only Memory): Non-Volatile memory chips attached to the motherboard. Contents of ROM cannot be changed or updated. Mainly, ROM was used to store data and programs responsible for starting up the computer. Activity: What are the main differences between RAM and ROM in terms of capacity, volatility, and uses? Page 24 of 177 PALESTINE POLYTECHNIC UNIVERSITY COMPUTER AND PROGRAMMING PRINCIPLES 2024/2025 ENG. YOUSEF A. SALAH Flash Memory: Non-Volatile memory chips. Replaced the ROM chips when storing system information required during the booting (starting up). Unlike ROM, the contents of Flash Memory may be updated and changed. Flash memory chips are also built into many types of devices (such as tablets, handheld gaming devices, and smartphones), as well as built into storage media and devices (such as flash memory cards and USB flash drives). Activity: What is meant by the term POST (power on self-test), and what is meant by this term? Cache Memory: Volatile memory chips. Cache memory is used to speed up processing by storing the data and instructions that may be needed next by the CPU in handy locations. Very fast memory Very expensive Small capacity (few MBytes) Usually comes as part of the CPU Activity: As the Cache memory is faster than the RAM, why do not we replace the RAM with Cache? Page 25 of 177 PALESTINE POLYTECHNIC UNIVERSITY COMPUTER AND PROGRAMMING PRINCIPLES 2024/2025 ENG. YOUSEF A. SALAH TYPES OF STORAGE - Storage may also be known as Secondary Storage, or Auxiliary Storage. - A Storage Device is usually used to store data and programs permanently (Non- Volatile). - We need storage devices for information to be recorded. A computer has devices that store information so that it is not deleted when the computer is turned off. - Data stored on a storage device using any of the following techniques: o Magnetically o Optically o Flash memory - We’ll study The following storage technologies: o Hard Disk Drive o Solid State Disk o Optical Disk o Magnetic Tape o Cloud Storage Page 26 of 177 PALESTINE POLYTECHNIC UNIVERSITY COMPUTER AND PROGRAMMING PRINCIPLES 2024/2025 ENG. YOUSEF A. SALAH Hard Disk Drive (HDD) Uses magnetic field to store data. Electro-mechanical device. Data is organized as tracks and sectors. Huge capacity, ranging from GigaBytes to few TeraBytes. Not expensive. Relatively Slow. Solid State Disk (SSD) Uses flash memory technology to store data. New Technology which replaced HDD in some new computers. Big capacity (100 GB – 16 TB). Fast; faster than Hard Disk. Relatively expensive. SD memory card and USB flash drive also use flash technology to store data. Optical Disk Slow. Not expensive. Capacity range from 700 MB – 100 GB Use Laser Beam to write/read data from disk, this includes CD, DVD, and Blu-ray disks. Page 27 of 177 PALESTINE POLYTECHNIC UNIVERSITY COMPUTER AND PROGRAMMING PRINCIPLES 2024/2025 ENG. YOUSEF A. SALAH Types of Optical Drives: – CD (Compact Disk) Size (up to 700 MB) Cheap All computers with CD drive can read it – DVD (Digital Versatile Video) Size (1.8 GB – 8.5 GB) Originally used to store movies Only optical drives with DVD label can read it – Blu-ray Capacity (25GB – 100GB) Developed by Sony Requires special Blue-ray drive to read Used to store 3D Movies and Big Video games Activity: What is meant by each of the followings? - Optical Drive - Optical Disk Magnetic Tape – Very slow (Sequential Access) – Cheap – Good capacity (10 GBytes – 100 GBytes) – Usually used for long-term data archiving and back-up. Page 28 of 177 PALESTINE POLYTECHNIC UNIVERSITY COMPUTER AND PROGRAMMING PRINCIPLES 2024/2025 ENG. YOUSEF A. SALAH Activity: Why do you think Magnetic Tapes are suitable for back-up storage? Cloud Storage – Cloud storage is a service that allows you to save and access your files over the internet, rather than storing them on your local device or physical storage. – Examples: Dropbox, Google Drive, iCloud, and Microsoft OneDrive. – Instead of storing data locally, store it off-site on the Internet (Hosted by servers). – Advantages include: Cost, Accessibility, sharing, security. – Disadvantages include: privacy, requires Internet connection. Discussion: How the use of Cloud Storage would make your data more accessible? Using the Cloud for storage raises some privacy concerns, explain? Page 29 of 177 PALESTINE POLYTECHNIC UNIVERSITY COMPUTER AND PROGRAMMING PRINCIPLES 2024/2025 ENG. YOUSEF A. SALAH MEMORY HIERARCHY Why do we need all these types of memory/storage devices? Because we need to balance between these three factors: – Cost – Speed – Capacity COMPUTER PERFORMANCE Depends on many factors: – CPU Speed (clock rate). – Number of CPU Cores. – Cache and RAM sizes. – Secondary Storage speed; HDD or SSD. Page 30 of 177 PALESTINE POLYTECHNIC UNIVERSITY COMPUTER AND PROGRAMMING PRINCIPLES 2024/2025 ENG. YOUSEF A. SALAH - Input Components: Used to enter data and commands into a computer like Keyboard, Scanner, Microphone, Mouse, Webcam, Touch Screen, … - Keyboard: A device that has a series of buttons with letters, numbers and symbols, used to enter data. - Webcam: Video camera that captures either still pictures or motion video, and can transmit its video on the Internet in real-time. These days, it’s commonly used for videoconferencing. - Mouse: A pointing device that controls the cursor around the monitor. Page 31 of 177 PALESTINE POLYTECHNIC UNIVERSITY COMPUTER AND PROGRAMMING PRINCIPLES 2024/2025 ENG. YOUSEF A. SALAH - Microphone: Captures audio and human voice. - Magnetic strip reader - Barcode reader - Game Controllers: designed for gaming, including gamepads, joysticks, and steering wheels. - Scanner: Scans images, photos and text. Page 32 of 177 PALESTINE POLYTECHNIC UNIVERSITY COMPUTER AND PROGRAMMING PRINCIPLES 2024/2025 ENG. YOUSEF A. SALAH - Output Components: Responsible for providing the user with information from computer output (images, graphics, sounds, audio, videos, text and others … ) like Screen, Printer, Speaker, Projector, … - Monitor: Displays system information visually. - Printer: Prints text, graphics and images on a paper. - Speaker: Propagates the sound and improves sound reproduction. MONITORS - A Monitor (or Screen, or Display device) is an output device that produces visual information to the user. The displayed information called soft copy information. - Display Technologies: o CRT (Cathode-Ray Tube) o LCD (Liquid Crystal Display) o LED (Light-Emitting Diode) Page 33 of 177 PALESTINE POLYTECHNIC UNIVERSITY COMPUTER AND PROGRAMMING PRINCIPLES 2024/2025 ENG. YOUSEF A. SALAH - The basic element of an image being displayed is called a Pixel (short for Picture Element). Display Features: Resolution - Resolution is the number of horizontal and vertical pixels in a display (rows × columns). For example, a monitor or screen that has a 1600×900 resolution displays up to 1600 pixels per horizontal row and 900 pixels per vertical row, for a total of 1,440,000 pixels to create a screen image. - The higher a monitor’s resolution (the more pixels), the clearer the image produced. - PPI stands for Pixels per Inch and is a metric typically used to describe the pixel density (sharpness) for all sorts of displays, including cameras, computers, mobile devices, etc… Page 34 of 177 PALESTINE POLYTECHNIC UNIVERSITY COMPUTER AND PROGRAMMING PRINCIPLES 2024/2025 ENG. YOUSEF A. SALAH Dot (Pixel) Pitch - Dot pitch is the distance in millimeters between pixels on a display. Text created with a smaller dot pitch is easier to read. - The lower the number, the sharper the image. Size - The display size is measured by the diagonal length of a monitor’s viewing area. - Common sizes are 15", 17", 19", 21", and 24" inches. Aspect Ratio - The aspect ratio defines a display’s width relative to its height. - 2:1 aspect ratio, for example, means the display is twice as wide as it is tall. The aspect ratio for a widescreen monitor is 16:9 or 16:10. - 4:3 means that the ratio of the width of the display screen to the height is 4 to 3. Other display devices: 1) Projectors 2) Interactive Whiteboard 3) HDTV (high-definition Television) Page 35 of 177 PALESTINE POLYTECHNIC UNIVERSITY COMPUTER AND PROGRAMMING PRINCIPLES 2024/2025 ENG. YOUSEF A. SALAH PRINTERS - A printer is an output device that translates information on paper. - Printer output is called hard copy information. Printer Features: Resolution - Resolution: measured by dpi (dot per inch). - The higher the dpi, the better the quality of images produced. - Most printers designed for personal use average 1,200 by 4,800 dpi. Speed - Speed: measured by the number of pages printed per minute (ppm). Color - Black/White. - Colored. Printer Types: Inkjet Printers - Spraying tiny drops of liquid ink onto a piece of paper. - Works with ink cartridges to print text, spreadsheets, photos and graphics. Page 36 of 177 PALESTINE POLYTECHNIC UNIVERSITY COMPUTER AND PROGRAMMING PRINCIPLES 2024/2025 ENG. YOUSEF A. SALAH Laser Printers - High-speed, high-quality printer. - Creates images using a laser beam and powdered ink, called toner. Thermal Printers - Used by ATMs, Cashiers, point-of-sale (POS) to print receipts. - Small and Light-weight. - Use special heat-sensitive paper. Plotters - Plotters are sophisticated printers used to produce high-quality large- scale drawings, such as banners, blueprints, maps, and circuit diagrams. Page 37 of 177 PALESTINE POLYTECHNIC UNIVERSITY COMPUTER AND PROGRAMMING PRINCIPLES 2024/2025 ENG. YOUSEF A. SALAH All-in-One Printers - Also called a multifunction printer. - Integrates printing, copying and scanning functions into one machine. - It may also support fax service. - Some use color ink-jet printer technology, while others use laser technology. Activity: You are kindly requested to refer to the Internet to know more about a trendy printer called: 3D Printer. Activity: - What is a QR code? - Scan the aside QR code by your mobile and see what you will get! Page 38 of 177 PALESTINE POLYTECHNIC UNIVERSITY COMPUTER AND PROGRAMMING PRINCIPLES 2024/2025 ENG. YOUSEF A. SALAH CHAPTER QUESTIONS: Q1) State whether each of the following statements is TRUE or FALSE. TRUE / Statement FALSE The keyboard, mouse, microphone, scanner, digital camera, and PC camera are six commonly used output devices. During processing, the processor places instructions to be executed and data needed by these instructions into memory. Storage differs from memory in that it holds items only temporarily while the processor interprets and executes them. A storage medium is the physical material on which a computer keeps data, instructions, and information. When a computer is started, the operating system loads onto the computer’s hard disk from memory. On a personal computer, the electronic components and most storage devices reside outside the system unit. A hertz is one cycle per second. A CPU with higher clock speed can process fewer instructions per second than a CPU with a lower clock speed. The higher the clock speed, the faster the processor, and the more expensive the computer. Nonvolatile memory loses its contents when power is removed from the computer. The output that produced from printers is called soft copy. Optical drive is the physical medium where data is stored optically. For an image with total of 128 pixels and each pixel is 8 bit, then its final size is 1 KB. All programs that currently executing must be loaded into the ROM. A Solid State Disk (SSD) is faster than Hard Disk Drive (HDD). Page 39 of 177 PALESTINE POLYTECHNIC UNIVERSITY COMPUTER AND PROGRAMMING PRINCIPLES 2024/2025 ENG. YOUSEF A. SALAH Q2) Choose the best answer: 1 Computer hardware includes all of the A. input and output devices B. storage and communications following except __________. devices C. a system unit D. application programs 2 Some computer components, such as A. keyboard and mouse B. monitor and microphone the __________, are internal and reside C. processor and memory inside the system unit. D. printer and scanner 3 The CPU contains __________. A. input devices and output devices B. the control unit and the arithmetic/logic unit C. main memory and storage devices D. all of the above 4 Arithmetic operations __________. A. involve matching one data item to another to determine if the first item is greater than, equal to, or less than the other item B. include addition, subtraction, multiplication, and division C. sort data items according to standard, predefined criteria in ascending order or descending order D. use conditions with operators such as AND, OR, and NOT 5 The data stored on ROM chips A. can be modified and is lost B. can be modified and is not lost __________ when power to the C. cannot be modified and is lost computer is turned off. D. cannot be modified and is not lost Page 40 of 177 PALESTINE POLYTECHNIC UNIVERSITY COMPUTER AND PROGRAMMING PRINCIPLES 2024/2025 ENG. YOUSEF A. SALAH 6 Which of the followings is a permanent A. RAM B. flash memory type? C. Cache D. Registers 7 210 GB is equal to: A. 1 TB. B. 1024 GB. C. 2 20 MB. D. All of the above. 8 The memory used to store data and A. RAM B. ROM programs responsible for starting up C. Flash the computer is: D. CD 9 The part of CPU that is responsible A. ALU B. CU for controlling operations and C. Registers D. Cache communications: 10 One of the following printers uses A. Inkjet Printer B. Laser printer spraying to print information: C. Thermal Printer D. Dot Matrix printer A. 11 All of the following are advantages of Data Sharing. B. Security. cloud storage except: C. Privacy. D. Accessibility 12 The computer performance is affected A. RAM capacity B. Processor speed by many factors like: C. Cache size D. All of the choices 13 The CPU speed is measured in: A. Mpbs B. Giga Bytes C. GHz D. ppm Page 41 of 177 PALESTINE POLYTECHNIC UNIVERSITY COMPUTER AND PROGRAMMING PRINCIPLES 2024/2025 ENG. YOUSEF A. SALAH Q3) An image is presented on a screen containing 360 pixels width, and 180 pixels height, answer the followings: A) What is the total pixels being displayed on the screen? B) What is the aspect ratio that best views this image? C) If each pixel is represented as 8 bits, What is the image size in KB? What is the image size in MB? Page 42 of 177 PALESTINE POLYTECHNIC UNIVERSITY COMPUTER AND PROGRAMMING PRINCIPLES 2024/2025 ENG. YOUSEF A. SALAH Page 43 of 177 PALESTINE POLYTECHNIC UNIVERSITY COMPUTER AND PROGRAMMING PRINCIPLES 2024/2025 ENG. YOUSEF A. SALAH CHAPTER THREE COMPUTER SOFTWARE PREFACE: This chapter focuses on computer software and how programs enable computers to function efficiently for users. It distinguishes between the two main types of software: system software and application software, providing detailed examples of each. The chapter also explores the operating system as a crucial component of system software, highlighting its core functions. Additionally, it discusses utility programs that handle maintenance tasks for computers. INTENDED LEARNING OUTCOMES: After completing this chapter students will be able to: 1) Describe the differences between system software and application software. 2) Understand what application software is, and provide examples about it. 3) Explain the basic functions, features, and categories of operating systems. 4) Name today’s most widely used operating systems. 5) Explain the purpose of utilities and utility suites. FURTHER READING: 1) Discovering Computers ©2018: Digital Technology, Data, and Devices. 2) Computing Essentials 2017-McGraw-Hill (2017) Daniel O’Leary, Linda I. O’Leary, Timothy J O’Leary. 3) Understanding Computers Today And Tomorrow Comprehensive, Deborah Morley, Charles S. Parker - Cengage Learning, (2016). Page 44 of 177 PALESTINE POLYTECHNIC UNIVERSITY COMPUTER AND PROGRAMMING PRINCIPLES 2024/2025 ENG. YOUSEF A. SALAH WHAT IS COMPUTER SOFTWARE - A computer software (or program, application) is the list of instructions that tell the computer what to do, and how to process data to get what the user wants. - Computer software drives the hardware to operate properly. - Types of Software: o Application Software o System Software Application Software: - Performs a specific task, and provides a service to the end user. - The user interacts with the application software. - Examples of application software: o Google Chrome: Web browsing. o Notepad: Text editing. o Media Player: Audio playing. o MS Excel: Spreadsheet application. o MS PowerPoint: Presentation software. o Photoshop: Graphic software. - Application software may be classified into: o Desktop Application o Web Application o Mobile Application Activity: List a name of a program for each category of the above application software. Page 45 of 177 PALESTINE POLYTECHNIC UNIVERSITY COMPUTER AND PROGRAMMING PRINCIPLES 2024/2025 ENG. YOUSEF A. SALAH - Desktop Application: - Runs as a stand-alone program on a PC or laptop. - It may require an installation process. - Examples: o Calculator, Photoshop, MS office, …. - Web Application (or web app): - Runs inside a web browser. - Examples: o Facebook, web-email, Google Classroom, …. - Mobile Application (or app): - Runs in a mobile device like smartphone or tablet. - Examples: o Instagram, Google Weather, Telegram, WhatsApp, Google Maps, … Page 46 of 177 PALESTINE POLYTECHNIC UNIVERSITY COMPUTER AND PROGRAMMING PRINCIPLES 2024/2025 ENG. YOUSEF A. SALAH System Software: - System software are programs that manage and control the operations of computer resources (software, hardware, users, connections, …). - These programs enable the computer to boot, launch application programs, configure your computer to work with the hardware connected to it, connect your computer to a network, manage files on hard drive, and protect your computer from unauthorized use. - Examples of system software: o Operating Systems o Device Drivers o Utility programs such as disk defragmentation, back-up, etc.. - Operating System: - An Operating System (OS) is a system software that installed to coordinate and manage all the operations and activities running on a computer. - OS also provides an interface between application software and computer hardware. - Examples of Desktop OS: o Windows o Linux o Unix o Mac OS - Examples of Mobile OS: o Android o iOS o HarmonyOS o Windows Phone Page 47 of 177 PALESTINE POLYTECHNIC UNIVERSITY COMPUTER AND PROGRAMMING PRINCIPLES 2024/2025 ENG. YOUSEF A. SALAH Main functions of an Operating System: - Booting the computer The OS is the first program that is loaded to run when the computer is turned on. - Process Management: The OS responsible for running computer programs. It also coordinates the execution of multiple programs simultaneously (Multitasking). - Memory Management: OS loads program into memory for execution in efficient way. The memory is a shared resource, so the OS optimizes the RAM to speed up the processing of programs. - Administering Security: OS uses passwords and biometric characteristics and other security procedures to limit access to the computer and other system resources to only authorized users. OS also manages the privileges and access permissions of multi-user computer systems. Additionally, OS protects the computers from attackers and unauthorized access. Page 48 of 177 PALESTINE POLYTECHNIC UNIVERSITY COMPUTER AND PROGRAMMING PRINCIPLES 2024/2025 ENG. YOUSEF A. SALAH - User Interface: OS provides the view at which the user interacts with applications. The interface provides means of inputting data and producing information. User Interface may be: o Graphical User Interface (GUI): The user interacts with visual images by touching, pointing, tapping, or clicking buttons, menus, icons and other objects to issue commands. o Command Line Interface (CLI): The user writes commands by typing text to enter data and instructions. (Also called: Terminal, Shell, Console) Activity: On Windows® OS, and through the RUN dialogue, write the “cmd” command and view the Windows CLI interface. Page 49 of 177 PALESTINE POLYTECHNIC UNIVERSITY COMPUTER AND PROGRAMMING PRINCIPLES 2024/2025 ENG. YOUSEF A. SALAH - Configuring Devices: The OS configures all devices connected to a computer. Small programs called device drivers (or drivers) are used to communicate with peripheral devices, such as monitors, printers, scanners …. - Nearly, all the operations and services running on a computer is controlled and managed by the OS. For example, the OS is also responsible for File and disk Management, Performance Monitoring, Network and Internet connections, … Activity: A single physical computer can support multiple operating systems that operate independently. Search for the term describing this feature. - Utility Program: - A utility program is a software usually related to managing or maintaining a computer system. It optimizes the performance of a computer. - Examples of Utility programs: o Programs for finding files. o Cleaning up a hard drive. o Backing up software. o File Compression. o Disk defragmentation. o Antivirus Programs. Page 50 of 177 PALESTINE POLYTECHNIC UNIVERSITY COMPUTER AND PROGRAMMING PRINCIPLES 2024/2025 ENG. YOUSEF A. SALAH Back-up Tools: – Create identical copy of the data (replica). – Original data can be restored from the back-up. – Normally, a back-up copy is stored off-site. Discussion: - Which desktop OS is most popular today? - Which Mobile OS is most popular today? CHAPTER QUESTIONS: Q1) State whether each of the following statements is TRUE or FALSE. TRUE / Statement FALSE A computer needs an operating system to work. Command-line interfaces often are difficult to use because they require exact spelling, grammar, and punctuation. Smart devices usually have a special operating system. Microsoft Office Word is an example of utility software. A web browser (like Google Chrome) is an example of system software. A device driver is a system software that enables the computer to identify some hardware. Page 51 of 177