Lecture intr.pdf
Document Details
Uploaded by IrreproachableZombie9040
Full Transcript
Introduction to Computer Science Lecture 1 Prepared by/ Mosa Elkhedr Course description This course introduces students to the understanding the fundamental concepts of Computer science and the Computer science branches. This course provides stud...
Introduction to Computer Science Lecture 1 Prepared by/ Mosa Elkhedr Course description This course introduces students to the understanding the fundamental concepts of Computer science and the Computer science branches. This course provides students a sound foundation on the basic theoretical and practical principles behind Computer science. An understanding of principles underlying Computers, computer hardware, software, operating system, telecommunications, and networking. Course objective The course will enable students to: 1. Understand computer science and its branches. 2. Understand the hardware, software, and communication infrastructure related to computer systems. 3. Understand Internet and communication concepts. 4. Understand different numbering systems such as binary, octal, and hexadecimal. 5. Understand the concept of an operating system and the services it provides to users. Text books Computing Essentials 2023: Making IT Work for You. By Timothy J. O’Leary, Linda J. O’Leary and Daniel A. O’Leary. Publisher McGraw Hill Education, 2022 Operating System Concepts Essentials, Second Edition, by Avi Silberschatz, Peter Baer Galvin, and Greg Gagne. Publisher John Wiley & Sons, Inc, 2013. Course syllabus The Course Provides the student with basic computer terminology, hardware and software components, and communications technology. The different number systems (decimal, binary, hexadecimal) should be explored. The course should give a tour of the branches of computer science: computer programming, graphics, networks, system analysis and design. This course also focuses on operating systems design and implementation: Basic structure, Process and thread management, process synchronization and communication mechanisms, Memory organization and management, 1/0 device management, secondary and file systems. Prerequisites No Prerequisites Grade Distribution Assessment strategy Max degree Practical exam 10% Midterm 20% Quizzes, Assignments and Class 10% Participation Final Exam 60% Question type (Final exam, Midterm, and Quizzes) Exam will contain the following question type: Question type Max degree Multiple choice questions 20%-30% True or false and Short answer (define) 5%-10% long answer 20%-30% Computational 20%-30% Laboratory works Lab Duration Windows and DOS 4 weeks Microsoft Word 3 week Microsoft Excel 3 weeks Microsoft power point 2 weeks Introduction to computer system A computer system is an electronic device that can accept data, process the data according to specified rules, produce results, and store the results for future use. Data and Information Data is an individual unit that contains raw materials which do not carry any specific meaning. Data is a collection of unprocessed items, which can include text, numbers, images, audio, and video. information is data that has been processed and organized to add meaning and value. Information conveys meaning and is useful to people. Computers process data into information. Data and Information Aspect Data Information Definition Raw and unprocessed Data that has been facts processed, organized, and interpreted State Unorganized, raw, and Structured, meaningful meaningless Example Sky or 'blue‘ or 25 The sky is blue today Information Processing Cycle The Information Processing Cycle is the process that a computer uses to convert data into information. The four steps of the Information Processing Cycle are input, processing, storage, and output. Information Processing Cycle In the input stage, the data is entered into the computer. In the processing stage, Computers process data (input) into information (output). In the output stage, computer takes the information from the processing stage and displays them in a way that the user can see them. A computer often holds data, and information in storage for future use. Components of Computer System A computer system consists of a collection of entities (hardware, software, and liveware) designed to receive, process, manage, and present information in a meaningful format. Components of Computer System Computer hardware: These are the physical and tangible parts of a computer it is the components you can see and touch. Computer software: Also known as programs or applications, they are the programs installed on your computer, but you cannot physically touch them. Software is a set of instructions that tells your PC how to operate. Liveware: Refers to the human users of the computer system, also known as "humanware". The user commands the computer system to execute instructions. Computer hardware There are five main hardware components in a computer system: Input Processing Storage Output Communication devices. Input devices An input device is any hardware component that allows you to enter data and instructions into a computer. There are many examples of input devices such as: Keyboard: The Keyboard allows users to input letters, numbers, and symbols through key presses. Input devices There are many examples of input devices such as: Mouse: A mouse is a small device used to point to and select items on your computer screen. Mouse (mice) has many types such as: Trackball Mouse: It is an input device that has ball mechanism to move the pointer or cursor on the screen. The ball is half inserted in the device and can be easily rolled with finger to move the pointer on the screen. Optical Mouse: is a type of computer mouse that uses a laser to track movement. Input devices There are many examples of input devices such as: Scanner: The scanner uses the pictures and pages of text as input. It scans the picture or a document. The scanned picture or document then converted into a digital format or file and is displayed on the screen as an output. Microphone: The microphone is a computer input device that is used to input the sound. It receives the sound vibrations and converts them into audio signals or sends to a recording medium. Input devices There are many examples of input devices such as: Digital camera: It is a digital device as it captures images and records videos digitally and then stores them on a memory card. Light Pen: A light pen is a computer input device that looks like a pen. The tip of the light pen contains a light-sensitive detector that enables the user to point to or select objects on the display screen. Input devices There are many examples of input devices such as: Optical Character Reader (OCR): OCR computer input device is designed to convert the scanned images of handwritten, typed or printed text into digital text. It is widely used in offices and libraries to convert documents and books into electronic files. Output devices An output device is a hardware component of a computer system that displays information to users. An output device is a computer hardware device that retrieves and presents the result of the inserted input data from the computer system and further translates that data into human-understandable language. The output or result is then presented to us in the form of text, visuals, audio or a hard copy. Output devices There are many examples of output devices such as: Monitor: The monitor displays graphical outputs like the images, video, charts, documents, gaming visuals, and other visual مرئيةinformation. Printer: Printers facilitate hard copy physical output of digital documents, photos, and more onto paper. Speakers: Speakers convert electronic files into audio output like music, voice recordings, and voice calls. Plotter: A plotter is a type of output device that is used to produce high- quality graphics, drawings, or large-format images. Processing (System Unit) Processing devices give computers their problem-solving, calculating, and “thinking” capacities. The system unit is a case that contains electronic components of the computer that are used to process data. The circuitry of the system unit usually is part of or is connected to a circuit board called the motherboard. Processing (System Unit) Motherboard is the hub that connects all the other pieces of computer hardware, acting as the brain to allocate and coordinate power across all other components. Often called the mainboard or system board, it is the main circuit board for the computer system. Every device in the computer system either will be part of the motherboard or connected to it. Two main components on the motherboard are the processor and memory. Motherboard Processor The processor, also called the CPU (Central Processing Unit), is the electronic component that interprets, controls, and carries out the basic instructions that operate the computer. A processor is an integrated circuit (IC) housed on a single silicon chip. It is considered the brain of any computer system because every action of the computer eventually passes through the CPU. Processor A computer processor's speed, or CPU speed, is measured in hertz, which represents clock cycles (or clock ticks) per second. A clock cycle is the time between two pulses of an oscillator. Computer processors can execute one or more instructions per clock cycle, depending on the type of processor. Generally, the higher the number of pulses per second, the faster the computer processor can process information. The clock speed is typically measured in Megahertz (MHz) or Gigahertz (GHz). 1 MHz - One million clock ticks every second 1 GHz - One billion clock ticks every second CPU structure A typical CPU has three major components: 1. register set 2. arithmetic logic unit (ALU) 3. CPU buses 4. control unit (CU). Arithmetic and Logical Unit Arithmetic and Logical Unit (or ALU) performs arithmetic and logical functions. The arithmetic functions are addition, subtraction, multiplication division, and comparisons, whereas the logical functions mainly include AND, OR, NOT, selecting, comparing, and merging the data. The complex operations are performed by making repetitive use of the operations mentioned above. ALU is the key part of the CPU. Control Unit Control unit controls the operations of all parts of the computer but it does not carry out any data processing operations. It instructs the computer by using the electrical signals to instruct the computer system. It takes instructions from the memory unit and then decodes the instructions after that it executes those instructions. Its main task is to maintain the flow of information across the processor. Control Unit Some main functions of the control unit are listed below: Controlling of data and transfer of data and instructions is done by the control unit among other parts of the computer. The control unit is responsible for managing all the units of the computer. The main task of the control unit is to obtain the instructions or data that is input from the memory unit, interpret them, and then direct the operation of the computer according to that. The control unit is responsible for communication with Input and output devices for the transfer of data or results from memory. Registers Registers are a type of computer memory built directly into the processor or CPU that is used to store and manipulate data during the execution of instructions. A register may hold an instruction, a storage address, or any kind of data. CPU Buses CPU Buses refer to the communication pathways that transmit data, control signals, and memory addresses between different components within the central processing unit (CPU). Types of CPU We have many different types of CPU: Single Core CPU: The oldest type of computer CPU is a single-core CPU. A single-core CPU has only one processing unit or core. It can execute one task at a time, making it less efficient for multitasking compared to multi-core processors. Example of Single Core CPU is Intel Pentium 4. Dual-Core CPU: Dual-Core CPUs contain a single Integrated Circuit with two cores. A dual-core CPU has two cores, which allows it to execute two tasks simultaneously, improving multitasking and overall performance. Example of Dual Core CPU is Intel Core 2 Duo. Types of CPU We have many different types of CPU: Quad-Core CPU: Quad-Core CPUs contain two dual-core processors present within a single integrated circuit (IC) or chip. A quad-core processor contains a chip with four independent cores. Quad Core CPU increases the overall speed of programs. Example of Quad Core CPU is Intel Core i3. Hexa Core CPU: this CPU has six cores. They can execute the tasks with much more speed and efficiency. The speed, clock speed is much more as compared to the previous processors. This CPU is capable for ideal tasks like video editing, scientific simulations, gaming without lagging. Example of Hexa Core CPU is Intel Core i5 Types of CPU We have many different types of CPU: Octa Core CPU: this CPU comprises eight cores. It basically comprises of two Quad cores. The speed is of another level and it is also known as dual quad processor. It can handle multi threaded jobs efficiently. Example of octa Core CPU is Intel Core i7 Deca Core CPU: The word Deca means ten. In this CPU there are 10 cores. This is the most fastest CPU capable of doing multi tasking and parallel computing at an advanced level. Each core has the capacity to perform tasks simultaneously. This core is also implemented in smartphones for enhanced video editing, gaming as this CPU does not cause the device to lag. Example of octa Core CPU is Intel Core i9 Storage Computer storage refers to the devices and technologies that store data and programs in a computer system. It is a fundamental aspect of computing, enabling the retrieval of data when needed. Storage can be divided into three broad categories: primary storage ROM secondary storage. Primary Storage (Volatile Memory) Primary storage, also known as main memory, is the area in a computer where data is temporarily held while being processed. It is fast and directly accessible by the CPU but is volatile, meaning it loses its contents when the computer is powered off. The two main types of primary storage are: RAM (Random Access Memory): RAM is used to temporarily store the data and instructions that the CPU is currently using. The more RAM a computer has, the faster it can perform tasks since more data can be loaded for immediate access. Cache Memory: Cache is a smaller, faster type of memory located inside or near the CPU. It stores frequently used data to reduce the time the CPU spends fetching data from slower memory. ROM (Read-Only Memory) ROM is a type of non-volatile memory, meaning it retains its data even when the computer is powered off. ROM is primarily used to store firmware, the essential software that is permanently programmed into the hardware. This includes the instructions needed for the computer to start up and initialize the operating system. Unlike RAM, the contents of ROM cannot easily be modified or erased. There are six types the ROM (Read-Only Memory): Mask ROM: Manufactured with fixed data written during the fabrication process. Cannot be programmed or write on it. Used for specific applications where the data does not need to be changed. PROM (Programmable Read-Only Memory): Can be programmed once after manufacturing. Once data is written, it cannot be altered or erased. EPROM (Erasable Programmable Read-Only Memory): Can be erased using ultraviolet light. Allows for reprogramming after erasure, making it more flexible than PROM. There are six types the ROM (Read-Only Memory): EEPROM (Electrically Erasable Programmable Read-Only Memory): It can be erased and reprogrammed electrically, but only by the byte. Allows for multiple write and erase cycles, making it suitable for applications that require updates. Flash Memory: A type of EEPROM that can be erased and reprogrammed in blocks rather than one byte at a time. Flash memory offers quicker read and write speeds compared to traditional hard disk drives (HDDs). Commonly used in USB drives, SSDs, and memory cards. There are six types the ROM (Read-Only Memory): NVRAM (Non-Volatile Random Access Memory): Combines features of RAM and ROM, providing fast access times along with non-volatility. Retains data when power is turned off and can be read and written like RAM. Fast Read/Write Speeds: NVRAM typically offers faster access times than other non-volatile storage options like HDDs and SSDs. Secondary Storage (Non-Volatile Memory) Secondary storage is where data is stored on a long-term basis. This type of storage is non-volatile, meaning it retains data even when the computer is turned off. Secondary storage is slower than primary storage but is essential for preserving data permanently. Secondary Storage (Non-Volatile Memory) Examples of secondary storage include: Hard Disk Drives (HDDs): HDDs use magnetic storage to read and write data on spinning disks. Theyhave large storage capacities and are typically used for storing the operating system, software applications, and user files. Solid-State Drives (SSDs): SSDs are faster and more durable than HDDs because they have no moving parts. They use flash memory to store data and provide quicker access times, making them ideal for systems requiring speed, like gaming PCs and workstations. Secondary Storage (Non-Volatile Memory) Examples of secondary storage include: OpticalDiscs: These include CDs and DVDs, which use laser technology to read and write data. USB Drives and Memory Cards: Portable storage devices that use flash memory for convenient data transport and backup. Cloud Storage: A newer form of storage, cloud storage involves storing data remotely on servers accessed via the internet. This allows users to store and retrieve files from anywhere, provided they have internet access. Unit of measurements Units of a computer system and memory measurement are used to quantify the amount of data that can be stored or processed by a computer system. The basic units include bits, bytes, kilobytes, megabytes, gigabytes, terabytes, petabytes, exabytes, and even zettabytes. Unit of measurements Unit Abbreviation Value Bit Bit Bit is the smallest storage unit for data, showing either a 0 or 1 in binary form. Nibble - A group of 4 bits is called nibble. Byte B A group of 8 bits is called byte. A byte is the smallest unit, which can represent a data item or a character. Kilobyte KB 1 KB = 1024 B Megabyte MB 1MB = 1024 KB Gigabyte GB 1 GB = 1024 MB TeraByte TB 1 TB = 1024 GB PetaByte PB 1 PB = 1024 TB Exabyte EB 1 EB = 1024 PB Zettabyte ZB 1 ZB = 1024 EB Unit of measurements Word (W) A computer word is a group of fixed number of bits processed as a unit, which varies from computer to computer but is fixed for each computer. The length of a computer word is called word-size or word length. It may be as small as 8 bits or may be as long as 96 bits. Examples Examples 1: Convert 3.5 megabytes (MB) to kilobytes (KB). Solution 1 MB = 1,024 KB 3.5 × 1,024=3,584 KB Examples Examples Communications Devices A communications device is a hardware component that enables a computer to send (transmit) and receive data and information to and from one or more computers or mobile devices. A widely used communications device is a modem. Communications occur over cables, telephone lines and internet cables. Some transmission media, such as satellites and cellular radio networks, are wireless, which means they have no physical lines or wires. Communications Devices Here are some common types of communication devices: Modems: convert digital signals from a computer into analog signals for transmission over telephone lines and vice versa. Network Interface Cards (NICs(: Hardware components installed in computers or devices that enable them to connect to a network. Types: Wired NICs: Connect via Ethernet cables. Wireless NICs: Enable Wi-Fi connectivity. Networks and the Internet A network is a collection of computers and devices connected together, often wirelessly, via communications devices and transmission media. Networks allow computers to share resources, such as hardware, software, data, and information. Sharing resources saves time and money. The Internet is a worldwide collection of networks that connects millions of businesses, government agencies, educational institutions, and individuals. System buses System Buses are communication pathways that connect various components of a computer system, allowing data, instructions, and control signals to be transmitted between the CPU, memory, and peripheral devices. System buses are typically divided into three main types: Data Bus: Carries the actual data being transferred between the CPU, memory, and peripherals. The width of the data bus (measured in bits) determines how much data can be transferred at a time. Address Bus: Transmits memory addresses that specify where data is to be retrieved from or stored. The width of the address bus defines the system's maximum memory capacity. Control Bus: Sends control signals from the CPU to coordinate operations across the system, such as reading or writing data, and managing data flow. Major Functions of Computer System The core functions of a computer system are: Data movement (input): A computer accepts the command and/or data as input given by the user. Storage: A computer follows the instructions and stores the data given by the user. Processing: A computer processes the data as per the instructions given by the user. Data movement (output): A computer gives the desirable results in the form of output. Control: Coordinating hardware components to properly execute input, processing, output and storage tasks. Output devices