CSC 101 Introduction to Computer Science PDF

Summary

This document provides an introduction to computer science, covering topics such as computer hardware, software, data processing modes, and the computing system. It explains different components of a computer and the evolution of data processing. The document is a useful primer for anyone beginning to study computer science.

Full Transcript

Here is the markdown conversion of the provided text: # CSC 101 - Introduction to Computer Science ## Course Outline * Meaning and History of Computer * Introduction to Computing System: Hardware, Software, Auxiliary Equipment and Consumables * Generations of Computers * Trends in Computing...

Here is the markdown conversion of the provided text: # CSC 101 - Introduction to Computer Science ## Course Outline * Meaning and History of Computer * Introduction to Computing System: Hardware, Software, Auxiliary Equipment and Consumables * Generations of Computers * Trends in Computing Technology: Centralized Computing and Distributed Computing * Modes of Data Processing * Data, Information and Communications * Application of Computers in Business, Science and Engineering * Evaluation of Computer Awareness Appreciation and Utilization * Computer Virus ## What is a Computer? A computer is a machine or tool which is capable of: 1. Taking input data 2. Storing input data 3. Processing the input data 4. Producing the output reports on paper or computer store for human beings to use It's indeed a tool for representing and manipulating data. A computer is a machine which is put to life by electricity and made to work by human being. Therefore, for a computer to work, two forces are required: 1. Electrical Force 2. Human Force **Electrical Force:** The electrical force provides life to the computer. The electrical energy on its own does not make a computer to work but gets the computer ready to make instruction from a user (this is where the human force comes in). **Human Force:** The human force drives a computer to carry out a task by issuing some instructions or commands to the computer. The instructions are expressed in a language which the computer understands These languages are called Programming Languages. If the human being issues wise instructions, the computer will carry out the task wisely. If, on the other hand the human being issues foolish instructions, the computer will carry out the task foolishly. Hence, the common saying in the computer world that: "Garbage in Garbage out". It can therefore be said that the intelligent performance of a computer is directly proportional to the intelligence of the human being that drives it. The human component of the forces that drive the computer is generally described as Computer Software. ## Evolutionary Trends of Data Processing From the definition of a computer, it will be observed that the function of a computer revolves around data processing. Computer can therefore be described as a data processing machine. The computer accepts data (raw facts), process the data and produces (output) results or information for human beings to use for planning, monitoring, controlling, formulating policy, forecasting, modelling and simulation, and decision making. However, before the invention of the computer, man has been involved in data processing. The following are the three major methods that have been widely used for data processing: 1. Manual Method 2. Mechanical Method 3. Computer Method The manual Method involves the use of pen and paper for recording (data collection and storage), manipulating, classifying, sorting and presenting data. The manual method entails considerate mental and physical efforts. It can be cumbersome, tiresome, boring, frustrating, time consuming and affected by human errors. When there is error, the reliability, accuracy, neatness, tidiness and validity of the data would be in doubt. Also the manual method does not allow for processing of data on a regular and time basis. The mechanical method of data processing involves the use of machines such as typewriter, calculator, adding machines etc. The mechanical operations are basically routine in nature and lack intelligence, creativity or flexibility. They are also noisy, error prone, untidy and does not allow processing of large volume of data continuously and timely. The computer method of data processing has the following features: 1. The operations are practically not noisy. 2. Data can be steadily and continuously processed when the computer is instructed by a human being on what to do and how to do what to do. 3. There is a store (memory) where data and instructions can be stored temporarily and permanently. 4. Intelligence and flexibility can be built into the computer operation using if...then statements. Thus the computer is capable of performing complex arithmetic and logic operations. 5. Errors can easily and neatly be corrected. 6. The output reports are usually very neat, decent and can be produced in various forms such as table, diagram, text and voice. 7. Accurate, reliable and significant amounts of data can be processed continuously, constantly and at the right time ## The Computing System As discussed earlier, the computer as a machine cannot work on its own. It needs some other components to make it to work. The organized relationships amongst the various parts that makes computer to carry out the data processing task is described as the Computing System. The major components of computing system are: * Computer hardware * Computer software * Computer user ### The Computer Hardware The computer hardware is on its own a system that is made up of: 1. Central Processing Unit 2. Peripherals 3. Auxiliary equipment. The central processing unit can further be broken into the following three (3) components: 1. Control Unit 2. Arithmetic and logic unit 3. Memory The computer peripheral serves as the medium of communication between the computer and the human world. The computer peripheral can be classified into: 1. Input device 2. Output device The auxiliary equipment are designed for the effective and efficient performance of the computing system. They comprises of: 1. Air Conditioner 2. Voltage stabilizer 3. Un-interruptible power system The logical/organized relationships of the CPU and computer peripherals are conceptualized in the diagram that follows: The image is a diagram showing the relationship between the CPU and its peripherals **Description of the Diagram:** The diagram shows the relationship between CPU, Input Unit, Output Unit, Main memory and Secondary Storage. * The CPU block contains three blocks: Control Unit, ALU and Main Memory. * The Control Unit is connected to ALU and Main Memory which is connected to secondary Storage * Input and output units connect with the CPU * There are also Data Lines and Signal Lines **Fig 1:** Conceptual Relationship between CPU and Peripherals ## The Computer Memory This is one of the parameters to measure the power/worth of a computer. It is measured by the number of alphabetic characters that the computer can store/hold. It is measured in bytes One byte is made up of eight (8) bits. One bit is the smallest unit of a computer store capable of storing only one binary digit 0 or 1. The computer which has 500GB of memory is considered to be more powerful than the computer which has 250GB of memory. The computer memory can be divided into four categories: 1. The primary/main memory 2. Secondary memory 3. Tertiary memory 4. The cloud memory **The primary memory:** is a temporary memory. It loses its content whenever the computer is turned off or there is power outage. It is the memory that serves as a work area for all computer user. It can be likened with the white board in a classroom. Whatever any lecturer writes on the whiteboard during his lecture period can be erased by any other lecturer that comes in to teach in the classroom later. Therefore, as soon as a user finishes his data processing activities on the computer, whatever he/she stores in the primary memory can be erased by another user. There are two types of primary memory. They are i, RAM ii. ROM 1. **RAM:** The random access memory is a form of memory that allows data item to be read or written into. That is, a user can keep his or her data files, instructions, intermediate results and finally results temporarily. A user automatically loses whatever he or she stores on the RAM as soon as he or she closes the processing session on the computer. RAM contains multiplexing and de-multiplexing circuits that connects the data lines to the address storage for reading or writing. There are two (2) main types of RAM namely Static random access memory (SRAM) and Dynamic random access memory (DRAM). The SRAM has smaller storage but higher retention capacity while the DRAM stores information in the form of electrical charge and has a large storage capacity but loses its content too quickly. 2. **ROM:** The computer users can only read from ROM. It is an exclusive store used by a computer manufacturer for keeping some very sensitive instructions required to service or manage the computing resources. **The secondary memory:** The data stored in a secondary memory can be kept there for as long as the owner wants it. Data stored here remains there unless the memory is damaged or a willful erasure of the data is caused by a user. Other major features of the secondary memory are: 1. It is located outside the CPU (not on the board) but directly connected to it. 2. The access time to the data stored in the secondary memory is lower than that of the primary memory. 3. The secondary memory size is much larger than that of the primary memory. For example, there are computers with 1 terabyte secondary hard disk drive while a single module of most RAM is 8GB two module will give 16GB. 4. The technology of the secondary memory is lower than that of the primary memory, hence, it is cheaper than the primary memory | Control key | Functions | | :---------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ↑ | Moves the cursor one line up | | ↓ | Moves the cursor one line down | | → | Moves the cursor one character to the right | | ← | Moves the cursor one character to the left | | home | Moves the cursor to the beginning of a line or page | | end | Moves the cursor to the end of a line or page | | Pg up | Moves the cursor to the top of the previous page | | Pg dn | Moves the cursor to the top of the next page in a document | **The tertiary memory:** This is located outside the CPU and it is connected indirectly to the CPU. Data stored on this type of memory can be kept there for as long as the owner wants it. The access time to the data stored in the tertiary memory is considerably lower than that of the secondary memory. A tertiary memory can be transported readily from one computer environment to another without moving the host computer. **Input Device:** An input device is any hardware device that sends data to a computer allowing you to interact with and control it. The most commonly used input devices are the keyboard and the mouse. However, there are other devices that input data into a computer such as digital or graphic tablet, optical character reader, magnetic ink character reader, light pen, scanner, remote etc. 1. **Keyboard:** is an input device used with a computer. It is similar to an electric typewriter and composed of buttons used to create letters, numbers, and symbols and perform additional functions. Most keyboards use the QWERTY layout. A typical keyboard has function keys, alphanumeric keys, shift keys, caps lock key, control keys and cursor control keys. 1. **Function Keys:** are labelled $F1, F2, ...,F12$. Function keys can be programmed to carry out the functions desired by a programmer. For example, $F10$ may be programmed to display menus. In most packages, the function key $F1$ is used to run the HELP program, $F7$ is used to save text, while $F12$ is used to block a section of text. 2. **Alphanumeric keys:** contains alphabetic characters, numeric characters and special characters such as comma, full stop, open bracket, close bracket, asterisk, semi-colon, colon, question mark etc. Usually, each numeric and special character key carries a character at the lower part and another character at the upper part. 3. **Shift key:** when the shift key is pressed, the capital letter on the alphanumeric keys are activated. The shift key also serves as the activator of characters that are at the upper part of each numeric and special character keys. Note that the shift key on itself has no effect. Its effect is only realized when some other keys are pressed. Thus, if one presses the shift key and the equal (=) sign key, the plus (+) sign which is at the upper part of the equal (=) sign key is activated. 4. **Capslock key:** when pressed, shifts all alphabetic characters into upper case i.e. capital letters. Thus, all characters are typed in lower case when the capslock key is not on. 5. **Control key (ctrl):** is often used in text mode to perform a block operation like mass selection (ctrl + A), mass deletion (ctrl + Y) - deletes a whole line in a document, ctrl + S - to save a document. 6. **Cursor control keys:** These are the keys that move the cursor around on the screen. The cursor control keys include: the four directional arrow keys, the home key, end key, Page up and down keys (pg up & pg dn). The functions of these keys are tabulated as follows: ## Practical Assignment Check and document the function or effect of the following: 1. Ctrl + End keys 2. Ctrl + Home keys 3. Insert key (ins) 4. Print screen (prt sc) key 5. Shift + prt sc keys ### Mouse: A mouse looks like the clipper in a barbing salon. It is used to highlight an item on the screen. It consists of a pointing device and is very sensitive to movements. It has a roller ball and two buttons in which the right one is used to make selections and the left one is used to activate options. By moving the mouse on a flat smooth surface and clicking the buttons, a computer to which it is connected can be sensitized and commanded to carry out some specific tasks. A mouse can be used to draw diagrams on computer screen more effectively and efficiently than the computer keyboard. Generally, the keyboard and the mouse complement each other. For example, the mouse can be used to highlight a location on the screen and the keyboard can be used to type characters on the selected location. ### Digital or Graphic Tablet: This is an electrical pen that is connected to the computer. It is sensitive to movements like the mouse. They are used by architects and engineers to make drawings and designs which are later analyzed by the computer to reveal detailed technical information about the sketches. That is, digital or graphic tablet turns crooked and rough drawings made by the user into very accurate, beautiful and more acceptable designs. They are therefore used in making designs for aircrafts. ### Optical character reader (OCR) This is a device used to scan bar codes on most manufactured products. Bar codes consists of various sizes of light and dark lines which are easily decoded when they come into contact with reflected light patterns from optical character which are used to scan the bar codes. The codes are decoded and converted into electrical pulses and switched and transmitted onto the computer screen. The output on the screen provides information which are used to compare with already programmed patterns to find out the similarities and differences. With the universal product codes, the computer is capable of determining the name of the item, its current price and other relevant details. The computer then prints these information on the customer's receipt and automatically updates the inventory and sales records of that particular item. ### Magnetic ink character reader (MICR) is a character reader sorting device mostly used in the banks to process cheques, when the cheque is fed into the device, the MICR converts the customer's account number and other related information in the magnetic ink on the cheque into electrical pulses. The computer then transmits the information to the screen to facilitate the processing of the customer's cheque in a matter of seconds. Closely related to this input device is the use of magnetic code characters on credit/debit cards that are issued to customers who have an account with a bank. The card enables the holder to have access to funds any time of the day at an unattended teller machine called automated teller machine (ATM). When the card is inserted into the ATM, the information on the card is converted and transmitted into the computer in the form of electronic impulses. By following the messages that appear on the screen, the customers can withdraw money, check his or her balance or pay bills and transfer money. **Output Device:** The output device is a medium the computer uses to communicate its processed or recorded data with the human world. The result obtained from the processing of data are often stored in the computer memory. The results may be sent to an output device, Examples of output devices are printer, monitor, and computer secondary and tertiary storage. The result in the computer memory can be viewed from the monitor. The output report obtained from a printer is described as hard copy while the output report obtained from the other forms of output devices are described as soft copy. 1. **Printer:** A printer is an external hardware output device that takes the electronic data stored on a computer or other device and generates a hard copy. For example, if you created a report/assignment on your computer, you could print several copies to be submitted etc. Printers are one of the most popular computer peripherals and are commonly used to print text and photos. There are different types of computer printers but the most common printers are inkjet and laser printers. 1. **Inkjet printer:** The first inkjet printer was invented and developed by Hewlett-Packard in 1976. However, inkjet printers did not gain much popularity until the mid-1980s. The inkjet printer is now the most popular printer for home computer users that prints by spraying streams of quick-drying ink on paper. The ink is stored in disposable ink cartridges, and often a separate cartridge is used for each of the major colors. These colors are usually CMYK (cyan, magenta, yellow and black). Although inkjet printers themselves are often relatively inexpensive, the ink cartridges used in the printers can increase the overall cost of the printer. 2. **Laser printer:** The laser printer was first developed at Xerox PARC by Gary Starkweather and released in 1971. Laser printers are often used for corporate, school, and other environments that require print jobs to be completed quickly and in large quantities. A laser printer is usually larger than an inkjet printer found in most homes. 2. **Monitor:** A monitor is an output device like a TV screen that interprets and displays the graphical output signal from your computer graphics card on the screen. In simpler terms, a monitor displays video images and text. A monitor is made up circuitry, a screen, a power supply, buttons to adjust screen settings and casing that holds all of these components. A monitor can alternatively be referred to as a video display terminal (VDT) or a video display unit (VDU). Like most early TVs, the first computer monitors were comprised of a CRT (cathode ray tube) and a fluorescent screen. Today, all monitors are created using flat-panel display technology, usually backlit with LEDs (light emitting diode). ## Trends in Computer Technology We shall classify the computing technology into the following two major generations. * Centralized computing technology * Distributed computing technology **Centralized computing technology:** this consists of the mainframe computing and mini computing systems. ### Basic features of mainframe computing systems 1. The mainframe computing system are often described as theatre floor top computers. This is because they were so large in size and could only be installed on the raised floor of a theatre size room. 2. The data processing activities were centralized in the sense that there was only one CPU that service the activities of many users and if the CPU develop problems, all the data processing activities of the organization would be put to hold. 3. The computers were very expensive to buy and maintain, therefore, they could only be leased to corporate organization rather than sold because the cost of purchase and maintenance were often higher than what could be accommodated in the budget of any organization. 4. Emphasis then were on the optimal use by the experts. That is, the computers at that age could only be programmed by experts in computer programming. 5. Mainframe technology supports only the batch processing of data. 6. The intelligence of the computers were limited to the intelligence of its programmers. If a programmer attempts to divide a number by zero, the computing system would roam and roam and goes into indefinite loop without reporting to the programmer that it is illegal to divide a number by zero. In other words, the translators (compiler or interpreter) were missing or were at the primitive stage at that age of computing technology. 7. Because of the primitive technology of the operating system at that age, the mainframe computing technology was not user friendly, not menu-driven. Thus, the computer programming languages of that age were very difficult to learn, understand and use. 8. The computer at that age were largely used to carry out technical, repetitive and routine tasks of the operations staff. They could not support the task of management staff of corporate organizations which were qualitative in nature. The image shows a block diagram of a centralised mainframe environment consisting of Console, CPU, Secondary Memory, Printer and Card Reader **Fig 2:** Conceptual Diagram of the Centralized Mainframe Environment. **Note:** Only one computer programmer and many users waiting in turn to be attended to. The image shows a block diagram of a centralised mini-computing environment. The diagram is a diagram showing relationship between printer, CPU, serveral users and programmer. **Fig 3:** Conceptual Diagram of the Centralized Mini-computing Environment. ### Basic features of the mini-computing technology: 1. The computers were smaller in size than the mainframe. They are often described as office room floor top computers. That is, the computers could be accommodated in a room rather than a raised floor of a big hall. 2. The capital cost and recurrent cost could be accommodated in the budget of corporate organizations. The age of minicomputers opened the channel for corporate organizations to buy and maintain their computers. 3. The computers allow users interaction via computer experts. 4. The computer supported both batch processing, online processing and real-time processing of data. 5. The data processing activities were still centralized in the sense that there was only one CPU that service the data processing activities of the users in the computing environment. Note that the computer terminals has no capability to store and process data. They only serve as a medium of communication between the computer experts and the CPU. 6. The intelligence of the computer was still limited to the intelligence of its programmers. 7. The user friendly features of the computers were still primitive, consequently only the computer experts could program them. 8. Emphasis was shifted from the electronic data processing characteristics of the mainframe computers towards database processing, communications of data and equitable sharing of data among the various departments of the corporate organizations. 9. The computers of that age opened the channel for the development of MIS with a view of ensuring the management control of operational data in corporate organizations. ## Data Processing Modes Before discussing the distributed computing technology, it is expedient to define some of the basic technical terms that have been used while discussing the centralized computing technology and that will be used going forward. 1. **Batch processing:** In batch processing or operation, a program is read into the computer and the computer is essentially on its own until the program has been completely executed 2. **Online processing:** In online processing or operation, an external device is given the power to interrupt the computer while it is executing a program and to modify the computations in progress. An operation is therefore considered to be online if, a device external to the computer possibly but not necessarily operated by a man, and the computer itself take actions alternatively, such that the external device affects the data processing operation within the computer. The key distinction between online and batch processing lies in the word “alternatively”. 3. **Real-Time processing:** is an online system in which the exchange of information between the external device and the computer is sufficiently rapid so that the computational results can have an immediate and desired effect upon the external system of which the device is a part of. A key distinction between an online and real time processing system is the response time. Response time is defined as the time required by the system to react and respond to an external input. 4. **Multiple access system:** If a number of device are connected to a single CPU and if each of these devices are capable of communicating with the CPU, then a multiple access system is formed. 5. **Time-sharing systems:** if each of the devices in a multiple access system can be serviced in such a way that each device is given the impression that the CPU is servicing it only, the online system is termed a time-shared system. This illusion is created by switching from one device to another sufficiently, frequently and rapidly so that each device can operate in an apparently-continuous manner. 6. **Multiprogramming or Multitasking:** An online system is said to operate in a multiprogramming fashion if two or more programs are executed concurrently within the CPU such that one program need not be completed before another program is started. 7. **Multiprocessing:** A multiprocessing system consists of two or more CPU's usually capable of sharing one central memory. 8. **Interrupt:** Whenever an external device in a multiple access system requires service, it transmits a signal to a specific input channel of the CPU. The term interrupt is therefore used to designate the capability of the CPU to react to such a signal by suspending the normal dataflow within the CPU to switch to a special subroutine The image shows a block diagram of a distributed computing environment. **Fig 4:** Conceptual Diagram of the Distributed computing Environment. ### The basic features are: 1. The computers are small in size, meant to service only one user at a time and capable of being kept on top of a desk or table, Thus, they are generally described as micro-computers, personal computers (PC) or desktop computers. There are variety of them depending on their sizes and where they would be kept while using them. We have - the laptop, palmtop, notebook etc. The computers are cheap to buy and maintain and they could be bought off the shelf by an individual. 2. The computers can easily be used or operated directly by a non-expert in computer technology. They are therefore user friendly, menu-driven, interactive and intelligent. 3. The computers support distributed online, real-time and time sharing processing of data. 4. The data processing activities are distributed. Two or more computers could be connected to one another in a cabled form or wireless form. It is therefore possible for computers in such environment to talk to one another and share computing resources such as data files, program files, computer printers, computer memory etc. 5. Emphasis is on the optimal use of computers by the end users rather than the expert users. Thus, the use of computers by the management staff and directorate staff emerged in the true sense of it, as the computers are being applied to the formulation of strategic plans, sensitivity analysis of the strategic plans, monitoring and controlling of operations by the management staff and directorate staff of corporate organizations. ## System Software The system software is divided into two parts: 1. Operating system 2. Computer language translator #### Operating system: The operating system (OS) is a group of related programs coded by a group of computer programming experts who have a good working knowledge of the art, science, engineering and technology of the computer. The operating system is the executive manager of all of the following resources of the computing system: the input device, output device, computer memory, computer data file, computer program file and even the computer users. It checks all these computing resources during booting. If any of the resource has a major problem, the OS will not make the computer available for human use. The operating system controls the flow of programs and data from one component of the CPU to the other, it controls the input and output devices. It manages the memory (storage facility) of the computer by storing data and program and retrieving them when needed. Indeed, the OS organizes the internal functioning, the running o programs and handling of peripherals. The OS provides a layer of services which manages the resources of the hardware and permit users to drive the computing system. The role of the OS is to complement the hardware. An operating system has the following subsystems * Memory manager * Process manager * Input-output manager * File manager The image shows a block diagram of the Operating System Environment. **Fig 5:** Conceptual Diagram of the Operating System Environment. **The diagram contains:** ALU, Memory, Utility Programs,Translators, VDU, Disk Drive, User Program, Operating System, Keyboard and Printer Each of the subsystems listed above carries out the following functions: * Monitoring its resource continuously * Enforcing the policies that determines who gets the resource and what fraction of the resource to get * Allocating the resource * De-allocating the resource or reclaiming the resource when appropriate. ## Classification of Operating System Operating system can be classified into the following categories: * Single user operating system * Multiple user operating system * Distributed user operating system * Mobile operating system * A single user operating system allows only one program or job to run on a computer at any point in time. That is, while one program is running, any other program will have to wait. You cannot be using word processing and listening to music at the same time. Example of OS in this category are: Microsoft Disk Operating System (MS-DOS) and Microsoft Windows 95. * Multiple user operating system allows two or more programs or jobs to run simultaneously on a computer. Examples of OS in this category are: Personal Computer Multiple users Operating System (PCMOS), Unix Operating System. Note that, there are many variants of unix operating system. * A distributed operating system is a characteristic of computer network environment. It is responsible for managing the computing resources in a computer network environment. Typical network operating systems are Unix, Novell Netware, Windows 7, 8, and 10, Windows NT etc. ## Program Translator The computer program translator is a group of related programs coded by a team of computer programming experts in a bilateral or multilateral agreement with the manufacturer of the computer. The functions of a computer program translator are: 1. Translation of an application program written in a symbolic computer language such as C, C++, Java etc. into a binary language. Note that the natural language of the computer is the binary language; hence the need for a translator. 2. Verification and validation of the correctness of the application program against the syntax, semantics and pragmatics of the language used in coding the program. 3. Resolving any conflicting and ambiguous constructions in the application program. Optimizing the constructions in the application program with a view to minimizing the input and output processing time e.g. Write a program to find an average of four numbers. Suppose an inexperienced programmer codes as follows: $a = x + y + z$ $b = x + y + z + k$ $m = (x + y + z + k) / 4$ $Average = m$ $Stop$ The compiler reconstruct the program as follows: $a = x + y + z$ $b = a + k$ $m = b/4$ $Average = m$ $Stop$ ## Utility Program * In a data processing environment, there are some operations which are commonly carried out by the users. An example of such operations is installation of printers and other devices using drivers. ## Application Program An application program is a program is a program written by a computer programmer in one of the many computer programming languages to carry out a specific task. The specific tasks can be in the form of any of the following 1. Keeping the records of students in a school and generating their report/spreadsheets at the end of the semester Exam processing software. 2. Keeping records of employees in an organization and generating the monthly salaries Payroll 3. Inventory control. ## Software Packages A software package is a set of related programs coded by a group of computer programmers to carry out some tasks that are commonly carried out by the human experts of a given profession. Examples of software packages are: * Microsoft office package * SPSS * Computer aided design (CAD) * Computer aided learning for teachers and students * Computer aided architecture for architects * Computer aided engineering for engineers * Desktop publishing for printers and publishers * Computer aided diagnostics of diseases and therapy for medical doctors Computer aided diagnostics of electronics and electrical faults for electrical and electronics engineers Different type of computer users are Expert users, End users and Casual users.