COS 101 Introduction to Computer Science Lecture Notes PDF

Summary

This document is a lecture note on introductory computer science course in the Gombe State University, 2023/2024 academic session. It covers fundamental concepts of computer and computing science.

Full Transcript

COS 101: INTRODUCTION TO COMPUTER SCIENCE GOMBE STATE UNIVERSITY FACULTY OF SCIENCE DEPARTMENT OF COMPUTER SCIENCE COS 101: INTRODUCTION TO COMPUTER SCIENCE MODULE I: LECTURE NOTE 2023/2024 ACADEMIC SESSION...

COS 101: INTRODUCTION TO COMPUTER SCIENCE GOMBE STATE UNIVERSITY FACULTY OF SCIENCE DEPARTMENT OF COMPUTER SCIENCE COS 101: INTRODUCTION TO COMPUTER SCIENCE MODULE I: LECTURE NOTE 2023/2024 ACADEMIC SESSION 1 COS 101: INTRODUCTION TO COMPUTER SCIENCE INTRODUCTION The term computer or computing is derived from the word "compute" which originates from the Latin word "computare," which means "to calculate" or "to reckon together.". Computing sciences, also known as computer science, is a diverse and multidisciplinary field that encompasses various areas of study, research, and practice related to computers, computation, and information processing. It is a foundational course that familiarizes students with the fundamental concepts, principles, and practices of computer science. The course often includes hands-on programming assignments, projects, and labs to reinforce theoretical concepts and develop practical skills. It lays the groundwork for more advanced courses in computer science and related fields and provides students with the essential knowledge needed to pursue careers in technology. It is also regarded as a general course for all discipline/field of study as a result of the global technological revolution that define a modern ways of solving problem. Definition of Computer A computer is an electronic device capable of accepting data (input), processing it according to predefined instructions, store the data and producing results (output) as information. Computers can perform a wide range of tasks, from simple calculations to complex simulations, and they come in various forms, sizes, and configurations. Computing sciences encompass the development, implementation, and utilization of computing technologies, platforms, and tools to enable digital transformation, automation, and optimization of processes and systems in various domains. Functions of Computer Computers perform a wide range of functions, enabling users to perform various tasks efficiently and effectively. Here are some key functions of computers: 2 COS 101: INTRODUCTION TO COMPUTER SCIENCE a. Processing Data Computers process data by executing instructions and performing calculations using the central processing unit (CPU). This includes tasks such as arithmetic operations, logical operations, and data manipulation. b. Storing Data Computers store data in various forms, including text, images, videos, and software programs. Storage devices such as hard disk drives (HDDs), solid-state drives (SSDs), and optical discs allow users to save and retrieve data for later use. c. Managing Information Computers organize and manage information using software applications such as databases, file systems, and content management systems. This includes tasks such as storing, retrieving, sorting, and searching for data. d. Communicating Computers enable communication between users and devices through networks, the internet, and communication protocols. This includes tasks such as sending and receiving emails, accessing websites, participating in video conferences, and sharing files. e. Automating Tasks Computers automate repetitive tasks and processes using software applications, scripts, and macros. This includes tasks such as batch processing, scheduling, data processing, and workflow automation. 3 COS 101: INTRODUCTION TO COMPUTER SCIENCE f. Generating Output Computers produce output in various forms, including text, graphics, audio, and video. Output devices such as monitors, printers, speakers, and projectors allow users to view, listen to, and print information generated by the computer. g. Performing Complex Calculations Computers perform complex calculations and simulations for scientific, engineering, financial, and mathematical applications. This includes tasks such as numerical analysis, modeling, and simulations. h. Facilitating Creativity Computers enable creativity and expression through software applications for graphic design, digital art, music composition, video editing, and creative writing. This includes tasks such as creating illustrations, editing photos, composing music, and producing videos. i. Supporting Decision-Making Computers support decision-making processes by providing data analysis, visualization, and decision support tools. This includes tasks such as data mining, business intelligence, predictive analytics, and decision modeling. j. Controlling Devices Computers control external devices and systems through input/output interfaces and control mechanisms. This includes tasks such as operating industrial machinery, controlling robotic systems, and managing smart home devices. CHARACTERISTICS OF COMPUTERS Computers exhibit several key characteristics that define their capabilities, functionality, and utility. Here are some of the main characteristics of computers: 4 COS 101: INTRODUCTION TO COMPUTER SCIENCE a. Speed: Computers can process data and execute instructions at incredibly high speeds, measured in millions or billions of operations per second (megahertz or gigahertz). This allows them to perform tasks rapidly and efficiently. b. Accuracy: Computers perform calculations and operations with a high degree of accuracy, minimizing errors and ensuring reliable results. They follow precise instructions and algorithms to execute tasks consistently. c. Versatility: Computers are versatile machines capable of performing a wide range of tasks and functions. They can process different types of data (text, numbers, images, etc.) and execute various software applications to meet diverse user needs. d. Storage Capacity: Computers can store vast amounts of data, ranging from gigabytes to terabytes or more, on internal and external storage devices. This allows users to save, retrieve, and manage large volumes of information. e. Reliability: Computers are designed to operate reliably under different conditions and environments. They undergo rigorous testing and quality control measures to ensure stable performance and minimize hardware and software failures. f. Scalability: Computers can be scaled up or down in terms of processing power, memory capacity, and storage capacity to accommodate changing workload demands. This scalability allows for flexibility in adapting to evolving computing requirements. g. Connectivity: Computers can connect to networks, the internet, and other devices, enabling communication, data exchange, and collaboration across different platforms and locations. This connectivity facilitates sharing resources, accessing remote data, and interacting with other users. h. Automation: Computers can automate repetitive tasks and processes using software applications, scripts, and macros. This automation improves efficiency, reduces human error, and frees up time for more complex and creative tasks. i. Multitasking: Computers can perform multiple tasks simultaneously, switching between different applications and processes without significant performance degradation. This multitasking capability allows users to work on several tasks concurrently, increasing productivity. 5 COS 101: INTRODUCTION TO COMPUTER SCIENCE j. Adaptability: Computers can adapt to changes in software, hardware, and user preferences through updates, upgrades, and customization options. This adaptability ensures that computers remain relevant and useful in evolving technological environments. k. Diligence: Unlike human beings, a computer is free from monotony, tiredness and lack of concentration. It can work continuously without any error and boredom with same speed and accuracy. BRIEF HISTORY OF COMPUTING The history of computing is a fascinating journey spanning centuries, marked by remarkable inventions, innovations, and advancements. Throughout its history, computing has profoundly impacted society, driving innovation, transforming industries, and shaping the way we live, work, and interact with the world around us. Here is a brief overview: 1. Ancient Calculating Devices The earliest forms of computing can be traced back to ancient civilizations, where devices like the abacus (developed around 3000 BCE) were used for basic arithmetic calculations. Abacus 2. Mechanical Calculators In the 17th century, inventors like Blaise Pascal and Gottfried Wilhelm Leibniz created mechanical calculators capable of performing arithmetic operations. These machines laid the groundwork for the development of more sophisticated mechanical computing devices. 6 COS 101: INTRODUCTION TO COMPUTER SCIENCE Blaise Pascal calculator 3. Difference Engine And Analytical Engine In the 19th century, Charles Babbage design first multi-purpose or programmable computing device was probably Charles Babbage's Difference Engine, which was begun in 1823 but never completed. In 1842, Babbage designed a more ambitious machine, called the Analytical Engine but unfortunately it was also only partially completed. Babbage, together with Ada Lovelace recognized several important programming techniques, including conditional branches, iterative loops and index variables. Babbage designed the machine which is arguably the first to be used in computational science. Difference Engine and Analytical Engine 7 COS 101: INTRODUCTION TO COMPUTER SCIENCE 4. Early Computers The 20th century saw the emergence of electronic computers. The Colossus, developed during World War II by British codebreakers, was one of the earliest programmable electronic computers. In the United States, ENIAC (Electronic Numerical Integrator and Computer), unveiled in 1946, was the first general-purpose electronic digital computer. ENIAC 5. Transistors and Integrated Circuits The invention of the transistor in the late 1940s revolutionized computing by enabling smaller, faster, and more reliable electronic devices. Integrated circuits, developed in the late 1950s and early 1960s, further miniaturized electronic components, leading to the creation of microprocessors and the birth of the modern computing era. Transistor Integrated circuit 8 COS 101: INTRODUCTION TO COMPUTER SCIENCE 6. Personal Computers The 1970s witnessed the rise of personal computing with the introduction of machines like the Altair 8800 and the Apple I. The development of graphical user interfaces (GUIs) in the 1980s, popularized by the Apple Macintosh and Microsoft Windows, made computers more accessible to non-technical users. Personal computers 7. Internet and World Wide Web The 1990s saw the rapid expansion of the internet and the creation of the World Wide Web by Tim Berners-Lee. These developments transformed computing by enabling global connectivity, information sharing, and the proliferation of online services and applications. Internet and World Wide Web 9 COS 101: INTRODUCTION TO COMPUTER SCIENCE 8. Mobile Computing The 21st century saw the rise of mobile computing with the advent of smartphones and tablets. These devices, powered by increasingly powerful processors and connected to high-speed wireless networks, have become ubiquitous tools for communication, entertainment, and productivity. Mobile Computing 9. Cloud Computing and Big Data In recent years, cloud computing has emerged as a dominant paradigm, allowing users to access computing resources and storage over the internet. The explosion of data generated by digital devices and online activities has led to the rise of big data analytics, machine learning, and artificial intelligence applications. Cloud Computing and Big Data 10 COS 101: INTRODUCTION TO COMPUTER SCIENCE 10. Future Trends Looking ahead, computing continues to evolve with advancements in quantum computing, artificial intelligence, augmented reality, and other emerging technologies poised to reshape the digital landscape in profound ways. Future Trends BASIC COMPONENTS OF A COMPUTER/COMPUTING DEVICE Major Components of a Computer A computer is composed of basically two component which include hardware, software and people ware. The hardware refers to the physical component of the computer such as monitor, mouse and keyboard, while the software part is the instructions that makes the computer work. Software is held either on your computer’s hard disk, CD-ROM, DVD or on a diskette (floppy disk) and is loaded (i.e. copied) from the disk into the computers RAM (Random Access Memory), as and when required. Components of a computer System Typical computer system consist of the following major components as shown in the following figure: 11 COS 101: INTRODUCTION TO COMPUTER SCIENCE i. Input devices ii. The central processing unit (CPU) iii. Main memory iv. Secondary storage devices v. Output device Main Components of a computer Input Devices Input is any data the computer collects from people and from other devices. The component that collects the data and sends it to the computer is called an input device. Common input devices are the keyboard, mouse, scanner, microphone, and digital camera as shown in the following figure. Disk drives and optical drives can also be considered input devices because programs and data are retrieved from them and loaded into the computer’s memory. Input Devices 12 COS 101: INTRODUCTION TO COMPUTER SCIENCE Central Processing Unit (CPU) The CPU is like the brain of the computer, responsible for executing instructions and performing calculations. CPU cannot be physically as it is typically housed inside the computer's case, but you can understand its activity by observing the computer's performance. For example, opening a program or running a task will engage the CPU, causing the computer to process information. It controls the operation of all parts of computer. CPU itself has following components i. Control Unit ii. ALU (Arithmetic & Logic Unit) Processor i. Control Unit (CU) This unit controls the operations of all parts of computer but does not carry out any actual data processing operations. Functions of this unit are: a. It is responsible for controlling the transfer of data and instructions among other units of a computer. b. It manages and coordinates all the units of the computer. c. It obtains the instructions from the memory, interprets them, and directs the operation of the computer. d. It communicates with Input/output devices for transfer of data or results from storage. 13 COS 101: INTRODUCTION TO COMPUTER SCIENCE ii. Arithmetic and Logic Unit (ALU) This is where arithmetic and logic operations are performed, it consists of two subsections namely Arithmetic section and Logic Section. a. Arithmetic Section Function of arithmetic section is to perform arithmetic operations like addition, subtraction, multiplication and division. All complex operations are done by making repetitive use of the above operations. b. Logic Section Function of logic section is to perform logic operations such as comparing, selecting, matching and merging of data. Main Memory You can think of main memory as the computer’s work area. This is where the computer stores a program while the program is running, as well as the data that the program is working with. For example, suppose you are using a word processing program to write an essay for one of your classes. While you do this, both the word processing program and the essay are stored in main memory. Main memory is commonly known as random-access memory, or RAM. It is called this because the CPU is able to quickly access data stored at any random location in RAM. RAM is usually a volatile type of memory that is used only for temporary storage while a program is running. When the computer is turned off, the contents of RAM are erased. Secondary Storage Devices Secondary storage is a type of memory that can hold data for long periods of time, even when there is no power to the computer. Programs are normally stored in secondary memory and loaded into main memory as needed. Important data, such as word processing documents, payroll data, and inventory records, is saved to secondary storage as well. 14 COS 101: INTRODUCTION TO COMPUTER SCIENCE The most common type of secondary storage device is the disk drive (Hard Disk). A disk drive stores data by magnetically encoding it onto a circular disk. Most computers have a disk drive mounted inside their case. External disk drives, which connect to one of the computer’s communication ports, are also available. External disk drives can be used to create backup copies of important data or to move data to another computer. Examples of Secondary Storage Devices Output Devices Output is any data the computer produces for people or for other devices. It might be a sales report, a list of names, or a graphic image. The data is sent to an output device, which formats and presents it. Common output devices are video displays and printers. Disk drives and CD recorders can also be considered output devices because the system sends data to them in order to be saved. Output Device 15 COS 101: INTRODUCTION TO COMPUTER SCIENCE Other components of the computer include: i. Motherboard The motherboard is the main circuit board that houses and connects all the essential components of a computer. Inside the computer's case, you can visually identify the motherboard as the largest circuit board where all other components are connected. It provides the electrical connections and interfaces necessary for communication between component Motherboard ii. Power Supply Unit (PSU) The PSU converts AC power from a wall outlet into DC power that the computer's components can use. The PSU is typically located at the top or bottom of the computer's case. Plugging in the power cord and turning on the computer demonstrates how the PSU provides power to the entire system. Power Supply Unit (PSU) 16 COS 101: INTRODUCTION TO COMPUTER SCIENCE Computer Software Computer hardware is driven by the software. The usefulness of the computer depends on the programs that are written to manipulate it. In order to perform any task, you have to give a set of instructions in a particular sequence to the computer. These sets of instructions are called Programs. Software refers to a set of programs that makes the computer perform a particular set of tasks in particular order. In essence, software is the set of programs that run on the computer. Types of Software Software can be classified into two main categories: System Software and Application Software. System Software System software are set of programs that manage the computer system. They are responsible for running the computer system, controlling it operations and managing it resources. Types of System Software There are three main types of system software: Operating System (OS), Utility programs and Program translators. Operating system – Operating System is a system software which acts as an interface between users and computer hardware and controls the execution of all kinds of programs. Some examples of operating systems include: Windows, Linux, UNIX, android, IOS, and Ubuntu. Utility Programs/Software - Utility Programs/Software are system software that are used to manage and maintain the computer system. Some examples of utility programs include: antivirus program, Backup utility, partition manager. 17 COS 101: INTRODUCTION TO COMPUTER SCIENCE Program translators - Program Translators are system software used for translating a program source code usually from a higher level language to a lower level language. Some examples of program translators include: compiler, assembler and interpreter. Application Software Application software is a set of programs, which are written to perform specific tasks, for example: An application package for managing library known as library information system which is used to manage information of library such as: keeping book details, account holder details, book issue details, book return details etc. Another application package for managing student details is called student’s information system, manages student’s roll number, name, parents name, address, class, section, processing of examination results etc. Application software can be broadly classified into two types: (a) Generalized packages (b) Customized packages Generalized Packages These are application software designed and developed for general use. They are not designed with a particular customer in mind, they are written to cater to user’s very general needs such as preparing documents, drawing pictures, database to manage data/information, preparing presentations, playing games etc. Some examples of the generalized package software are listed below: i. Word Processing Software (for preparing documents): E.g Word Perfect, MS-Word, OpenOffice.org Writer ii. Spreadsheets (Data Analysis): E.g Lotus Smart suites, MSExcel, OpenOffice.org Calc, Apple Numbers iii. Presentations: E.g Presentation Graphics, MS-PowerPoint, OpenOffice.org Impress iv. Database Management System: E.g MS-Access, OpenOffice.org Base, MS-SQL Server, ORACLE v. Graphics Tools: E.g Paint shop pro, Adobe Photoshop 18 COS 101: INTRODUCTION TO COMPUTER SCIENCE Customized Packages These are the applications that are customized (or developed) to meet the specific requirements of an organization/institution. For Example: Student information system, Payroll packages, inventory control system etc. INPUT/OUTPUT DEVICES AND PERIPHERALS Input/output (I/O) devices and peripherals play crucial roles in facilitating interaction between users and computers, as well as enabling communication with external devices. These input/output devices and peripherals enhance the functionality and usability of computers, enabling users to interact with digital content, communicate with others, and perform various tasks effectively. Here is an overview of common input/output devices and peripherals: Input Devices Device Description Image Keyboard Keyboard is the most common input devices for computers. Users input text, commands, and keystrokes by pressing keys on the keyboard. Example: QWERTY keyboard Mouse An input device used to control the cursor and navigate graphical user interfaces (GUIs) by moving a pointer on the screen and clicking buttons. 19 COS 101: INTRODUCTION TO COMPUTER SCIENCE Touchpad/Trackpad Commonly found on laptops, it allows users to control cursor movement and perform gestures using finger movements on a touch-sensitive surface. Touchscreen A display screen that responds to touch gestures, allowing users to interact directly with the interface by tapping, swiping, and pinching. Scanner Scanners convert physical documents, photos, or images into digital formats, allowing users to store, edit, and share them electronically. They capture images by scanning the document using light sensors. Example: Flatbed scanner. Webcam It captures video and images, enabling video conferencing, live streaming, and recording. Microphone It converts sound waves into electrical signals, allowing users to input audio data for recording, voice commands, or communication. 20 COS 101: INTRODUCTION TO COMPUTER SCIENCE Joystick/Gamepad It is an input device that is used primarily for gaming, providing analog control over movement and actions in games. Barcode It is used to reads barcodes on products Reader/Scanner or documents, providing data input for inventory management, retail sales, and identification purposes. Smart board It is an interactive whiteboard that allow users to write, draw, and interact with digital content using a stylus or digital pen. They feature touch- sensitive surfaces and can display multimedia content from computers. Output Devices Device Description Image Monitor/Display Monitor is use to display visual output from computer, including text, graphics, and multimedia content. Users interact with software applications and graphical user interfaces through the monitor screen. Example: LED monitor. 21 COS 101: INTRODUCTION TO COMPUTER SCIENCE Printer Printers produce hard copies of digital documents, images, or graphics on paper or other media. They receive print commands from computers and transfer ink or toner onto the printing surface to create physical copies. Example: Laser printer. Speakers/Headph Speakers produce audio output from ones computers, allowing users to listen to music, sounds, and multimedia content. They convert electrical signals into sound waves using drivers and amplifiers. Example: Stereo speakers. Projector Projectors display visual output from computers onto larger surfaces, such as screens, walls, or whiteboards. They project images and video content using light sources and lenses. Example: Digital multimedia projector. Plotter Outputs vector graphics or technical drawings with high precision and accuracy, commonly used in engineering, architecture, and design. 22 COS 101: INTRODUCTION TO COMPUTER SCIENCE Haptic Feedback Provide tactile feedback to users, simulating Devices sensations such as vibrations or force feedback for enhanced interaction and immersion in applications and games. Peripherals 1. External Storage Devices Include USB flash drives, external hard drives, and memory cards for storing and transferring data externally. 2. Network Adapters Enable wired or wireless communication with networks, allowing the computer to connect to the internet or other devices. 3. External Optical Drives Allow reading and writing of CDs, DVDs, and Blu-ray discs, providing additional storage and media playback capabilities. 4. Docking Stations Provide additional ports and connectivity options for laptops, allowing users to connect multiple peripherals and accessories with ease. 5. USB Hubs Expand the number of USB ports available on a computer, allowing connection of multiple USB devices simultaneously. 23 COS 101: INTRODUCTION TO COMPUTER SCIENCE HARDWARE, SOFTWARE AND HUMAN WARE "Hardware," "software," and "humanware" are terms used to describe different aspects of computing systems, each playing a crucial role in the overall functionality and operation of a computer. In summary, hardware, software, and humanware are integral components of computing systems, with hardware providing the physical infrastructure, software enabling functionality and automation, and humanware representing the human aspect of computing, including users, designers, and stakeholders. Together, these elements form a cohesive system that facilitates data processing, communication, and problem-solving in various domains and applications. Hardware Hardware refers to the physical components of a computer system that can be touched and seen. It includes devices such as the central processing unit (CPU), memory modules (RAM), storage devices (hard disk drives, solid-state drives), input devices (keyboard, mouse, touchscreen), output devices (monitor, printer, speakers), and networking devices (routers, network interface cards). Hardware components interact with each other and perform specific functions to execute instructions, process data, and facilitate communication within the computer system and with external devices. Examples of hardware categories include: a) Processing Hardware: CPU, GPU (Graphics Processing Unit) b) Memory Hardware: RAM, ROM (Read-Only Memory) c) Storage Hardware: Hard Disk Drives (HDDs), Solid State Drives (SSDs) d) Input/Output Hardware: Keyboards, Mice, Monitors, Printers e) Networking Hardware: Routers, Switches, Network Interface Cards (NICs) Software Software refers to the programs, instructions, and data that enable a computer system to perform specific tasks and functions. It consists of intangible elements that govern the operation, behavior, and interaction of hardware components. Software can be broadly categorized into two main types as follows: 24 COS 101: INTRODUCTION TO COMPUTER SCIENCE f) System Software: Manages and controls the hardware resources and provides essential services for the operation of the computer system. Examples include operating systems (Windows, macOS, Linux), device drivers, utilities, and firmware. g) Application Software: Performs specific tasks and functions according to user requirements. Examples include word processors, web browsers, email clients, video games, and productivity suites (Microsoft Office, Adobe Creative Cloud). Software can also be classified based on its distribution and licensing model, such as proprietary software, open-source software, freeware, and shareware. Humanware Humanware refers to the human users, operators, and stakeholders involved in the design, development, use, and maintenance of computing systems. Unlike hardware and software, humanware represents the human element of computing, including knowledge, skills, experiences, preferences, and behaviors. Humanware encompasses aspects such as user interfaces, user experience (UX) design, humancomputer interaction (HCI), usability testing, user training, technical support, and ethical considerations. Effective humanware integration is essential for ensuring that computing systems are user-friendly, accessible, efficient, and aligned with user needs and expectations. 25

Use Quizgecko on...
Browser
Browser