Information Technology Essentials (AI101) Course Reader - Fall 2024 PDF
Document Details
Uploaded by Deleted User
ENSIA
2024
Dr. Karim Lounis
Tags
Summary
This course reader, titled Information Technology Essentials (AI101), is for first-year students at ENSIA (National School of Artificial Intelligence), Algeria. Fall 2024 version 1.0. The reader covers core IT concepts, and provides supplementary materials, exercises, and resources to enhance student understanding.
Full Transcript
Information Technology Essentials (AI101) Course Reader Dr. Karim Lounis Fall 2024 1 Preface We live in an era undeniably shaped by technology. From the smartphones in our pockets to the complex systems that power global economies, infor- mation techn...
Information Technology Essentials (AI101) Course Reader Dr. Karim Lounis Fall 2024 1 Preface We live in an era undeniably shaped by technology. From the smartphones in our pockets to the complex systems that power global economies, infor- mation technology (IT) is the backbone of our modern world. This course is designed to equip you with the foundational knowledge necessary to under- stand, navigate, and contribute to this digital landscape. By exploring the core concepts of IT, you will develop a strong under- standing of how technology works and how it impacts our lives. This knowl- edge will be invaluable as you pursue your academic and professional goals. Whether you aspire to be a software engineer, a data analyst, an artificial intelligence engineer, an IT entrepreneur, or simply a tech-savvy citizen, a solid foundation in IT is essential. The course of Information technology Essentials, or simply ITE, will serve ENSIA first year students as a gateway to a world of endless possibilities. You will learn how to think critically about technology, solve problems creatively, and collaborate effectively in digital environments. As you master these skills, you will be empowered to not only consume technology but also to shape its future by innovating solutions to the challenges of our time. This course reader is designed to complement your learning experience in the ITE course. It provides supplementary materials, exercises, and re- sources to reinforce the core concepts covered in class. Each section of this document aligns with the course syllabus, offering additional insights, prac- tical examples, and hands-on activities to enhance your understanding and allow you to build strong foundational knowledge in this field. This is the first version of the document — v1.0. 2 About the Author Dr. Karim Lounis is an Assistant Professor at the National School of Arti- ficial Intelligence (ENSIA), Sidi AbdAllah, Algeria. He obtained his Ph.D. degree in computer science from Queen’s University, Canada, in 2020. He received a first master’s degree in Networks and Distributed Systems from the University of Science and Technology Houari Boume- diene (USTHB), Algeria, in 2013, and a second master’s degree in Security of In- formation Systems from the University of East-Paris Creteil (UPEC), France, in 2014. Also, he obtained his Licence degree in Networks and Telecommunication Engineer- ing from USTHB, Algeria, in 2011. After completing his second master’s degree, he worked as a Research Assistant on informa- tion security with the system security group (CISPA—Center for IT-Security, Privacy and Accountability), Saarland Uni- versity, Germany, between 2014 to 2015, and then with the security and trust of software systems group (SnT—Interdisciplinary Centre for Security, Reli- ability and Trust), University of Luxembourg, Luxembourg, between 2015 to 2017. He was a Postdoctoral fellow and a teaching adjunct at the School of Computing (Queen’s University — Canada) from 2020 to 2021. His research interests include information security, networks security, and IoT security. 3 Contents 1 About the Course 2 1.1 Course Syllabus.......................... 2 1.2 Prerequisites............................ 2 1.3 Learning Objectives........................ 3 1.4 Teaching Team.......................... 4 1.5 Course Delivery.......................... 4 1.6 Course Textbook......................... 5 1.7 Course Schedule.......................... 5 1.8 Method of Evaluation....................... 5 1.9 Students with Disabilities.................... 6 1.10 Recommendation Letters and Student Support......... 6 1.11 Academic Integrity........................ 7 1.12 Intellectual Property....................... 8 2 Introduction to Information Technology 9 2.1 Data and Information....................... 9 2.2 Information Technology..................... 11 2.3 Information and Communication Technology.......... 13 2.4 Importance of Information Technology............. 14 2.4.1 Real-World Relevance.................. 14 2.4.2 Connection with your Interest.............. 19 2.4.3 Career Opportunities................... 19 2.4.4 Challenges and Curiosity................. 21 2.4.5 Information Technology Breakthroughs......... 24 2.5 Issues in Information Technology................ 28 4 3 Fundamentals of Computing 30 3.1 Systems.............................. 30 3.2 Computers............................. 32 3.3 Algorithms............................. 35 3.4 Computer Program........................ 47 3.5 Programming Languages..................... 48 3.6 Binary Language......................... 52 3.6.1 Addition in Binary System................ 53 3.6.2 Substraction in Binary System.............. 54 3.6.3 Character Encoding in Binary System......... 56 3.7 Compiler.............................. 60 3.8 How to Write my First Program................. 62 4 Computer Architecture 65 4.1 Computer Components...................... 65 4.2 Von Neumann Architectural Model............... 66 4.3 Central Processing Unit..................... 68 4.3.1 CPU Characteristics................... 69 4.3.2 CPU Structure...................... 73 4.3.3 Processor Instruction Set................. 73 4.3.4 Machine Code....................... 77 4.3.5 Instruction per Clock Cycle............... 78 4.3.6 Single and Multiprocessors Systems........... 80 4.4 Central Memory.......................... 83 4.4.1 Memory Classification.................. 84 4.4.2 Memory Interface..................... 84 4.4.3 Permanent and Backup Storage Memories....... 86 4.5 I/O Devices............................ 89 4.5.1 Computer Ports, Sockets, and Connectors....... 90 4.5.2 Computer I/O Devices Ports............... 92 4.6 Choosing my Computer..................... 93 4.7 Brief History of Computers................... 95 4.8 Type of Computers........................ 99 4.9 Computers, Single-board computers, and Microcontrollers... 101 5 Software Systems 103 5.1 Software.............................. 103 5.2 Software Library......................... 104 5 5.3 Process and Threads....................... 105 5.4 Type of Software......................... 106 5.5 Software Development Life Cycle................ 107 5.6 Open-Source and Proprietary Software............. 111 5.7 Software License......................... 111 5.8 Software Ethics.......................... 112 6 Operating Systems 114 6.1 Operating System......................... 114 6.2 Operating System Services.................... 116 6.3 Types of Operating Systems................... 116 6.4 Booting an Operating System.................. 118 6.5 Unix and GNU/Linux Operating System............ 119 7 Standardization in Information Technology 123 7.1 Standardization.......................... 123 7.2 Importance of Standardization.................. 124 7.3 Standardization Bodies...................... 126 7.4 Type of Standards........................ 128 7.5 Standards in Information Technology.............. 128 8 Computer Networks 130 8.1 Networks.............................. 130 8.2 Network Characteristics..................... 133 8.3 Computer Network........................ 134 8.4 Communication Mechanism................... 135 8.5 Addressing Computers in a Network.............. 137 8.5.1 IP Address........................ 137 8.5.2 MAC Address....................... 138 8.5.3 Socket........................... 139 8.5.4 Addressing Modes.................... 139 8.6 Structure of a Packet....................... 140 8.7 Encapsulation and Decapsulation................ 140 8.8 Communication Protocols.................... 141 8.9 Networking Devices........................ 146 8.10 Wi-Fi Networks.......................... 153 8.11 Network Topologies........................ 154 8.12 Network Coverage......................... 156 6 8.13 Network Communication Technologies............. 156 8.14 Internet.............................. 158 9 Web Technology 159 9.1 Search Engines.......................... 159 9.2 Web................................ 161 9.2.1 Webpage, Website, and Webserver............ 161 9.2.2 Web Generations..................... 162 9.3 Web Search Engine........................ 162 9.3.1 Types of Web Search Engines.............. 163 9.3.2 Web Search Engine Mechanism............. 164 9.4 Web Cookies........................... 165 9.5 HyperText Markup Language (HTML)............. 166 9.5.1 Creating my Website................... 166 9.5.2 HTML Coding...................... 168 9.5.3 HTML Head Section................... 169 9.5.4 HTML Body Section................... 169 9.5.5 HTML Hyperlinks.................... 171 9.5.6 HTML Multimedia Contents............... 173 9.5.7 HTML Elements Listing................. 176 9.5.8 HTML Text Formatting................. 177 9.5.9 HTML Tables....................... 179 9.5.10 HTML Background Painting............... 179 9.5.11 HTML Metadata..................... 181 9.5.12 HTML iFrame (Deprecated)............... 181 9.5.13 HTML Buttons...................... 183 9.5.14 HTML Forms and Input Elements............ 184 9.5.15 HTML Framesets (Deprecated)............. 189 9.6 eXtensible Markup Language (XML).............. 191 9.7 Cascaded Style Sheet (CSS)................... 193 9.7.1 Embedding CSS Code.................. 193 9.7.2 CSS Selectors and Attributes.............. 195 9.7.3 CSS Text Fonts...................... 198 9.7.4 CSS Element Borders................... 198 9.7.5 CSS Content Background................ 200 9.7.6 CSS Margins and Division Boxes............ 202 9.7.7 CSS Floating Objects................... 204 9.7.8 CSS Element Positionning................ 204 7 9.7.9 CSS Pseudo-Classes.................... 210 9.7.10 CSS Element Shadowing................. 212 9.7.11 CSS Element Transformation.............. 213 9.7.12 CSS Animation...................... 215 10 Trends in Information Technology 217 10.1 Virtualization and Containerization............... 217 10.1.1 Virtualization....................... 218 10.1.2 Use of Virtualization................... 218 10.1.3 Hypervisors........................ 220 10.1.4 Issues of Virtualization.................. 220 10.1.5 Containerization..................... 221 10.2 Cloud Computing......................... 222 10.3 Internet of Things......................... 224 10.4 Information Technology Security................. 225 10.4.1 Security Threads..................... 226 10.4.2 Security Aspects..................... 227 10.4.3 Fundamental Security Services.............. 228 10.4.4 Malware.......................... 229 10.4.5 Recent Cyberattacks................... 230 10.4.6 Protection Mechanisms.................. 233 10.5 Artificial Intelligence....................... 234 10.5.1 Machine Learning..................... 234 10.5.2 Deep Learning....................... 236 10.5.3 Recent Mind-Blowing AI Applications......... 237 11 Exercises 239 Chapter 1 About the Course 1.1 Course Syllabus This course introduces the foundations and essentials of information technol- ogy (IT). It presents the basic concepts, notions, and terminologies related to information technology aiming at providing students with a strong founda- tion in computer science for an effective use of computer-based information systems. There will be a particular emphasis on computer systems, operating systems, networks, and WEB technologies. Also, the course covers the latest and various technological trends, including but not limited to, virtualization, the Internet of Things, cloud computing, cybersecurity, artificial intelligence, and quantum computing. This course is intended for students with little or no background in computer technology. 1.2 Prerequisites Simply void. As mentioned in the previous section, this course is intended for students with little or no background in computer technology. 2 1.3 Learning Objectives By the end of this course, students will: Throughout the lectures: – Learn the foundations of computing and information technology. – Learn and acquire basic understanding of computer systems, in- formation systems, and information technology. – Learn the foundation of programming — from understanding prob- lems (decidability and computability), to designing algorithms, to writing computer code. – Learn and understand how different software are made and how they should be ethically used. – Learn the foundation of telecommunication networks and exiting communication technologies. – Learn the different computing and computer paradigms. – Get familiar with the latest trends in information technology (e.g., Internet, social network, IoT, AI, cybersecurity, etc). Throughout the labs: – Learn the basic components of various types of computer systems. – Learn how to use basic software systems and applications. – Learn and get familiar with office suite (Word and Excel). – Learn how to write high-quality documents using Latex. – Learn how to use common software development and managment tools, e.g., Github. – Learn how computers work and how programs are executed. – Learn how to use a programming language and write computer code. 3 1.4 Teaching Team The course will be managed by the following faculty members: Delivering lectures (head of the course): – Dr. Karim Lounis: Assistant Professor (MCB). Delivering labs: – Dr. Seif Eddine Bouziane: Assistant Professor (MCB). – Dr. Hicham Deghbouch: Assistant Professor (MAB). – Dr. Zouhyer Tamrabet: Assistant Professor (MAB). 1.5 Course Delivery During an academic week, the course will run as follows: Lectures. Lectures are weekly held for 15 weeks in an amphitheater. Week 8 is reserved for a midterm exam. Lecture sessions run for 90 minutes. Lecture slides will be posted on the course website after the lecture, and sometimes before the lecture. Labs. These are practical sessions that run for 90 minutes. During these sessions, you’re gonna be using computers and software to per- form basic information technological tasks (e.g., writing computer code, exploring the components of a computer, discovering new technologies). Office Hours. If you had questions and needed further clarification about the lecture slides, or the labs, then office hours will be the perfect location for you to get your questions answered and clarified. They are held every week by each member of the teaching team. According to Article 17 — Resolution No 499 — April 09th, 2023, the course lectures and the labs can be delivered either in-person or remotely. This should be decided by the teaching team members (cf., previous section). 4 1.6 Course Textbook In this course, we do not impose students to acquire a specific textbook. However, we do recommend having access to some interesting books as ad- ditional resources for the course. Below is a list of books that quite related to the course: Information Technology: An Introduction for today’s digital world, by Richard Fox, CRC Press, 2nd edition. Schneider’s Invitation to Computer Science, by G. Michael Schneider and Judith L. Gersting, 8th edition. Information Technology Essentials, by Eric Frick, Volume 1 or 2. How Computers Works: The Evolution of Technology, by Ron White, 10th edition. How the Internet Works, by Gralla Preston, QUE Corporation, 8th edition 1.7 Course Schedule The schedule of lecture topics is approximate, and may be adjusted slightly during the semester. You can access the full timetable in the course website at: https://sites.google.com/ensia.edu.dz/ai101-F24. 1.8 Method of Evaluation The course grade will be calculated based on the following inputs: CE (Continuous Evaluation). During lab session, the concerned instructor will assign marks to students based on their participation and work in the session (cf., Article 18 — Resolution No 499 — April 09th, 2023 ). This evaluation is worth 5% of the total course mark. 5 A student who has accumulated three (03) unjustified absences, or five (05) justified absences in the course (in particular, during lab sessions), will be considered as expelled from the class and will automatically be assigned a zero mark in the course for the runnig semester (cf., §2 — Article 18 — Resolution No 499 — April 09th, 2023 ). Quizzes. There will be online weekly quizzes (worth 08%). Project. There will be a group project (worth 07%). Midsemester exam. There will be one 1h-exam (worth 20%). Final Exam. There will be a 120-minute final exam (worth 60%). After each exam (midsemester or final), the course main instructor must communicate to the student the solution of the exam along with the marking scheme (cf., Article 34 — Resolution No 499 — April 09th, 2023 ). Also, the instructor will coordinate with the school administration to organize a review session where students can have access to their exam papers to review the marking, cf., Article 35 — Resolution No 499 — April 09th, 2023 ). 1.9 Students with Disabilities If you have a disability that may impact your ability to carry out assigned course work, it is important that you contact me and the administration. We will review your concerns and determine, with you, appropriate and nec- essary accommodations. All information and documentation of disability is confidential. 1.10 Recommendation Letters and Student Support I strongly advice students to get in touch with their instructor as soon as possible when facing difficulties. Due to school regulations, late actions taken by students (e.g., justifying absences) may lead to bad consequences (e.g., not being able to rewrite an exam). Use office hours or reach out by email to set up an appointment and discuss your issues. You should not let your problems accumulate till the end of the semester or academic year. 6 If you need a recommendation letter from me to study abroad, you must have taken at least three courses with me (and me being your main instruc- tor (Lecturer) in the course) and have obtained at least a 14.50 grade in my course. This will allow me to fairly and concisely write a correct recommen- dation letter for you. 1.11 Academic Integrity In this course, the principle of academic integrity relies on six core values: honesty, trust, fairness, respect, responsibility, and courage (see AcademicIn- tegrity.org). These values are crucial and key to the development, enrich- ment, and sustainability of an academic community in which all members succeed and prosper. By taking this course, you are responsible for familiarizing yourself with the regulations concerning academic integrity and for ensuring that your assignments conform to the principles of academic integrity. Departures from academic integrity include plagiarism, use of unautho- rized materials, facilitation, forgery, and falsification, and are antithetical to the development of an academic community at the National School of Artificial Intelligence. Given the seriousness of these matters, actions that contravene the regulation on academic integrity may carry sanctions that are decided by the disciplinary committee (following an AI panel —— Academic integrity panel). These sanctions can range from a warning to the loss of grades on an assignment to the failure of a course (assigned an eliminatory grade), to a requirement to withdraw from the school. Although collaboration between students in discussing and understanding ideas related to this course is encouraged, violation of the following regula- tions will not be tolerated: R1. Always properly acknowledging all sources of information used or referred to in your own academic work (e.g., project proposal, project report, research paper, etc). You may need to obtain permission for using particular artifacts. R2. Never seeking to obtain an unfair advantage for yourself or another in any form of academic work or examination (e.g., during an exam, when the proctor asks you to drop your pencils or pens, you must comply for the sake of fairness). 7 R3. Collaborating with others when appropriate but always producing your own work independently when required. R4. Never obtaining unauthorized external assistance in the creation of academic work (e.g., expert assistance during a project). R5. Always present accurate data and information in your academic work (i.e., declaring false information and data is not tolerated). 1.12 Intellectual Property Students should be aware that this course contains the intellectual property of their instructor. Intellectual property includes items such as: Lecture content, spoken and written (and any audio/video recording thereof); Lecture handouts, presentations, and other materials prepared for the course (e.g., slides); Questions or solution sets from various types of assessments (e.g., as- signments, quizzes, midterm exams, final exams); and Work protected by copyright (e.g., any work authored by the instruc- tor). Course materials and the intellectual property contained therein, are used to enhance a student’s educational experience. However, sharing this intel- lectual property without the intellectual property owner’s permission is a violation of intellectual property rights. For this reason, it is necessary to ask the instructor for permission before uploading and sharing their intellectual property online (e.g., to an online repository). Permission from the instructor is necessary before sharing the intellectual property of others from completed courses with students taking the same/similar courses in subsequent terms/years. In many cases, instructors might be happy to allow distribution of certain materials. However, doing so without expressed permission is considered a violation of intellectual property rights. 8 Chapter 2 Introduction to Information Technology Information Technology (IT) is the cornerstone of modern society, encom- passing the study, design, development, implementation, support, and man- agement of computer-based information systems. At its core, IT revolves around the efficient and effective management of information, from its cre- ation and collection to its storage, processing, transmission, and utilization. It is a dynamic field that has revolutionized industries, facilitated global communication, and driven innovation across various sectors. In this introductory chapter, we will briefly introduce foundational con- cepts in information technology. You will learn what information technology is, and what are the essentials of information technology. We will discuss how information technology shaped our todays society and system, and what are the prons and cons of information technology. 2.1 Data and Information The term “information technology” is a composite of two fundamental con- cepts: “information” and “technology”. A comprehensive understanding of these components is essential to grasping the intricacies of this field. While technology pertains to the application of scientific knowledge for practical purposes, information is derived from something called “data”. Differenti- ating between data and information is pivotal in comprehending the core functions and objectives of information technology. 9 In Summer 2023, we asked ChatGPT (an AI generative system devel- oped by a company named OpenAI) to provide us with a paragraph describ- ing the relationship between data and information. The response was “Data is the raw material, and information is the meaningful output derived from processing and organizing that data”. From the above definition, we understand that data is the raw material of information. It is a collection of facts, figures, or symbols without context or meaning. For instance, a list of numbers or a sequence of letters alone consti- tute data. Information, on the other hand, is data that has been processed, organized, and interpreted to give it context and meaning. It is the product of applying knowledge and understanding to data. Essentially, information is data that has been transformed into something useful. Example. Consider the following sequence of digits: 05071962. These digits or numbers as raw as they seems to be represent a data. When we assign a meaning to these digits, for example, let us say, the two first digits (from left to right) represent a day in a month, the second two digits represent a month in a year, and the last four digits represent a year. We would obtain the date July 5th, 1962, which could correspond to the independance day of Algeria, or the date of birth of a person. In both cases, that sequence of digits becomes an information as it has a meaning now. Data, in its raw form, is simply a collection of facts, figures, symbols, or values that represent something but lack context or meaning on their own. E.g., a list of numbers, a sequence of bits 10101...111, etc. However, when processed and organized, data transforms into information, which is meaning- ful and actionable. This distinction is essential as it lays the groundwork for comprehending how information technology systems capture, store, process, and disseminate information effectively. 10 Text (SMS) Video Charts Signs Graphs Binary Voice Physical emotions Figure 2.1: Some Types of Information It it worth mentioning that data and information comes in different forms. In this course, we refer to digital data and digital information. Also, digital information comes in different types. Figure 2.1 illustrates that. 2.2 Information Technology Now that we know what digital information is and what are its different forms. We can define the term “Information technology”. Information Technology Information Technology ( HAÓñÊªÖ Ï @ AJk. ñËñJºK), a.k.a., IT, refers to the use of computers, software, networks, and electronic systems to store, process, transmit, and manage digital information. So, basically, information technology, is the use of technological resources, in particular, computers, to store, process, transmit, and manage digital in- formation, instead of using the classical, manual, error-prone, time-consuming, corruption-oriented, inefficient, unavailable, and unscalable methods. 11 Example. Before 2010, when you go to the city hall to extract a birth certificate, you walk to the main building, go to the right counter, present your familly’s booklet, and inform the service agent that you would like to extract a birth certificate for yourself. The agent, generally, a female person, takes a pre-printed form, and starts manually writing down personal information from your familly’s booklet. At that time, you would stand there and wait, while people next to you could sneak and read your private information on the fly. After some time, the form is filled out, and handed to you. You are then asked to go to another counter to get your birth certificate wadded using the mayor or one of his representative’s stamp. There, you will line up for another queue, to get that done. You get your document, walk and away. After few days, you realize that their was a typo in your name. Instead of, e.g., QÔ«, they wrote PAÔ«. So, you go back, and rebelot. Now (2024), things have improved thanks to the introduction of infor- mation technology, but not that much. We are still legging behind. If you want to extract a birth certificate, you will still go to the city hall, walk to the main building, go to the right counter, present your familly’s booklet, and inform the service agent that you would like to extract a birth certificate for yourself. The agent grabs your booklet in a safer location, as now the customer and the agent are separted by a security standing screen, which adds an extra distance between the agent and the customer in addition to the space occupied by their computer — there is at least 60 cm. This will protect the service agent from being assaulted in anyways. The agent reads key-information, e.g., name, birth number, data of birth, etc. and inputs that into their computer. The computer quickly retrieves your birth certifi- cate from a backend database and displays that to the agent. The agent then instructs the computer to print a certain number (as requested) of copies of your birth certificate. Unfortunately, you will still have to walk into another counter to get your documents wadded. Generally, you do not find typos in your extracted documents — thanks to the use of technology. 12 This is an example that you encounter in your daily life. Technology has been introduced in almost every sector. You will observe considerable improvment. However, this does not mean that we should not be improving current solutions further. You should be asking yourselves about the name of course “Information Technology Essentials” and the concept of “information Technology” that we have learned so far. The word Essentials in information technology, refers to the fundamental and necessary components that are necessary for something to function and operate properly and effectively. That will be the target of the next chapters, where we will learn about computers, software, networks, and may other technologies used in IT. 2.3 Information and Communication Technol- ogy As you explore the world of information technology, you will certainly en- counter the compound noune “information and communicaiton technology”. What is the relationship between this new name and information technology that we have learned in the previous section? Information Technology Information and Communication Technology, a.k.a., ICT ( AJ k. ñËñ Jº K ÈA B@ð HAÓñÊªÖ Ï @), refers to the use IT and communication technol- ogy (i.e., the various ways in which IT is used to communicate, share information, and interact). From this definition, we can see that information and communication technology uses information technology with an emphasis on communicaiton technologies. Information Technology (IT) primarily deals with the use of computers to store, process, and manage information. It focuses on the tech- nical aspects of handling data. Information and Communication Technol- ogy (ICT), however, is a broader term encompassing IT, but with a stronger emphasis on communication. It involves the use of technology to facilitate communication and the exchange of information between individuals and or- ganizations. This includes not only computers but also telephones, satellites, and other communication technologies (wired and wireless). 13 2.4 Importance of Information Technology Information Technology (IT) has become the backbone of modern society and economy. It underpins the operations of businesses, governments, and individuals alike. By enabling efficient communication, data management, and automation, IT has revolutionized industries and created new oppor- tunities. From healthcare to finance, education to entertainment, IT has become an indispensable tool for driving innovation, improving productivity, and enhancing the overall quality of life. Looking back in time while observing the current advancement in various sectors due to information technology, we can definitively claim that it has revolutionized the way we live, work, and interact. There are various reasons for why you should like and enjoy stuing information technology: 2.4.1 Real-World Relevance Information technology has permeated nearly every facet of contemporary life. From healthcare, where it aids in medical diagnosis and treatment, to finance, where it underpins global markets, IT has become an indispensable tool. In education, it facilitates online learning and research, while in com- munication, it connects people across the globe. The rise of e-commerce, social media, and artificial intelligence are all testaments to IT’s profound impact on society, economy, and culture. In the following, we discuss the impact of IT in some important fields: Medical Field. Within the medical field, this impact is particularly. evident. Physicians are now equipped with computers and IT resources to access and analyze patient data, facilitating more accurate diagnoses (e.g., using MRI and CT scans), personalized treatment plans, and improved patient outcomes. Electronic health records streamline patient informa- tion management, while telemedicine ex- pands healthcare accessibility (e.g., as we have seen during COVID-19 pan- demic). Additionally, IT-driven medical research accelerates the discovery of new treatments and cures. Nowadays, in many countries, citiziens (or even permanent and tempo- ral residents) are identified with their personal social security numbers (or 14 SIN number). When a patient walk into the hospital or a local clinic, the physicians can use the patient’s social security number to identify the pa- tient, access patient personal infromation, and retreive their electronic med- ical record. This facilitates the task of the physician as it has access to the medical history of the patient, and allow better decision-making. Weather Forecasting Field. IT has proven to be a vital tool in disaster management and prevention. By harness- ing the power of data and computational models, meteorologists can for instance ac- curately predict the path and intensity of storms (hurricanes, typhoons, and cyclons), enabling timely evacuations and disaster preparedness. Early warning systems pow- ered by IT have saved countless lives by pro- viding crucial information to at-risk populations. Moreover, IT facilitates real-time communication and coordination among emergency responders, op- timizing relief efforts and minimizing the impact of natural disasters. Transportation Field. Information technology has revolutionized the trans- portation industry. From optimizing logistics and fleet management to enhancing passenger experiences, IT has be- come an indispensable tool. GPS (Global Positionning System) technology, for in- stance, enables real-time tracking of vehi- cles, improving efficiency and safety. Addi- tionally, IT underpins the development of autonomous vehicles, promising to trans- form transportation by reducing accidents and traffic congestion. Moreover, IT facilitates the integration of public transportation systems, improving urban mobility and reducing reliance on private vehicles (thus reducing congestion, gas emissions, noise, etc). With a reliable IT infrastructure, passengener could have access to real- time data about approaching buses, trains, and trams. In many countries, at the bus station, a display panel is provied to show, in real-time, how much time is left before the bus to a particular destination stops by. This prevents the citizens from waiting for a longer time, if not forever. Also, from any location, citizens can use their smartphones to check at what time the next bus to another location will stop by the nearest bus stop. 15 Economical Field. Information technology (IT) has become the corner- stone of modern economies. It drives economic growth by fostering innovation, enhancing productivity, and creating new business models. E-commerce platforms, for instance, have revolutionized retail, expanding market reach and con- sumer choice. Financial institutions rely heavily on IT for secure transactions, risk management, and data analytics. With the existing IT infrastructure, you can easily buy something from China and get it shipped to your doorsteps in Algeria in a couple of weeks. In some coun- tries, in few minutes, you can purchase different items from various countries and get them delivered to you within three days. Educational Field. Information technology has revolutionized the educa- tion sector. By providing access to a vast array of knowledge and resources, IT empowers students to become active and independent learners. Online platforms facilitate interactive learning, enabling stu- dents to collaborate on projects and ac- cess educational materials anytime, any- where. Additionally, IT tools enhance teaching methodologies, allowing educators to create engaging and personalized learn- ing experiences. We have clearly seen during the COVID-19 pandemic that schools and universities had to stop and close their doors and gates. Thanks to the existing IT infrastructures and platforms (e.g., Google meet, Microsoft teams, Zoom, and many others) students were able to continue, remotely, attending classes, writing exams, working on projects, writing reports and thesis, defending degrees, and smooth-passing their academic years. Agricultural Field. Information technology is revolutionizing the agricultural sector, transforming traditional farming practices into data-driven and sus- tainable operations. By providing tools for precision agriculture, IT enables farmers to optimize resource utilization, maximize yields, and minimize environmental impact. Technologies such as drones, sensors, and 16 data analytics help monitor crop health, soil conditions, and weather pat- terns, enabling farmers to make informed decisions. Industrial Field. Information technology has revolutionized industrial pro- cesses, driving efficiency, productivity, and innovation. From manufacturing to supply chain management, IT has be- come a cornerstone of modern industry. Au- tomation, powered by IT, has optimized production lines, reducing costs and improv- ing product quality. Additionally, data an- alytics enables businesses to identify trends, optimize operations, and develop new prod- ucts. Moreover, the Industrial Internet of Things (IIoT) — Industry 4.0 — connects machines and systems, facilitating real-time monitoring and control. As a result, industries are becoming more agile, responsive, and sustainable through the strategic integration of IT. Just to give you an example that illustrates the impact of IT in industry, the Toyota Motor company produced just over 11.5 million vehicles world- wide in 2023, whereas in 1950, it only procuded 11,706 units. Communication Field. Information technology (IT) has revolutionized the communication landscape. Digital plat- forms, enabled by IT, have transformed how information is created, shared, and con- sumed. From social media to online jour- nalism, IT has facilitated global connectiv- ity and interaction. Moreover, IT has en- abled new forms of communication, such as video conferencing, instant messaging, and podcasting. It has also fueled the growth of the digital advertising industry, influencing how businesses reach and engage with their audiences. In essence, IT has become the backbone of modern communication, enabling faster, more efficient, and globally accessi- ble information exchange. The picture you see here, has been taken during my Ph.D. defense in 2020, when universities were locked up due to the COVID-19 pandemic. The existing IT communication platforms allowed me, as well as, many other students at that time, to defend their master, engineering, or Ph.D. thesis. 17 Security Field. Information technology (IT) is a cornerstone of modern security systems. It underpins the develop- ment and implementation of sophisticated security measures to protect individuals, or- ganizations, and nations from physical as- saults and cyber threats. From firewalls and intrusion detection systems to encryp- tion and data backup, IT enables the cre- ation of robust security infrastructures. Ad- ditionally, IT facilitates intelligence gathering and analysis, allowing security agencies to anticipate and respond to emerging threats. As the digital land- scape evolves, IT continues to be at the forefront of safeguarding critical information and infrastructure. You may have noticed nowadays, in most retail shops, the facilities uses security (or CCTV) cameras to permanently record the location. If some- thing bad happens, the owner of the shop can go back to the recored footage and obtain digital evidence of what has really happend. Military Field. Information technology has become an indispensable tool for modern militaries. It underpins operations from tactical maneuvers to strategic planning. Through advanced communication systems, troops can main- tain real-time contact, share critical intel- ligence, and coordinate actions with preci- sion. Moreover, IT enables the development and deployment of sophisticated weaponry systems, drones, and surveillance technolo- gies. In essence, IT has transformed warfare into a highly technological and data-driven enterprise, enhancing operational efficiency, effectiveness, and the overall security of nations. We have seen in recent wars and conflicts that UAVs (Unmanned Aerial Vehicles), like drones, have been highly used to precisely target enemy per- sonnel. Drones utilize information and communication technologies to fly between geographic locations, execute military operations (such as surveil- lance, intelligence gathering, or bombardment), and return to their original position. 18 Gaming Social networking Hacking Content creation Software development Learning and working Research and innovation Web browsing and news Figure 2.2: Different interests related to the use of information technology 2.4.2 Connection with your Interest Computers have become inextricably woven into the fabric of our daily lives, profoundly influencing our interests and hobbies. From the casual inter- net surfer exploring passions to the dedicated gamer immersed in virtual worlds, computers provide platforms for connection, creation, and explo- ration. Whether it is researching a historical event, crearting content, ana- lyzing data for a personal project, or simply staying connected with friends and family, computers offer tools and resources that amplify our ability to en- gage deeply with our passions. Figure 2.2 illustrates some common interests and hobbies realted to the use of IT in our daily life. 2.4.3 Career Opportunities Information technology (IT) has revolutionized the job market, creating a vast array of career opportunities across industries. From software develop- ment and cybersecurity to data analysis and network engineering, IT skills are in high demand. The integration of technology into businesses has led to the emergence of entirely new roles, while traditional professions are increas- ingly reliant on IT expertise. As technology continues to advance, so too will the range of career paths available, making IT a dynamic and promising field for professionals seeking diverse and fulfilling opportunities. 19 In Figure 2.3 we illustrate some example of career opportunities where IT skills can be used. From left to right, the first picture illustrates the work of designing and developing intelligent systems. Examples of such systems could be, a smart vaccum clearner that moves around autonomously and cleans the floors and carpets without colliding with objects, or the devel- opment of a smart pair of glasses that can be configured to display certain objects as other objects (or blur certain objects) instead of showing them. The second picture is also interesting. It refers to repairing technological devices. If we can design technological systems, we should also be able to repair them and provide maintenance too. The third picture represents a software engineer. That is a person who is involved in a software develop- ment projects, either as an analyst, designer, architect, programmer, tester, to integrator. A software engineers can collaborate with other software en- gineers to develop various kinds of software, ranging from small apps, appli- cations, website, operating systems, or firmwars. The fourth picture shows cybersecurity analysts. The information technology infrastructure is subject to harmful activities, performed by skilled actors, knonws as hackers. These hackers aim to render information systems inoperational or unavailable. Cy- bersecurity analysts play a crucial role in detecting harmful activities and stopping them. They also collaborate with software engineers to develop secure solutions, e.g., detection systems. On the second row, the first picture shows a network engineer. Networks are build by connecting computers together with an aim to establish commu- nication and information sharing. Information technology makes more sense when it relies on networks. We need people who are formed to design and implement computer networks, and to troubleshoot networks when issues oc- cur. The second picture refers to data analyst, where data is collected and analyzed to infer information, e.g., identifying a criminal within a crowd, or detecting a traffic violation on the streets and linking it to a particular vehicle and driver. The third picture shows a person maintaining a robot. You can be a robot designer and developer. With some electonics and IT skill, you can build your own robots that can assit people in their daily life. For example, a home assistant robot that can clean the dishes, tidy up the rooms, and prepare dinner. The last picture shows a drone watering plants in a hard-to-reach area. 20 Intelligent design Repairing devices Software development Cybersecurity analyst Network engineer Data analyst Robotics Smart applications Figure 2.3: Different career opportunities using information technology 2.4.4 Challenges and Curiosity The intersection of curiosity and challenge is where innovation thrives, and information technology is a prime example of this dynamic. As technology pushes boundaries, it inevitably encounters complex problems that demand creative solutions. From developing ethical aritificial intelligent systems to addressing cybersecurity threats, IT professionals are constantly challenged to explore uncharted territories. This inherent difficulty fuels a sense of curiosity, driving researchers and developers to delve deeper into the com- plexities of technology, seeking to understand, improve, and pioneer new frontiers. Without going into deep and complex challenges, we can discuss some fundamental challenges that computer scientists, in general, face. In the following paragraphs, we are discuss some challenges that we en- counter in the field of information technology. Technology Miniaturization. Miniaturization, while offering remarkable advancements, poses significant challenges. As devices shrink, the laws of physics be- come increasingly influential, making it diffi- cult to maintain performance and reliability. Manufacturing at such minuscule scales de- mands unprecedented precision and control. Additionally, the dense packing of compo- 21 nents exacerbates heat dissipation issues, requiring innovative thermal man- agement solutions. Overcoming these hurdles while aiming at developing tiny devices augmented with super computing power, large storage capac- ity, high data communication rate, and low power consumption, necessitates interdisciplinary collaboration and the development of novel materials and fabrication techniques. Cybersecurity. Cybersecurity presents a formidable challenge in the digital age. The ever-evolving landscape of cyber threats, from sophisticated ransomware at- tacks to data breaches and phishing scams, demands constant vigilance. The exponen- tial growth of interconnected devices, often with limited security measures, creates a vast attack surface. Additionally, the short- age of skilled cybersecurity professionals exacerbates the problem. Organi- zations and individuals alike grapple with the daunting task of protecting sensitive information while staying ahead of malicious actors (i.e., hackers) who exploit vulnerabilities with increasing sophistication. Ethical and Social Issues. Ethical and social issues pose significant chal- lenges to the advancement and implementation of information technology. Privacy concerns, fueled by the vast amounts of data collected and analyzed, have become paramount. For example, when visting some website, you are some- times asked to register and open an account. The registration process requires from you to give out some personal information. That information may be sold to malicious third parties that can you that infor- mation against you one day. Also, when you subscribe to a mobile telephone provider, you give out personal information. People who work at the oper- ator have access to your information. If not professional and aware, they can share that information with their relatives and friends, which is uneth- ical. So, we need to educate people on how to use technology and heavily “financially” punish those who go against the rules and the law. The digital divide, where access to technology is unevenly distributed, perpetuates social inequalities. Additionally, the development and use of artificial intelligence raise ethical dilemmas regarding bias, accountability, and job displacement. 22 Misinformation and disinformation spread rapidly through digital platforms, eroding trust and hindering informed decision-making. Social media plat- forms, including Facebook, TikTok, YouTube Shorts, and Instagram, have exerted a profound influence on society, particularly on teenagers. Developping Efficient Algorithm. Developing efficient algorithms is a complex endeavor fraught with challenges. Striking the optimal balance between time and space complexity often requires deep problem understanding and creative solu- tions. Additionally, handling large datasets and ensuring scalability can be demanding. As problem domains grow in size and com- plexity, so too does the challenge of design- ing algorithms that can process information efficiently. Furthermore, the need to adapt algorithms to diverse hardware architectures and software en- vironments adds another layer of complexity to the development process. Interdiciplinary Collaboration. Collaborating with individuals from di- verse fields within IT can be challenging due to varying technical proficiencies, communication styles, and project perspec- tives. Bridging the gap between those with deep technical expertise and those with a broader business acumen requires effective communication and a shared understanding of project goals. Additionally, managing ex- pectations and ensuring alignment between different teams can be time-consuming and require strong leadership. Overcoming these hurdles necessitates open- mindedness, adaptability, and a willingness to learn from colleagues with different backgrounds, cultures, and religions. Inclusivity and Accessibility. Developing solutions accessible to people with disabilities presents complex chal- lenges. Identifying and accommodating di- verse needs, from visual impairments to motor difficulties, requires a deep under- standing of accessibility standards and user- centered design principles. Ensuring that technology is inclusive necessitates compre- 23 hensive testing, iterative design, and ongoing evaluation. Furthermore, bal- ancing the costs of implementing accessibility features with the potential benefits can be difficult. Addressing these challenges requires a strong com- mitment to inclusivity and a willingness to invest in research and development to create truly accessible solutions. Innovation and Development. Generating innovative and smart solutions is a complex challenge. It requires a unique blend of creativity, technical expertise, and a deep understanding of user needs. Iden- tifying unmet needs, thinking outside the box, and overcoming technical limitations are crucial steps in this process. Addition- ally, balancing feasibility, scalability, and market demand can be daunting. The pressure to deliver groundbreaking solutions while mitigating risks often creates a high-stakes environment, de- manding resilience and adaptability from innovators. Legal Issues and Juridiction. The rapid advancement of information technology has introduced a complex ar- ray of legal challenges. Issues such as pri- vacy infringements, data breaches, intellec- tual property theft, and cybercrime have emerged as significant concerns. The digital realm has blurred traditional legal bound- aries, making it difficult to establish juris- diction and enforce laws effectively. Addi- tionally, the development of artificial intelligence and autonomous systems raises new ethical and legal questions regarding liability, accountability, and human rights. For example, if a self-driving taxi cab hits a pedestrain and breaks their legs, who will be held liable? Would it be the vehicle manufac- turer? the taxi company? the autonomous vehicle software developer? the city who authorized this kind of cabs? or the pedestrain? 2.4.5 Information Technology Breakthroughs The landscape of information technology is undergoing a rapid transforma- tion, marked by unprecedented breakthroughs. Artificial intelligence and ma- chine learning are at the forefront, revolutionizing industries and reshaping 24 human interaction. Quantum computing promises to solve complex problems at speeds unimaginable until recently. The Internet of Things continues to expand, connecting billions of devices and generating vast amounts of data. Meanwhile, advancements in biotechnology and nanotechnology are blurring the lines between biology and technology, opening new frontiers in healthcare and materials science. These developments collectively shape a future char- acterized by automation, intelligence, and connectivity. In this subsection, we present the most recent information technology breakthroughs. Google’s Quantum Computer. Google has emerged as a pioneer in the field of quantum computing. The com- pany has made significant strides in devel- oping quantum processors with the poten- tial to revolutionize fields such as materi- als science, drug discovery, and cryptogra- phy. While still in its early stages, Google’s quantum computer, Sycamore, has demon- strated the ability to perform calculations that would be impossible for classical computers. Sycamore, reportedly solved a specific computational problem in approximately 200 seconds, a task estimated to take thousands of years on the world’s fastest classical supercomputer. mRNA Technology. mRNA vaccines represent a groundbreaking advance- ment in medical science. By instructing the body’s cells to produce specific proteins, these vaccines offer a rapid and effective approach to preventing diseases. The technology, initially showcased in the swift development of COVID-19 vaccines, holds immense promise for addressing a wide range of infectious diseases, including in- fluenza, HIV, and malaria. Beyond infec- tious diseases, mRNA vaccines are also being explored for cancer treatment and prevention, demonstrating the versatility and potential of this revolu- tionary platform. Generative AI systems. Generative AI systems like OpenAI’s ChatGPT and Google’s Gemini have ushered in a new era of artificial intelligence. These models, capable of generating human-quality text, code, and other creative content, have demonstrated remarkable abilities in various applica- 25 tions. From drafting emails and writing code to translating languages and providing information, these AI systems are rapidly transforming industries and daily life. While challenges such as bias and misinformation persist, the potential benefits of generative AI are immense, promising to revolutionize how we interact with technology and solve complex problems. Self-driving Cars. Self-driving cars represent a significant leap forward in transportation technology. By leveraging artificial intelligence, computer vision, and advanced sensors, these vehicles have the potential to revolutionize how we travel. While still in development, autonomous ve- hicles promise to enhance safety, reduce traf- fic congestion, and improve accessibility for those unable to drive. Tesla has emerged as a leading pioneer in the de- velopment of self-driving cars. The company’s Autopilot system, while still classified as a driver-assistance technology, offers a suite of advanced features designed to enhance safety and convenience. Solar Energy. Solar power has emerged as a cornerstone of renewable energy. Harnessing the sun’s energy to generate electricity, solar systems have become increasingly efficient and cost- effective. From residential rooftops to large- scale utility plants, solar power is contribut- ing significantly to the global shift towards sustainable energy sources. Technological advancements in solar cells, energy storage, and grid integration have accelerated the adoption of solar energy worldwide, making it a viable option for both individuals and businesses. Cryptocurrency. Cryptocurrency (e.g., Bitcoin, Ethereum, Tether, etc) has revolutionized the financial landscape by introducing a decentralized digital cur- rency system. Built on blockchain tech- nology, cryptocurrencies operate without intermediaries like banks, offering potential benefits such as faster transactions, lower fees, and increased financial inclusion. 26 Reusable Rockets. Reusable rockets have revolutionized the aerospace industry by dramatically reducing the cost of space travel. By recovering and reusing rocket components, companies like SpaceX have significantly lowered launch expenses. This breakthrough technology has enabled more frequent and affordable space missions, paving the way for increased satellite de- ployment, scientific exploration, and poten- tial future space tourism. Development of Materials. The development of new materials has significantly impacted various industries, including construction and manufacturing. Materials like PVC, once a revolutionary al- ternative to copper in plumbing, exemplify this trend. Lighter, more durable, and of- ten more cost-effective, these new materi- als have reshaped product design and per- formance. The 5th Generation. 5G represents a quantum leap in mobile network technology. Offering significantly faster speeds, lower latency, and greater capacity than its predecessors, 5G is poised to revo- lutionize industries and daily life. From en- abling seamless streaming and virtual real- ity experiences to supporting critical appli- cations like remote surgery and autonomous vehicles, 5G’s potential is vast. Human-Machine Interfaces. Human-machine interfaces (HMIs) are revolutionizing how we interact with tech- nology. Traditional input methods like key- boards and mice are being augmented, and in some cases replaced, by more intuitive and efficient interfaces. Brain-computer in- terfaces (BCIs) represent the cutting edge of this field, enabling direct communication between the human brain and machines. 27 2.5 Issues in Information Technology There are vairous ethical, legal, environmental, and social issues related to information technology and ICT: Ethical Issues: – Privacy. To what extent do we have the right to privacy? Pri- vacy has become a paramount concern in the age of information technology. The proliferation of social media platforms, online shopping, and smart devices has led to an unprecedented collec- tion and sharing of personal data. Issues such as data breaches, surveillance capitalism, and the misuse of personal information for targeted advertising have eroded public trust. Furthermore, the increasing reliance on digital services has made individuals vulnerable to identity theft and online harassment. Safeguarding privacy while harnessing the benefits of technology is a complex challenge that requires robust legal frameworks, ethical guidelines, and individual awareness. – Inclusivity. To what extent does computing marginalise people? Inclusivity is a cornerstone of ethical technology development. For example, we are aware that access to Internet resources is not equally distributed over the world. Some coutires still have very low Internet speed and have restricted access to most services. Creating products and services accessible to people of all back- grounds, abilities, and socio-economic statuses is essential. This involves designing with diverse users in mind, ensuring equitable access to technology, and avoiding biases in algorithms and data. By fostering inclusivity, the tech industry can contribute to a more equitable society and create products that truly benefit everyone. – Professionalism. Does IT help in a working context? Profes- sionalism in the ICT industry is paramount. The rapid pace of technological advancement often demands collaboration, problem- solving, and effective communication across diverse teams. Pro- fessionals in ICT must exhibit strong ethical conduct, respect for colleagues, and a commitment to delivering high-quality work. Maintaining a professional demeanor, especially in remote or vir- 28 tual work environments, is crucial for building trust and fostering a positive work culture. Environmental Issues: – Health. How is physical and mental health affected? Prolonged interaction with Information and Communication Technology (ICT) has led to a surge in health concerns. Physical ailments such as Repetitive Strain Injury (RSI), eye strain, and musculoskeletal disorders have become prevalent due to sedentary lifestyles fos- tered by ICT use. Furthermore, the addictive nature of social media and online gaming has contributed to mental health issues like anxiety, depression, and sleep disturbances. – Energy use. The burgeoning demand for computing power is placing increasing pressure on energy resources. As devices be- come more powerful and capable of handling complex tasks, their energy consumption rises proportionally. Unfortunately, many electronic devices are inherently inefficient, converting a signifi- cant portion of electricity into heat rather than useful work. This energy waste exacerbates environmental concerns and contributes to rising energy costs. – Resources. The IT industry’s reliance on raw materials poses a significant environmental challenge. The extraction of raw ma- terials (and rare earth elements), often from regions with limited resources and regulations, creates a complex ethical and environ- mental challenge. The disparity between the global north, where technological advancements are primarily developed and enjoyed, and the global south, where resources are extracted under often exploitative conditions, is a stark reality. This unequal distribu- tion of benefits and burdens underscores the need for sustainable and ethical practices throughout the IT supply chain. 29 Chapter 3 Fundamentals of Computing Computing is fundamentally rooted in the concept of systems, intricate net- works of interconnected components working harmoniously to achieve specific goals. From the tangible hardware that underpins these systems to the in- tangible algorithms that drive their operations, computing is a multifaceted discipline. This foundation is built upon an understanding of how problems are solved, how algorithms are designed, and how the latter are transofrmed into code and programs that computers understand and execute. In this chapter, we explore these core elements — systems, computer, problems, algorithms, problem-solving, and programming — to comprehend the funda- mental principles that power the digital world. 3.1 Systems The concept of system is fundamental to understanding how the world around us operates, in particular, when it comes to the information technology field. You may have heard different compound names using the word systems in the field of information technology. For example, information systems, oper- ating systems, software systems, network systems, communication systems, satellite systems, intelligent systems, etc. But what exactly constitutes a system? Is it simply a collection of parts? Or is there something more to it? 30 Immune system Power distribution system Supply chain system Ecosystem Ecosystem Political system Transportation system Telecommunication system Figure 3.1: Different Types of Systems Let us start with a simple and basic definition: System A system ( ÐA¢) is a set of components that work together to achieve specific objectives or functions (i.e., provide a service). Could you think of real examples of systems? Systems are ubiquitous in our world. From the intricate workings of a single cell to the vast expanse of the universe, we find examples of interconnected components working to- gether to achieve a common goal. Consider the human body, a marvel of engineering with systems like the circulatory, respiratory, immune, and ner- vous systems. Or look to nature, where ecosystems demonstrate complex interactions between living organisms and their environment. In the realm of technology, we encounter systems in everything from power grids and transportation networks to computer hardware and software. Example. The Figure 3.1 illustrates different types of systems. 31 A system implies interconnectedness, interdependence, and a common purpose. It’s a dynamic entity that interacts with its environment. Whether it’s a biological organism, a social structure, or a mechanical device, the notion of system suggests a holistic view, where the whole is greater than the sum of its parts. As we delve into the realm of computer systems, we’ll explore how these principles apply to the digital world. 3.2 Computers Now that the definition of system is quite clear, let us prefix the word “‘sys- tem” with the word “computer” and define a new term: “computer system”. What is a computer in the first place? At this stage, I need you to look at the following images and thinnk of what do they have in common. Laptops Washing machines Cars Smartwatches Automatic Teller Machine Magnetic Resonance Imaging Tablets (iPads) Playstations Smart cards 32 In fact, all these are computers... computers are not just laptops and desk- tops. If we ask Google’s Gemeni system to provide us with a definition for computers, it says “A computer is an electronic device capable of processing information and performing tasks based on instructions provided by soft- ware. Essentially, it’s a machine that manipulates data according to a set of rules”. It also says: “Computers range from small embedded systems found in everyday appliances to powerful supercomputers used for scientific research. Despite their diversity, they all share the fundamental ability to process information rapidly and accurately” (Aug 2024). The second part of the provided definition clearly shows that computers may take different forms and may be used in various applications. These different types of computers do share some common components and features, which make them literally “computers” with respect to the first part of the definition. Now, let us consider the following generic and abstract definition: Computer A computer ( H. ñ A g ) is an electronic machine that is designed to automatically compute problems at a very high velocity. Let us take a moment and analyze the above definition. The definition states that computers are eletronic machines — so they are not purely me- chanical machines. This is due to the rapid development in the field of electronics. Efficient and miniaturized electronic components, particularly transistors and integrated circuits, have seen their integration in computers. There exists an observation made by the engineer Gordon Moor, which pre- dicts that the number of transistors in an integrated circuit doubles about every two years. This trend was a driving force in the semiconductor industry for decades, leading to exponential growth in computing power. However, in recent years, physical limitations and economic factors have slowed down this pace. While we still see improvements in processor speed and efficiency, the rate of increase is not as dramatic as it once was. The definition also states that computers were designed to “automati- cally” compute. That refers to reducing human intervention. Computers are intended to be standalone systems, i.e., systems that operate independently. The next important feature in the definition is “compute problems”. The word “compute” here means “solve”. The definition hence becomes “com- puters are electronic machines designed to automatically solve problems at a 33 very high velocity”. So, computers are actually machines designed to solve different types of problems at a very high speed and with less or no human intervention. We often say that computers “decide” problems. Of course, some problems cannot be solved. They are called uncomputable problems. In general, problems that can be solved using a computer are called com- putable problems. If a problem requires a YES/NO answer, we call it a decision problem. If we can solve it using a computer, then it is called a decidable problem, otherwise, it is undecidable. Example. The following are some daily problems that we encounter, and that different computers can try to solve for us: Given a list of 1000 natural numbers, you can instruct a computer, e.g., a laptop or your smartphone, to calculate the sum of those thousand numbers in less than a microsecond. Given some geographic coordinates of latitude 36.68913533573665 and longitude 2.8677613464487894 (e.g., ENSIA location) and another co- ordinate (36.71184153180695, 3.202466267757517 — Algiers Interna- tional Airport), you can instruct a self-driving car to take a person from ENSIA school to the international airport in around 40 minutes. Given 7Kg of dirty clothes, you can instruct a modern washing machine to clean-wash the clothes and turn them dry in a matter of 90 minutes. You can instruct a refrigirator to maintain a temperature of 6co within the fridge compartment and a temperature of -15co within the feezer compartment. You can instruct an ATM to check your bank account sold and to withdraw a certain amount of money by inserting you bank card into the card reader and proving your card (account) ownership. A radiologist can instruct an MRI system to scan a specific part of a patient body to diagnosis possible factures in the their brain. Despite their diverse functions, these computers (and many others) share a common computational foundation. Each type of computer incorporates a processing unit, a.k.a., processor, for calculation and decision-making, memory for data storage, and input and output interfaces to interact 34 with its surroundings. We will explore those three main component in detail in Chapter 2 when we tackle the topic of computer architecutre. Now that we know what a computer is, and what it is capable of. Let us see how do computers try to solve problems. Genenerally, to solve a problem using a computer, the following steps are performed: 1. We, as humans, analyze and understand the problem. 2. We propose a solution to the problem. 3. We write the solution as a set of finite steps, called algorithm. 4. We translate the algorithm into a program by rewriting all the steps using a programming language. So, we program the machine. 5. Feed the computer with the written program and with any required intput (data). 6. The computer, may use another program to translate the written pro- gram into a sequence of instructions — known as machine code, that it can understand. 7. The computer automatically executes the produced machine code and rapidly tries to solve the problem. 8. The computer outputs the results (output). When going through the above eight (08) steps, you encounter some new terminology (words in bold) that is tighly linked to how a computer solves problems. In the following sections, we are going to present and explain those terminologies to better clarify the whole picture. For consistency and clarity, I will more often make reference to the above eight (08) steps as we move forward in this chapter. This will allow you to easily connect the dots. 3.3 Algorithms In this section, we are going to present the notion of algorithm and provide some examples. Through the examples, you will explore various ways of thinking and approaching problems. By the end of this section, you will be able to write your own clear and concise algorithms to solve problems. 35 Algorithm An algorithm ( é J ÓPP@ñ k ) is a finite sequence of steps to solve a problem (named after Muhammad Ibn Musa al-Khawarizmi 780-850). Algorithms have characteristiques. We define them as follows: Finite set of steps. The number of steps an algorithm should have must be finite (even if we repeat some steps multiple times). The steps are unambiguous. The steps should be clear, with one and unique interpretation (meaning — sementics) per step. Inputs and outputs. In general, algorithms do have input and out- put. They take the input, process it, and produce an output. Yet, we can still have algorithms with no input but output (e.g., random number generator), or with input but no output (or explicite output, e.g., inserting a number in a list), or even no input and no output (e.g., an algorithm that states “Do nothing”). Termination. An algorithm must terminate. After completing all steps of an algorithm, the latter should stop. Feasability. This characteristic refers to the practicality of implement- ing and executing the algorithm within given constraints, i.e., it can be implemented with available resources (computational power, mem- ory, budget, etc), it can be executed within a reasonable time frame (computable), and it produces correct and reliable results (i.e., same correct result each time). Expressed in natural language. An algorithm expressed in nat- ural language is simply a step-by-step description of a process using everyday language. To write an algorithm, the very first thing you need to do is to model the algorithm as a blackbox with one arrow going into the box from the top, and one arrow going out of the box from the bottom (viz., Figure 3.2). The arrow from the top represents the input(s) of the algorithm (a.k.a., parameters), whereas the arrow from the bottom represents the output(s) of the algorithm. 36 Input(s) Algorithm Output(s) Figure 3.2: Algorithm as a blackbox Once the inputs and outputs defined, we can start brainstorming and desining the body of the algorithm, or the logic of the algorithm. In other words, think about how to transform the blackbox into a transparent box that clearly explains a sequence of steps to solve a given problem. For consistency, we can use the following algorithm template to write our algorithms: Algorithm: Here you write a name for your algorithm... Input: Here you write all inputs... Body: Here you write the steps to solve the problem... Output: Here you write all ouputs... Example. In the following paragraphs, we are going to solve (write algo- rithms) for five (05) different problems. In each problem, you will learn a new concept and way of thinking, and approaching problems. Problem 1. Given a list of random natural numbers, we would like to compute their product. Write an algorithm that solves the problem. Attemtp to solve Problem 1. Let us follow a stepwise approach and try to solve the problem, i.e., write an algorithm that solve the problem. In this problem, the input of the algorithm will be a list L of random natural numbers, e.g., L = {3, 13, 55, 71, 80,... , 957}, that we need to obtain. The output of the algorithm however, will be one natural 37 number S representing the product of all numbers in the provided list L, i.e., S = 3 × 13 × 55 × 71 × 80 ×... × 957. Note that the list must be finite (|L| ∈ N), otherwise the algorithm will never terminate. Also, for the timebeing, we can trust the input to be as claimed, i.e., a list of random natural numbers. We √ should not expect to find a real number (e.g., 3.14), a square root ( 6.77), a negative number (e.g., -97), an alphabetical letter (e.g., ‘k’), a word (e.g., “ensia”), or even another list L′. It should be a finite and pure list of random natural numbers. Now, let us think about how to transform the blackbox into a trans- parent box, where we can define how the algorithm takes the input to calculate the product and output the result. If we were asked to do that mentaly, we would certainly apply an iterative approach. We would take the first number and multiply it with the second one, and memorize the result. Then, take the third number on the list, and multiply it with the previous result, and memorize the new result. The same operations are performed again and again till we reach the last number on the list. The final result will be the output. Let us use the above template to write our first algorithm by expressing the above iterative approach using five (05) steps. Algorithm 1: Input: List of random natural number L = {3, 13, 55, 71, 80,... , 957} Body: Execute the following steps: 1. Obtain the complet list of the numbers. 2. Take the first number and multiply it with the second number then write down the result (or memorize the result). 3. Take the next number on the list (if there is any) and multiply it with the result you wrote down in Step 2. 4. Repeat Step 3 until numbers run out. 5. Announce the final result. Output: The product P = 3 × 13 × 55 × 71 × 80 ×... × 957 38 These five steps in the body section of Algorithm 1 conform to the characteristics of an algorithm: – The above steps are finite (as there are five steps). Although some steps will be executed multiple times (e.g., Step 3), the total number of executed steps will be finite because the provided input list is finite. – The steps of the algorithm are unambiguous, i.e., they are clear and have one meaning. – The input and output are clear. – The algorithm terminates as the number of steps is finite. – All steps are feasible, w.r.t., existing resources (we know how to memorize and how to perform the multiplication of two numbers). – The steps are expressed in natural language. No technical words. Problem 2. We want to write an algorithm to safely and reliably deliver a parcel (e.g., an egg tray) to a customer using a drone. Attemtp to solve Problem 2. Similar to Problem 1, we are going to follow the blackbox approach. We would start by defining the input and the ouput of the algorithm, and then we can brainsotrm on the logic of the algorithm to transform the blackbox into a transparent box. The problem here is that we have a drone that is capable of transporting packages. We need to provide the drone with information that will allow it to take-off, fly to a specific destination, land-off safely, and deliver the packge to a customer. We can claim that the input in this case is the cutomer location (and probably the order). We could imagine to have a system that allows us to obtain the customer location and register their order (e.g., an egg tray). The system can process the 39 obtained information (check if they are correct and consistent) before sending it to the drone. Customer service agent could load the drone with the package and then instruct it to take-off. The output would be to have the drone inform the customer service that the delivery was either successul or unsuccessful, and return back to the store. It is important to note that for a given problem, there could exist mul- tiple and different solutions. Your classmates could propose a solution to this problem in 10, 15, or 20 steps, while you can come up with another one in 5, 6, or 7 steps. Your solution could be faster then theirs. However, their solution could be much reliable than yours. For example, think about the customer location. What could go wrong? Imagine that your service is located in Sidi AbdAllah city, whereas the customer orders an egg tray to be delivered using your drone to Ain Salah city, which is 1260km away. Imagine that the location is an area that you have classified as unsafe and dangerous. Maybe you got some previous bad experience where your drone got stollen or assaulted by people in that area. Imagine that the wheather conditions are not suit- able to flt the drone. Imagine that the drone will take a route that will be used by the presidential convoys. Imagine that the drone delivers the package, but the customer lies and claims that the package was not delivered or was damaged. How can you make sure that your algorithm is not being abused? I mean, you could imagine different scenarios, and hence would propose different algorithms. The point I wanted to introduce from the above paragraph is the consid- eration of the unexpectencies. When writing an algorithm, you should ask questions like: What happens if the input is not what you expected? or is not what you have considered? what happens if your algorithm encounters an unexpected scenario? what could go wrong? or what happens if your algorithm remains unresponsive for too long? Below, we are providing a possible algorithm for the problem: Algorithm 2: Input: Customer location and order. Body: Execute the following steps: 1. Obtain the customer location. 40 2. Check that location is within drone’s operational range. Other- wise, cancel delivery and notify customer (go to Step 9). 3. Load drone with package (may need customer service assistance). 4. Take off and fly to customer location. 5. Use drone’s sensors to avoid collisions during flight. 6. Inform customer that drone is approaching destination. 7. Gently release the parcel using parachute at a safe spot. 8. Confirm successful delivery with the customer. If successful deliv- ery is confirmed, return to store. Otherwise,... 9. Announce delivery status to the customer service. Output: Announce to customer service the status of the delivery. We can consider recording the delivery process to have valid digital evidence in the case something goes wrong, e.g., drone gets assaulted. Problem 3. Salim wants to send some confidential documents to Ali in a locked box without sharing the key for his lock with Ali. Also, the postman will not be able to open the box. We are in early age, no technology is available — only metalic keys and locks. The box should not be broken or destroyed. Attemtp to solve Problem 3. Similar to Problem 1 and 2, we are going to follow the blackbox approach. We would start by defining the input and the ouput of the algorithm, and then we can brainsotrm on the logic of the algorithm to transform the blackbox into a transparent box. For this problem, we can claim that there is not input and no output. We 41 just need to find the proper way to trasnfer the confidential document from Salim to Ali while respecting the dictated constraints. Here is a possible algorithm for the problem: Algorithm 3: Input: Void. Body: Execute the following steps: 1. Put confidential documents in box then lock the box. 2. Send box to Ali. 3. Postman collects the box and transports it to Ali. 4. When Ali receives the box, he locks it again with his lock. 5. Send the box to Salim. 6. Postman collects the box and transports it to Salim. 7. When Salim receives the box, he removes his lock from the box. 8. Send box to Ali. 9. Postman collects the box and transports it to Ali. 10. When Ali receives the box, he removes his lock from the box. 11. Ali opens the box and collects the documents. Output: Void. Brainstorm: Modify the previous algorithm in such a way so that you can allow the postman to have access to the confidential document. Problem 4. We want to display the natural numbers from 1 to 100. When a number is a muliple of 3, the algorithm should print “EN” instead of the number, for multiples of 5, the algorithm prints “SIA”, and for the numbers that are multiples of both 3 and 5, the algorithm prints “ENSIA”. This problem will introduce the notion of branching. 42 Attemtp to solve Problem 4. This problem seems quite easy. How- ever, thus far, we have not dealt with problems where the steps of an algorithm involve conditional testing — in algorithmics, we call those testing steps If statements. We are given a list of natural numbers, from 1 to 100. For each number, we need to test whether the number is a multiple of 3 and not a multiple of 5. In that case, we should display the word “EN”. Otherwise, if the number is not a multiple of 3 but a multiple of 5, then we should display the word “SIA”. Otherwise, the number is neither a multiple of 3 nor a multiple of 5. In that case, we display the number itself. If the number happens to be a multiple of both 3 and 5, then we should diplay the word “ENSIA”. So, we need to organize those testing statements to look like an inverted funnel. I.e., we go from the tightest constraint (testing condition) to the lightest one. For instance, we can start checking if the number is both a mul- tiple of 3 and 5, and display “ENSIA” if it is the case. Otherwise, we test if the number is a multiple of 3. If it is the case, we display “EN”. Otherwise, we test if the number is a multiple of 5. If that is the case, we dispaly “SIA”. Otherwise, we display the number. Here is a possible algorithm for the problem: Algorithm 4: Input: List L = {1... 100}. Body: Execute the following steps: 1. Ascendantly, pick a number from the list L. If there is no number left, stop the algorithm. 2. Check if the number is a multiple of 3 and 5. If that is true, display “ENSIA” and go to Step 1. Otherwise, go to Step 3. 3. Check if the number is a multiple of 3. If that is true, display “EN” and go to Step 1. Otherwise, go to Step 4. 4. Check if the number is a multiple of 5. If that is true, display “SIA” and go to Step 1. Otherwise, display the number and go to Step 1. Output: “EN”, “SIA”, “ENSIA”, or numbers that not multiple of 15. 43 Problem 5. Consider two variables, X and Y. Each variable is assigned a value, an integer. Using arithmetic operations, write an algorithm that permutes the values of the two variables using exactly 3 steps, and without using a third variable Z. For example, if X=5 and Y=9, then after running the algorithm, the result will be X=9 and Y=5. Attempt to solve Problem 5. In this problem, the input is X=5 and Y=9. After the execution of the algorithm, the output should be X=9 and Y=5. Here is a possible algorithm for the problem: Algorithm 5: Input: X=5 and Y=9 Body: Execute the following steps: 1. Calculate X = X + Y. This will make X=14 and Y=9. 2. Calculate Y = X - Y. This will make X=14 and Y=5. 3. Calculate X= X - Y. This will make X=9 and Y =5. Output: X=9 and Y=5. If you remember earlier when we were defining the word “computer”, we have mentioned that some problem cannot be solved. We called them, unde- cidable problems. We also mentioned that problems for which we can write an algorithm are called decidable problems. In fact, in theoritical computer science, there exist a concept called decidability, which looks at whether a problem can be solved using an algorithm or not, i.e., given a problem, if you can find an algorithm that can solve that problem for whatever in- put (and will always terminate — halt), then the problem is decidable — or computable. Actually, there exists a difference between decidable and computable problems. A problem can be decidable but not computable. All computable problems are decidable. A problem can be decidable, i.e., an algorithm exists, but not computable, i.e., cannot be implemented or will not run for a reasonable amount of time. Undecidable problems are those problems for which we cannot construct an algorithm to solve the problem in finite time. You will learn about these concepts in detail when you study the course of Theory of Computing. 44 Another very important concept when studying algorithms is the concept of complexity. Complexity studies the difficulty of solving computational problems by looking at their solvability, requirement, efficiency, and classi- fication. Basicaly, complexity allows you to evaluate the feasibility of your solutions (your algorithm) with respect to available resources, mainly, time and memory. We often refer to two types of measures: time complexity and space complexity. Other resources could also be considered, such as budget (money), hardware specifications, communication overhead, power consumption, and required social resources. In general, space complexity looks at how much memory I need to solve the problem, whereas time complexity looks at how much time I need to solve the problem, while focusing on worst case scenario. In otherwords, time complexity measures how the execution time of an algorithm grows as the input size increases, whereas space complexity measures how much memory an algorithm uses as the input size increases. We use the Big-O notation to denote the measurement of the complexity, wheather it is time or space complexity. For example, we would write O(1) √ for a constant complexity, O(log(n)) for a logarithmic complexity, O( n) for a linear complexity, O(n), O(n2 ) for a quadratic complexity, O(n3 ) for a cubic complexity,..., and O(2n ) and O(n!) for an exponential complexity. De facto, time complexity is considered an upper bound to space complexity. Example. The time complexity of Algorithm 1 is O(n). This means that the execution time of Algorithm 1 grows linearly as the input size increases. Let us explain this further: The size of the list is not specific. However, we can assume an arbitrary size n ∈ N that represents the cardinality of the list (i.e., the number of elements in the list). Remember, we focus on worst case scenario. If n = 2 then we would perform one multiplication. If n = 3 then we would perform two multiplications. If n = 4 then we would perform three multiplications. You got it right, for n elements in the list, we would perform n − 1 multiplications. This value n − 1 represents the numer of operations that our algorithm would perform. If we consider those operation to be of the same type, i.e., will take the same time to be realized, then we can use the value n − 1 to express the total time needed by the algorithm. 45 As we use the Big-O notation to denote the measurement of the com- plexity, an algorithm that performs n − 1 operations, would have a linear complexity denoted as O(n). Note that even if an algorithm performs n/2, 6n + 5, 10n, or 500n + 30 operations, we would simply say that its complexity is linear, i.e., O(n). We can say that the time complexity of Algorithm 4 is also linear. Brainstorm: If you write an algorithm that takes less than a second to execute and does not require space, then, should I claim that my algorithm has a good complexity? Complexity focuses on the worst case scenario. This simply means that we measure it when n is large. It possible that for a small value of n (e.g., n = 10), the algorithm executes and returns results in less than a second, however, when fed with a large value of n (n → ∞), the algorithm takes forever, and maybe never give back a result. Exercise: Assign the correct time complexity to the√ following algorithms. Possible time complexities are: O(1), O(log(n)), O( n), O(n), O(n·log(n)), O(n2 ), O(n3 ),..., O(2n ), and O(n!). Searching for a specific number in a list of numbers. Computing the product of two natural numbers. Computing the sum of numbers in a list. Checking for palindromes. Compute the product of two matrices. Brute-forcing password of length n with m possible characters.