Introduction to Computer Science PDF

Summary

This document provides an introduction to computer science, covering topics such as computer hardware, computer software, and the different generations of computers. It includes details on computer components, the Von Neumann Architecture and information representation.

Full Transcript

CHAPTER 1 INTRODUCTION TO COMPUTER SCIENCE 1. Introduction Computer science definition:Computer science is the study of computers, including hardware and software design, algorithms and programs as well as their theoritical and practical applications. Computer...

CHAPTER 1 INTRODUCTION TO COMPUTER SCIENCE 1. Introduction Computer science definition:Computer science is the study of computers, including hardware and software design, algorithms and programs as well as their theoritical and practical applications. Computer (PC): is a machine used for storing and processing automatically data, typically in binary form according to instructions introducing to it in programs Data Processing Results (Input) (computer) (output) Computers history and generations:  It was in 1642 that the philosopher and mathematician Blaise Pascal built the first calculating machine (the Pascaline),  Between 1834 and 1836, Babbage designed a machine resembles that of modern computers; instructions are transmitted to it, operations were running and numbers can be stored (memory). Before the generation of computers, we used calculators, mathematicians and inventors searched for solutions to ease the burden of calculation. Authors classiffy computers generations switsh of the technology used to 5 generations: – First Generation vaccum tube based. ENIAC: Electronic Numerical Integrator and Computer, built by J. Presper Eckert and John V. Mauchly was the first electronic computer but it was very slow and very large machine. Used binary programming language. – Second Generation: Transistors based. Caracterised by the use of the programming languages: FORTRAN – Third Generation Integrated Circuits based. Used High-level language: Basic, Pascal, C. – Fourth Generation: Microprocessors based. Microprocessor provided smaller size of computers, with larger capacities. Exemple: Apple Macintosh, IBM PC. – Fifth Generation: Artificial Intelligence. Exemple :Smartphone, laptops. 2. Computer components Computer Hardware and Software are the principal components of a computer that make it compatible with the user. 2.1. Computer Hardware Is the physical components of a computer. it is practically composed of two essential parts: Motherboard : is the main circuit of board in a computer. It serves as a single plateform to connect all electrical components of a computer together, Peripherals: are devices which user can communicate and interact with the computer. 2.1. 1. Motherboard components A. Processor: is considered as the brain of the computer that performs all types of data processing operations. It is characterized by its brand (Intel486, Intel Pentium, Intel Pentium II, Intel Pentium III, Cyrix,..), and its frequency. Its frequency characterizes the number of operations it can perform in one second measured in Hertz. B. Memory: stores all the data and the instructions needed for processing. we distinguish two types: 2.1. 1. Motherboard components - RAM (Random Access Memory): It can be read and changed in any time. Its contents are deleted when you turn off the computer. - ROM (Read Only Memory): user can not modify it. It contains the first program read by the computer when it is started BIOS (Basic Input Output System) 2.1. 2. Peripherals Are classified through communication senses into input, output and stored devices. A. Input devices: are those devices which a user can enter data into a computer. Ex: Keyboard, Mouse, Webcam, Scanner, Microphone. B. Output devices: are those devices which allow the processing results to be retrieved from the central processing unit. output can be in different form: image, sound, script, video..; examples: Monitors, Printers, Speakers, Graphic card. C. Storage devices: also known as input/output devices: they are used for storing data. Example: CDs, DVDs, Hard disk, USB Flash Drive (memory stick). 2. 2. Computer Software Software is a set of instructions, data or programs used to execute specific tasks. We distinguish two types:  Basic software (operating systems). Examples :Windows, Unix Application software: Examples Word, Excel, MSN. 2. 2. Computer Software An operating system: It ensures the connection between users, applications and the material resources of the computer. It allows management, backup and organization of information by means of a user interface understandable by humans (texts, icons, images, graphs, etc.), those informations are recorded in the form of files that we usually stored in folders. Like all programs, the operating system is loaded into RAM to be executed. 2. 2. Computer Software Application software: Application software is a set of executable programs specially written for an operating system, and which allow you to perform all types of functions: Examples: word, games, Programming language that are languages used by software developers for the purpose to write programs like C, Java... 3. The Von Neumann Architecture During the execution of a program, instructions and data reside in memory. The instructions are fed one by one to the control unit which initiates the appropriate processing by sending signals to the ALU. The bus: the processor communicates with memory and peripherals via a bus. The register: is a special element of memory integrated into a microprocessor and designed to carry out particular processing, receiving addresses and data stored during the execution of a program. The control unit: triggers the execution of the program, indicates the type of operation to the ALU and stores the result in central memory. The processing unit ALU: directed by the control unit to perform arithmetic and logical operations. Memory: Made up of memory boxes of fixed size, each stores a unit of information in n bits (the word). In a memory of size N, we have N boxes and each location is identified by a unique number called address, this address contains the position of the information. If we have a 4-bit binary address then we will have a memory that can hold 24 memory locations. The units of measurement of a memory are: 4. Information representation and basic conversion The calculations used naturally for counting are performed in the decimal number system: 10 states. On the other hand, the electronic computer cannot use this system because the electronic circuit does not allow it (signal passes 1 or does not pass 0 ). So, the binary number system will only have 2 states 0 and 1 and imanipulated informations (numeric, textual, images, sounds, videos, etc.) is represented by sequences of : 0 and 1. 4.1. The coding system: We can represent a word or number by the ordered juxtaposition of symbols taken from a set. In a base B numbering system, a number denoted 𝑁(B) is represented as follows: 𝐵 : System basis. 𝑎𝑘 : System symbols. Example : 348 (10) = 8. 100 + 4. 101 + 3. 102 4.2 Basic numeration systems: There are several numeration systems: - The decimal system (B=10) which is used and practiced in our daily life. It uses 10 digits: {0, 1, 2, 3, 4, 5, 6, 7, 8, 9} - The binary system (B=2) which is used by computers. This system uses 2 digits {0, 1}. - The octal system (B=8): uses 8 digits: {0, 1, 2, 3, 4, 5, 6, 7}. - The hexadecimal system (B=16): uses 16 digits: {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F}. 4.3. Correspondence tables Octal Binary 0 000 1 001 2 010 3 011 4 100 5 101 6 110 7 111 Hexadecimal binary decimal 0 0000 0 1 0001 1 2 0010 2 3 0011 3 4 0100 4 5 0101 5 6 0110 6 7 0111 7 8 1000 8 9 1001 9 A 1010 10 B 1011 11 C 1100 12 D 1101 13 E 1110 14 F 1111 15 4.3. Conversions (Basic changes): 4.3.1. Converting number in any base to a decimal base number: It is obtained by the polynomial form already seen: Binary : 1101(2) = 1.20 + 0.21 +1.22 +1.23 =13(10) Octal: 275(8) =5.80+7.81+2.82 =189 (10) Hexadecimal : Basis 𝐵=16 and we have 16 symbols : 0, 1, 2, ….., 9, A, B, C, D, E, F. 5𝐴𝐹(16) = 𝐹.160 + 𝐴.161 + 5.162 =15.1 + 10.16 +5.162 =1455(10) 4.3.2. Converting a decimal number to number in any other base Method: To express a decimal number in a base B, we successively divide this number by B until the quotient obtained is equal to 0. The number in the base B will be the remainders of these divisions read from bottom to top.Example: 𝑌=115(10), converting in binary? 115 (10) = (1110011)2 Examples Let the number 𝑌=125 (10), convert this number to octal. Let the number : 𝑌=2596 (10) Y= A24 (16) 4.3.3. Relationship between a binary number and an octal number There is an equivalence relationship between the two binary and octal systems which allows you to move from one system to another without going through the decimal system. This property consists of expressing each octal character using three binary informations. Exemples Exemple 1: 101 100 (2) =?(8) 5 4 (8) Exemple 2: 5 7 3 0 (8) = ? (2) 101111011000 (2) 4.3.4. Relationship between a binary number and a hexadecimal number There is an equivalence relationship between the two binary and octal systems which allows you to move from one system to another without going through the decimal system. This property consists of expressing each hexadecimal character using four binary informations Exemples Exemple 1: 101 1111 1000 0001(2) =?(16) 5 F 8 1 (16) Exemple 2: 9 C D 8 (16) = ? (2) 100111001101 1000 (2) 4.3.5. Converting an octal number to a hexadecimal number and vice versa : You must go through the binary system before going from an octal system to hexadecimal (or from a hexadecimal system to the octal system). Example 1: converting this number 2B (16) to octal ? Example2: converting this number 53 (8) to hexadecimal? 4.4. Arithmetiques operqtions in binary The procedure is the same as in base 10. 4.4.1The addition: We add base 2 numbers as follows: 0+0=0 0+1=1 1+0=1 1+1= 10 (we set 0 and retain 1) 1+1+1= 11 (we set 0 and retain 1) Example: 101 +111=1100 4.4.2. The multiplication: it’s simple, we only multiply 0 and 1 Example: 101 *10 = 1010 4.4.3 The subtraction: We proceed as in decimal. When the quantity to be subtracted is greater than the quantity from which we subtract, we borrow 1 from the left neighbor; In binary, this 1 adds 2 to the quantity from which we subtract while in decimal it adds 10 as follows: 1- 1=0 1- 0=1 0- 0=0 0-1= 1 (borrowing 1) Example: 11011 – 1101 = 01110 references https://www.mastersindatascience.org/learning/what-is-computer-science/ A Brief History of Computer Generations” by Techopedia: https://www.techopedia.com/definition/29078/computer-generation “Computer Generations” by GeeksforGeeks: https://www.geeksforgeeks.org/computer-generations/ “History of Computers: A Brief Timeline” by Live Science: https://www.livescience.com/20718-computer-history.html “The Five Generations of Computers” by Lifewire: https://www.lifewire.com/generations-of-computers-3734024 “History of Computers – A Look at Generations” by ThoughtCo.: https://www.thoughtco.com/generations-of-computers-373308 https://learnlearn.uk/alevelcs/von-neumann-architecture/ El-Otmani Anouar 2009. “ L’ordinateur Et Ses Constituants”. https://sites.google.com/site/otmani1981/l-ordinateur-et-ses-constituants. Laurent Poinsot. UMR 7030 - Université Paris 13 - Institut Galilée Cours “Architecture et Système”. https://lipn.univ- paris13.fr/~poinsot/save/L2%20Archi/Cours/Cours%202%20-%20Print.pdf Ph. Gabini. 2009. “Organisation des ordinateurs et assembleur. Structure et fonctionnement d’un ordinateur”. https://info.uqam.ca/~privat/INF2170/notes_de_cours/ndc02- structure_fonctionnement.pdf https://keytosmart.com/operating-systems/units-of-computer-memory- measurements/

Use Quizgecko on...
Browser
Browser