SlideShare a Scribd company logo
Aksum University
Aksum institute of Technology
Faculty of Electrical and Computer Engineering
Department of Computer Engineering
Mr. Haftom Aregawi
Computer Programming
Outline
‱ Chapter one - Fundamental of Computer
‱ Chapter Two - Fundamental of C++ Program
‱ Chapter Three – Functions and Program Structures
‱ Chapter Four - Array
‱ Chapter Five - Pointers
01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 2
Chapter one
Fundamentals of Computer
‱ Introduction
‱ Hardware and Software Components of Computer
‱ Evolution of Programming Language
‱ Computer Architecture Basics
‱ Representation of numbers in computer
‱ Computer Generations
‱ Exercise
01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 3
Introduction
‱ Computers are sophisticated electronic devices capable of processing vast
amounts of data and executing complex instructions with incredible speed
and accuracy.
‱ They have revolutionized communication, transformed industries, and
empowered individuals worldwide.
‱ Computer can also be defined in terms of functions it can perform. A
computer can:
i) accept data,
ii) store data,
iii) process data as desired, and
iv) retrieve the stored data as and when required and
v) print the result in desired format.
‱ The major characteristics of a computer are high speed, accuracy, diligence,
versatility and storage.
01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 4
Hardware and Software Components of
Computer
‱ Hardware Components of the Computer:
‱ Hardware refers to the physical components of a computer system. These
components include the tangible parts of the computer that you can see and
touch.
‱ Major components of computer:
I. Central Processing Unit (CPU): Often referred to as the brain of the computer, the
CPU is responsible for executing instructions and performing calculations. It processes
data and controls the operation of other components.
II. Main Memory (RAM): Random Access Memory temporarily stores data and
instructions that the CPU needs to access quickly. RAM is volatile memory, meaning it
loses its contents when the power is turned off.
III. Secondary Storage Devices: These devices store data permanently or semi-
permanently. Examples include hard disk drives (HDDs), solid-state drives (SSDs),
and optical drives (like CD/DVD drives)
01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 5
Hardware and Software Components of
Computer

‱ Hardware Components of the Computer

‱ Major components of computer

IV. Input Devices: These devices allow users to input data into the computer. Common
examples include keyboards, mice, touchpads, and touchscreens.
V. Output Devices: Output devices display information processed by the computer.
Examples include monitors, printers, speakers, and projectors.
‱ Additional components of computer:
‱ Motherboard: The motherboard is the main circuit board of the computer. It houses the
CPU, memory, and other essential components and provides connections for peripherals.
‱ Power Supply Unit (PSU): The PSU converts electrical power from an outlet into a form
that the computer can use. It supplies power to the various components of the computer.
‱ Graphics Processing Unit (GPU): The GPU is responsible for rendering images, videos,
and graphics. It offloads graphical tasks from the CPU and is essential for gaming, video
editing, and other graphics-intensive applications.
01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 6
Hardware and Software Components of
Computer

‱ Hardware Components of the Computer

‱ Additional components of computer:
‱ Cooling Systems: Computers generate heat during operation, and cooling systems, such
as fans and heat sinks, help dissipate this heat to prevent overheating and maintain
optimal performance.
‱ Software:
‱ Software refers to the programs, applications, and operating systems that
enable a computer to perform various tasks and interact with users and other
software. It encompasses the intangible instructions and data that tell the
computer's hardware what to do.
01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 7
Hardware and Software Components of
Computer

‱ Software

‱ Software can be categorized into several types based on its purpose,
functionality, and target users. Here are some common types of software:
‱ System Software:
‱ System software refers to the core software that manages and controls the hardware
components of a computer system and provides a platform for running application software.
It acts as an intermediary between the hardware and the end-user applications, facilitating
communication and coordination between them. System software includes several essential
components:
‱ Operating Systems: Manage hardware resources and provide a user interface for interacting
with the computer. Examples include Windows, macOS, Linux, and Android.
‱ Device Drivers: Facilitate communication between the operating system and hardware devices.
‱ Utility Software: Tools and programs designed to optimize, maintain, and manage computer
systems. Examples include antivirus software, disk cleanup utilities, and backup tools.
01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 8
Hardware and Software Components of
Computer

‱ Software

‱ Application Software:
‱ Application software, also known as applications or apps, refers to software programs designed
to perform specific tasks or provide specific functionality for users. Example:
‱ Productivity Software: Helps users create, edit, and manage documents, spreadsheets,
presentations, etc. Examples include Microsoft Office (Word, Excel, PowerPoint), Google
Workspace, and LibreOffice.
‱ Communication Software: Enables communication between users, such as email clients,
instant messaging apps, and video conferencing software.
‱ Web Browsers: Software for accessing and browsing the internet, such as Google Chrome,
Mozilla Firefox, Microsoft Edge, and Safari.
‱ Multimedia Software: Allows users to create, edit, and play multimedia content, including
audio, video, and images. Examples include media players, video editors, and graphic design
software.
01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 9
Hardware and Software Components of
Computer

‱ Software

‱ Application Software

‱ Educational Software: Designed to facilitate learning and educational activities,
including interactive tutorials, simulations, and virtual learning environments.
‱ Financial Software: Helps users manage personal or business finances, including
accounting software, tax preparation tools, and budgeting applications.
‱ Enterprise Software: Software designed for businesses and organizations to manage
operations, processes, and resources. Examples include customer relationship
management (CRM) software, enterprise resource planning (ERP) systems, and project
management tools.
01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 10
Hardware and Software Components of
Computer

‱ Software

‱ Development Software:
‱ Integrated Development Environments (IDEs): Software tools that provide
comprehensive facilities for software development, including code editors, debuggers,
and compilers.
‱ Version Control Systems: Tools for managing changes to source code and coordinating
work among developers, such as Git and Subversion.
‱ Database Management Systems (DBMS): Software for creating, managing, and
querying databases, such as MySQL, PostgreSQL, Oracle Database, and Microsoft SQL
Server.
01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 11
Hardware and Software Components of
Computer

‱ Software

‱ Embedded Software:
‱ Software embedded into hardware devices or systems to control their operation.
Examples include firmware in IoT devices, automotive systems, consumer electronics,
and industrial machinery.
‱ Mobile Apps:
‱ Software applications designed to run on mobile devices like smartphones and tablets,
available through app stores. They include a wide range of categories like productivity,
social networking, gaming, entertainment, and utilities.
01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 12
Evolution of Programming Language
‱ Programming languages are categorized into five generations. These
programming languages can be categorized into low level and high-
level languages.
‱ Low level languages are machine specific or dependent.
‱ High level languages like COBOL, BASIC are machine independent and can
run on variety of computers.
‱ Note: the first and second-generations are low level languages and the
rest are high level programming languages.
01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 13
Evolution of Programming Language

‱ First Generation (1940s - 1950s):
‱ Machine Language: The earliest programming languages were machine
languages, consisting of binary code (0s and 1s) directly understood by
computers.
‱ Each instruction corresponded to a specific operation performed by the computer's
hardware.
‱ Programming in machine language required detailed knowledge of the computer's
architecture
‱ It was highly error-prone and tedious.
01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 14
Evolution of Programming Language

‱ Second Generation (1950s - 1960s):
‱ Assembly Language: Assembly language introduced symbolic representations of machine
instructions, using mnemonic codes to represent operations and memory addresses.
‱ While still closely tied to the computer's hardware, assembly language provided a more readable and
manageable alternative to machine language, enabling programmers to write code with more
abstraction.
‱ Third Generation (1960s - 1970s):
‱ High-Level Languages: Third-generation languages (3GLs) introduced higher levels of
abstraction and were designed to be more human-readable and programmer-friendly.
‱ Examples include COBOL, Fortran, ALGOL, and BASIC.
‱ These languages introduced features like variables, loops, conditionals, and functions, making it easier
to write and maintain complex programs.
01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 15
Evolution of Programming Language

‱ Fourth Generation (1970s - Present):
‱ Domain-Specific Languages (DSLs): Fourth-generation languages (4GLs) are specialized
languages designed for specific application domains or tasks.
‱ They provide higher levels of abstraction and often include built-in support for common operations, such as
database queries, report generation, and business process automation.
‱ Examples include SQL (Structured Query Language) for database management and MATLAB for numerical
computing.
‱ Fifth Generation (Present and Beyond):
‱ Advanced and Specialized Languages: Fifth-generation languages are still evolving and
encompass a wide range of advanced and specialized languages designed for specific purposes,
such as artificial intelligence, machine learning, and parallel computing.
‱ These languages often incorporate features like concurrency, immutability, and functional programming
paradigms.
‱ Examples include Python, Java, C++, and Swift.
01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 16
Evolution of Programming Language

‱ The evolution of Operating Systems:
‱ 1950s - Early Mainframe Systems:
‱ Batch Processing Systems: Early operating systems were primarily designed for batch
processing, where jobs were submitted in batches and processed sequentially without user
interaction. Examples include the GM-NAA I/O for the IBM 704 and the IBM 7090.
‱ 1960s - Time-Sharing Systems:
‱ Time-Sharing Operating Systems: Time-sharing systems allowed multiple users to
interact with a computer simultaneously, sharing its resources. IBM's CTSS (Compatible
Time-Sharing System) and MIT's CTSS were notable examples of early time-sharing
systems.
01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 17
Evolution of Programming Language

‱ The evolution of Operating Systems

‱ 1970s - Rise of Minicomputers and Microcomputers:
‱ Multics and UNIX: Multics, developed by MIT, Bell Labs, and General Electric, was a
pioneering time-sharing operating system. UNIX, inspired by Multics, was developed at Bell
Labs and became one of the most influential operating systems in history, particularly in the
development of subsequent systems.
‱ 1980s - Personal Computers and Graphical User Interfaces (GUIs):
‱ DOS and Windows: MS-DOS (Microsoft Disk Operating System) was the dominant
operating system for IBM-compatible personal computers in the 1980s. The release of
Windows 1.0 in 1985 marked the beginning of Microsoft's transition to GUI-based operating
systems.
‱ Macintosh System Software: Apple's Macintosh System Software introduced the
Macintosh operating system (later macOS), which featured a graphical user interface and
became popular among home and business users.
01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 18
Evolution of Programming Language

‱ The evolution of Operating Systems

‱ 1990s - Client-Server Computing and Networked Environments:
‱ Windows NT and Windows 95: Windows NT, released in 1993, introduced a new architecture for Microsoft's
operating systems, designed for high reliability and scalability. Windows 95 brought significant improvements
in usability and multimedia capabilities to the Windows platform.
‱ Linux: Linux, an open-source Unix-like operating system kernel, was developed by Linus Torvalds and released
in 1991. It quickly gained popularity in server environments and became a cornerstone of the open-source
software movement.
‱ 2000s - Internet and Mobile Computing:
‱ Windows XP and macOS: Windows XP, released in 2001, became one of Microsoft's most successful
operating systems, offering improved stability, security, and multimedia features. macOS (formerly Mac OS X)
introduced a Unix-based architecture and became the foundation for Apple's desktop and server operating
systems.
‱ Mobile Operating Systems: The rise of smartphones led to the development of mobile operating systems such
as iOS (Apple), Android (Google), and Windows Mobile (Microsoft), which revolutionized personal computing
and communication.
01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 19
Evolution of Programming Language

‱ The evolution of Operating Systems

‱ 2010s - Cloud Computing and Virtualization:
‱ Windows 7/8/10 and macOS: Microsoft's Windows 7, released in 2009, and subsequent
versions continued to evolve with improved performance, security, and support for touch-based
interfaces. macOS also saw regular updates and enhancements, integrating more tightly with iOS
devices.
‱ Virtualization and Cloud Operating Systems: Virtualization technologies and cloud computing
platforms emerged, enabling the creation of virtual machines and distributed computing
environments. Operating systems like VMware ESXi, Microsoft Hyper-V, and cloud platforms
like Amazon Web Services (AWS) and Microsoft Azure became prominent.
‱ 2020s - Continued Innovation and Convergence:
‱ The evolution of operating systems continues in the 2020s with a focus on security, privacy, and
integration across devices and platforms. Trends such as containerization, edge computing, and
AI-driven automation are shaping the future of operating systems in a rapidly evolving
technological landscape.
01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 20
Computer Architecture Basics
‱ Computer architecture refers to the design and organization of a computer
system's components, including its hardware and software, to achieve
specific performance objectives and functionality.
01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 21
‱ Note: The CPU consists of an
arithmetic logic unit (ALU) for
performing computations, control unit
(CU) for coordinating operations, and
registers for temporary storage of
data and instructions.
Representation of numbers in computer
‱ Numbers in computers are represented using binary notation, which is a base-
2 numeral system consisting of only two digits: 0 and 1. In binary
representation, each digit is called a bit (short for binary digit), and a sequence
of bits represents a numeric value or other data.
‱ There are several common ways to represent numbers in computers:
‱ Unsigned Integer Representation:
‱ non-negative integers are represented using binary digits.
‱ Example: represent 42 integer number in binary notation using 8-bits
‱ Ans: 00101010
‱ Signed Integer Representation:
‱ Signed integer representation extends unsigned integer representation to include negative numbers.
‱ Example: represent the signed integer -21 in binary notation using 8 bits with two's complement
notation.
‱ Ans: 11101011
01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 22
Representation of numbers in computer

‱ There are several common ways to represent numbers in computers:
‱ Floating-Point Representation:
‱ Floating-point representation is used to represent real numbers (numbers with fractional parts)
in computers.
‱ It consists of three components: the sign bit (0 for positive, 1 for negative), the exponent, and
the mantissa (or significand).
‱ The exponent represents the scale of the number, while the mantissa represents its precision.
‱ Floating-point representation follows standards such as IEEE 754, which defines formats for
single-precision (32-bit) and double-precision (64-bit) floating-point numbers.
‱ Example: represent the floating-point number 3.14 using the IEEE 754 single-precision
floating-point format, which uses 32 bits.
01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 23
Representation of numbers in computer

‱ There are several common ways to represent numbers in computers:
‱ Floating-Point Representation

‱ Example: represent the floating-point number 3.14 using the IEEE 754 single-precision floating-
point format, which uses 32 bits.
‱ Answer:
‱ The IEEE 754 single-precision floating-point format consists of three components: the sign bit, the
exponent, and the mantissa (or significand).
‱ Sign Bit: 1 bit.
‱ The leftmost bit (most significant bit) represents the sign of the number: 0 for positive and 1
for negative.
‱ Exponent: 8 bits.
‱ The next 8 bits represent the exponent of the number.
‱ The exponent is biased by a constant value (127 in single-precision format) to allow for both
positive and negative exponents.
‱ Mantissa: 23 bits.
‱ The remaining 23 bits represent the mantissa (or significand) of the number.
‱ The mantissa represents the significant digits of the number in binary form.
01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 24
Representation of numbers in computer

‱ There are several common ways to represent numbers in computers:
‱ Floating-Point Representation

‱ Example: represent the floating-point number 3.14 using the IEEE 754 single-precision floating-point
format, which uses 32 bits.
‱ Answer

‱ Step 1: Convert 3.14 to binary: 11.001001001...
‱ Step 2: Normalize the binary representation: 11.001001001... becomes 1.1001001001... × 2^1.
‱ Step 3: Represent the sign, exponent, and mantissa:
‱ Since 3.14 is positive, the sign bit is 0.
‱ The exponent is biased by 127, so the exponent is 1 + 127 = 128, which is represented as 10000000 in binary.
‱ The mantissa is the fractional part of the normalized binary representation, which is 1001001001...
(excluding the leading 1).
‱ Putting it all together:
‱ Sign Bit: 0
‱ Exponent: 10000000
‱ Mantissa: 10010010010000000000000 (23 bits)
‱ So, the IEEE 754 single-precision floating-point representation of 3.14 is:
‱ 0 10000000 10010010010000000000000
01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 25
Representation of numbers in computer

‱ There are several common ways to represent
numbers in computers:
‱ Character Representation:
‱ Characters, symbols, and text are represented using character
encoding schemes such as ASCII (American Standard Code
for Information Interchange) and Unicode.
‱ Hexadecimal Representation:
‱ Hexadecimal notation (base-16) is commonly used in
computing for representing binary numbers more compactly.
‱ Each hexadecimal digit represents four bits (a nibble) of
binary data.
‱ Hexadecimal notation is often used in memory addresses,
bitwise operations, and debugging.
01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 26
Computer Generations
‱ First Generation (1940s - 1950s):
‱ Vacuum Tubes: The first generation of computers used vacuum tube technology
for electronic components.
‱ Mainframes: Computers were large, expensive, and primarily used by
government and research institutions for complex calculations.
‱ Examples: ENIAC, UNIVAC, EDVAC.
‱ Second Generation (1950s - 1960s):
‱ Transistors: Transistors replaced vacuum tubes, leading to smaller, faster, and
more reliable computers.
‱ Batch Processing: Operating systems introduced batch processing, allowing
multiple jobs to be processed sequentially without user interaction.
‱ Examples: IBM 1401, IBM 7090, CDC 1604.
01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 27
Computer Generations

‱ Third Generation (1960s - 1970s):
‱ Integrated Circuits: Integrated circuits (ICs) were developed, combining multiple transistors
on a single semiconductor chip.
‱ Minicomputers: Smaller and more affordable computers called minicomputers became
available, expanding access to computing.
‱ Time-Sharing Systems: Time-sharing operating systems allowed multiple users to interact
with a computer simultaneously.
‱ Examples: IBM System/360, DEC PDP-11, HP 2100.
‱ Fourth Generation (1970s - 1980s):
‱ Microprocessors: Microprocessors, consisting of an entire CPU on a single chip,
revolutionized computing by enabling personal computers.
‱ Personal Computers: The rise of personal computers (PCs) brought computing into homes
and businesses, leading to widespread adoption.
‱ Graphical User Interfaces (GUI): GUIs introduced intuitive interfaces with graphical
elements like icons and windows.
‱ Examples: IBM PC, Apple II, Commodore 64.
01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 28
Computer Generations

‱ Fifth Generation (1980s - Present):
‱ Advancements in VLSI: Very Large Scale Integration (VLSI) allowed for the
integration of millions of transistors on a single chip.
‱ Networking and the Internet: Networking technologies and the internet
transformed communication and collaboration.
‱ Mobile and Embedded Systems: Mobile devices, embedded systems, and
wearable technology became ubiquitous.
‱ Examples: IBM AS/400, Apple Macintosh, IBM ThinkPad, smartphones, IoT
devices.
01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 29
Exercise
1. What is a CPU, and what is its role in a computer system?
2. Describe the difference between RAM and ROM memory in a computer.
3. What is an operating system, and what functions does it perform?
4. Explain the difference between binary and decimal number systems.
5. What is a computer network, and how does it facilitate communication between devices?
6. What are the primary components of a computer system, and what roles do they play?
7. Describe the function and importance of the CPU (Central Processing Unit) in a computer.
8. What is the difference between HDD (Hard Disk Drive) and SSD (Solid State Drive)
storage devices, and what are their advantages and disadvantages?
9. Explain the purpose and functionality of RAM (Random Access Memory) in a computer
system.
10. How do input and output devices facilitate communication between users and computers,
and what are some examples of each?
01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 30
Exercise

11. What is software, and how does it differ from hardware in a computer system?
12. What is the role of system software in a computer, and what are some examples of system software?
13. Describe the functions and categories of application software, providing examples of each category.
14. Explain the difference between proprietary software and open-source software, and provide examples of
each.
15. How do operating systems interact with application software, and why is compatibility important for
software development and usage?
16. What are the main characteristics of first-generation programming languages, and what were some of
the earliest examples?
17. Describe the transition from assembly language to high-level programming languages. What were some
of the key features introduced in high-level languages?
18. How did the development of object-oriented programming languages contribute to the evolution of
software development practices?
19. What role did the internet and the rise of web technologies play in shaping modern programming
languages and frameworks?
20. Explain the significance of domain-specific languages (DSLs) in addressing specialized programming
needs, and provide examples of popular DSLs in various domains.
01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 31
Exercise

21. What is the central processing unit (CPU) in a computer system, and what are its main components?
22. Describe the role of memory in a computer system, including the different types of memory and their
functions.
23. What is the function of input/output (I/O) devices in a computer, and how do they interact with the
CPU and memory?
24. Explain the concept of system bus in computer architecture, and how does it facilitate communication
between different components of a computer system?
25. What is instruction set architecture (ISA), and how does it define the interface between hardware and
software in a computer system?
26. What is the CPU, and what role does it play in a computer system?
27. Describe the components of a CPU and their functions.
28. How does the CPU execute instructions stored in memory?
29. What factors affect the performance of a CPU, and how are CPUs typically measured in terms of
performance?
30. Explain the difference between single-core and multi-core CPUs, and discuss the advantages and
disadvantages of each.
01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 32
Exercise

31. What is binary notation, and how is it used to represent numbers in computers?
32. Describe the difference between signed and unsigned integer representation in computer
systems.
33. How does two's complement notation allow computers to represent negative integers?
34. What is floating-point representation, and how is it used to represent real numbers in
computers?
35. Explain the IEEE 754 standard for floating-point representation and its components.
36. What is character encoding, and how are characters represented in computer systems?
37. Describe the hexadecimal number system and its use in computer programming.
38. How does the representation of numbers in computers affect arithmetic operations such as
addition, subtraction, multiplication, and division?
39. What are the advantages and disadvantages of using different representations for numbers in
computer systems?
40. How does the representation of numbers in computers impact the accuracy and precision of
calculations performed by software programs?
01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 33
Exercise

41. What defines a computer generation, and what are the key characteristics of each generation?
42. Describe the technological advancements that distinguish one computer generation from another.
43. How did the size, cost, and accessibility of computers change across different generations?
44. Explain the impact of each computer generation on computing applications, industries, and society.
45. What trends or developments are expected in future computer generations, and how might they
shape the future of computing technology?
46. What defines a computer generation, and what are the key characteristics of each generation?
47. Describe the technological advancements that distinguish one computer generation from another.
48. How did the size, cost, and accessibility of computers change across different generations?
49. Explain the impact of each computer generation on computing applications, industries, and society.
50. What trends or developments are expected in future computer generations, and how might they
shape the future of computing technology?
01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 34
Exercise

51. In what ways do modern programming languages handle memory management differently
compared to early languages like C or assembly?
52. Can you explain the differences between RISC and CISC architectures and provide examples of
processors that use each?
53. How does the IEEE 754 floating-point standard ensure consistency and accuracy in representing
real numbers across different computer systems?
54. Describe the differences between system software and application software, and provide examples
of each that illustrate their roles in a computing environment.
55. Discuss the challenges and strategies involved in optimizing software performance across diverse
hardware architectures and platforms.
56. What defines a computer generation, and what are the key characteristics of each generation?
57. Describe the technological advancements that distinguish one computer generation from another.
58. How did the size, cost, and accessibility of computers change across different generations?
59. Explain the impact of each computer generation on computing applications, industries, and society.
60. What trends or developments are expected in future computer generations, and how might they
shape the future of computing technology?
01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 35
Exercise

61. In what ways do modern programming languages handle memory management differently compared to
early languages like C or assembly?
62. Can you explain the differences between RISC and CISC architectures and provide examples of
processors that use each?
63. How does the IEEE 754 floating-point standard ensure consistency and accuracy in representing real
numbers across different computer systems?
64. Describe the differences between system software and application software, and provide examples of
each that illustrate their roles in a computing environment.
65. Discuss the challenges and strategies involved in optimizing software performance across diverse
hardware architectures and platforms.
66. What are the primary components of a computer system, and how do they interact to perform
computations?
67. Describe the purpose and function of the CPU (Central Processing Unit) in a computer.
68. Explain the role of memory in a computer system, including the difference between RAM and ROM.
69. How do input and output devices facilitate communication between users and computers?
70. Discuss the significance of binary notation in representing data and instructions in computers.
01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 36
Exercise

71. What is a programming language, and why are they necessary for software development?
72. Describe the difference between high-level and low-level programming languages, and provide
examples of each.
73. How do programming paradigms, such as procedural, object-oriented, and functional programming,
influence language design and usage?
74. Explain the concept of syntax and semantics in programming languages, and why they are important
for writing correct code.
75. What factors might influence the choice of programming language for a particular software project?
76. Discuss the Von Neumann architecture and its impact on modern computer systems.
77. Explain the role of the system bus in facilitating communication between different components of a
computer system.
78. What is the difference between Harvard architecture and Von Neumann architecture, and how do
they affect computer performance?
79. Describe the purpose and function of cache memory in a computer system.
80. How do pipelining and parallel processing improve the performance of CPUs?
01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 37
Exercise

81. Describe the binary, decimal, octal, and hexadecimal number systems, and explain their relevance in
computing.
82. What is two's complement notation, and how is it used to represent negative integers in computers?
83. Discuss the IEEE 754 standard for floating-point representation, and explain its significance in
representing real numbers in computers.
84. How does character encoding work, and why is it important for representing text in computers?
85. Explain the concept of endianness in computer architecture, and discuss its implications for data
storage and communication.
86. What is system software, and what functions does it perform in a computer system?
87. Describe the difference between operating systems, device drivers, and utility programs, providing
examples of each.
88. Discuss the role of compilers, interpreters, and assemblers in the software development process.
89. What are application software, and how do they differ from system software? Provide examples of
common application software categories.
90. Explain the concept of software licensing, including the difference between proprietary and open-
source software licenses.
01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 38
01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 39
Reference
01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 40
Thank You!
???
@Letsgo

More Related Content

Similar to Introduction to Computer Program -1.pptx (20)

PPTX
Essentials of Computer Science Engineering.pptx
HPBackup2
 
PPTX
Install Software Application (2).pptx exct
kebimesay23
 
PPTX
Install Software Application (2).pptxfdhg
kebimesay23
 
PPT
C# programming language by dr. Yousef.ppt
WaleedMamdouh9
 
PPTX
The computer by pradeep
Pradeep sagar
 
PDF
Lecture1.pdf
JoyPalit
 
PPTX
COMPUTER HARDWARE AND SOFTWARE.pptx
Abhishek Sonker
 
PPT
Lecture 12-1234865709062834-2
Sami Khan
 
PPT
1 introduction-to-computer
Rohit Shrivastava
 
PDF
C with lab
ParveenSingh73
 
PDF
A level-computing-9691-paper-1-notes
huzyrah
 
PPTX
Topic -Anatomy of Computer.pptx
PragatiKachhi1
 
PPTX
lecture Slides - Week 1.programming fundamentals
fazayn927
 
PPT
GRADE 8 - COMPONENTS OF PC COMPONENTS OF PC
teachertalha
 
DOC
Exam 1 in ITEP 132
Laguna State Polytechnic University
 
PPT
seminar about Computer-system consist of 10 slides.ppt
renwr2000
 
PDF
Week 01.pdf
ChuadaryUsamaGujjar
 
PDF
Computer Programming.pdf
LegesseSamuel
 
PDF
C PROGRAMING AND PC
4044uday
 
PPT
Lecture 1 2
guest8d58d3
 
Essentials of Computer Science Engineering.pptx
HPBackup2
 
Install Software Application (2).pptx exct
kebimesay23
 
Install Software Application (2).pptxfdhg
kebimesay23
 
C# programming language by dr. Yousef.ppt
WaleedMamdouh9
 
The computer by pradeep
Pradeep sagar
 
Lecture1.pdf
JoyPalit
 
COMPUTER HARDWARE AND SOFTWARE.pptx
Abhishek Sonker
 
Lecture 12-1234865709062834-2
Sami Khan
 
1 introduction-to-computer
Rohit Shrivastava
 
C with lab
ParveenSingh73
 
A level-computing-9691-paper-1-notes
huzyrah
 
Topic -Anatomy of Computer.pptx
PragatiKachhi1
 
lecture Slides - Week 1.programming fundamentals
fazayn927
 
GRADE 8 - COMPONENTS OF PC COMPONENTS OF PC
teachertalha
 
seminar about Computer-system consist of 10 slides.ppt
renwr2000
 
Week 01.pdf
ChuadaryUsamaGujjar
 
Computer Programming.pdf
LegesseSamuel
 
C PROGRAMING AND PC
4044uday
 
Lecture 1 2
guest8d58d3
 

More from Aksum Institute of Technology(AIT, @Letsgo) (14)

PPTX
Ns lecture5: Introduction to Computer, Information, and Network Security.
Aksum Institute of Technology(AIT, @Letsgo)
 
PPTX
Ns lecture4: Introduction to Virtual Network Protocol(VPN) and Internet Proto...
Aksum Institute of Technology(AIT, @Letsgo)
 
PPTX
Ns lecture3: Introduction to Multi Protocol Label Switching(MPLS)
Aksum Institute of Technology(AIT, @Letsgo)
 
PPTX
Ns lecture2: Introduction to LAN Technology
Aksum Institute of Technology(AIT, @Letsgo)
 
PPTX
Ns lecture1: Introduction to Routing Protocol
Aksum Institute of Technology(AIT, @Letsgo)
 
PPTX
Logic Simulation, Modeling, and Testing
Aksum Institute of Technology(AIT, @Letsgo)
 
PDF
Introduction to network security and lan technology
Aksum Institute of Technology(AIT, @Letsgo)
 
PPTX
Basic Computer Organization and Design
Aksum Institute of Technology(AIT, @Letsgo)
 
PPTX
Weather Forecasting using Deep Learning A lgorithm for the Ethiopian Context
Aksum Institute of Technology(AIT, @Letsgo)
 
Ns lecture5: Introduction to Computer, Information, and Network Security.
Aksum Institute of Technology(AIT, @Letsgo)
 
Ns lecture4: Introduction to Virtual Network Protocol(VPN) and Internet Proto...
Aksum Institute of Technology(AIT, @Letsgo)
 
Ns lecture3: Introduction to Multi Protocol Label Switching(MPLS)
Aksum Institute of Technology(AIT, @Letsgo)
 
Ns lecture2: Introduction to LAN Technology
Aksum Institute of Technology(AIT, @Letsgo)
 
Ns lecture1: Introduction to Routing Protocol
Aksum Institute of Technology(AIT, @Letsgo)
 
Logic Simulation, Modeling, and Testing
Aksum Institute of Technology(AIT, @Letsgo)
 
Introduction to network security and lan technology
Aksum Institute of Technology(AIT, @Letsgo)
 
Basic Computer Organization and Design
Aksum Institute of Technology(AIT, @Letsgo)
 
Weather Forecasting using Deep Learning A lgorithm for the Ethiopian Context
Aksum Institute of Technology(AIT, @Letsgo)
 
Ad

Recently uploaded (20)

PPTX
Artificial Intelligence in Gastroentrology: Advancements and Future Presprec...
AyanHossain
 
PPTX
20250924 Navigating the Future: How to tell the difference between an emergen...
McGuinness Institute
 
PPTX
Digital Professionalism and Interpersonal Competence
rutvikgediya1
 
PDF
TOP 10 AI TOOLS YOU MUST LEARN TO SURVIVE IN 2025 AND ABOVE
digilearnings.com
 
PPTX
Command Palatte in Odoo 18.1 Spreadsheet - Odoo Slides
Celine George
 
PPT
DRUGS USED IN THERAPY OF SHOCK, Shock Therapy, Treatment or management of shock
Rajshri Ghogare
 
DOCX
pgdei-UNIT -V Neurological Disorders & developmental disabilities
JELLA VISHNU DURGA PRASAD
 
PPTX
How to Track Skills & Contracts Using Odoo 18 Employee
Celine George
 
PDF
The Minister of Tourism, Culture and Creative Arts, Abla Dzifa Gomashie has e...
nservice241
 
PPTX
TOP 10 AI TOOLS YOU MUST LEARN TO SURVIVE IN 2025 AND ABOVE
digilearnings.com
 
PDF
Virat Kohli- the Pride of Indian cricket
kushpar147
 
PPTX
PROTIEN ENERGY MALNUTRITION: NURSING MANAGEMENT.pptx
PRADEEP ABOTHU
 
PPTX
INTESTINALPARASITES OR WORM INFESTATIONS.pptx
PRADEEP ABOTHU
 
PPTX
Top 10 AI Tools, Like ChatGPT. You Must Learn In 2025
Digilearnings
 
PPTX
Dakar Framework Education For All- 2000(Act)
santoshmohalik1
 
PPTX
CONCEPT OF CHILD CARE. pptx
AneetaSharma15
 
PDF
Module 2: Public Health History [Tutorial Slides]
JonathanHallett4
 
PPTX
ENGLISH 8 WEEK 3 Q1 - Analyzing the linguistic, historical, andor biographica...
OliverOllet
 
PPTX
Python-Application-in-Drug-Design by R D Jawarkar.pptx
Rahul Jawarkar
 
PPTX
Basics and rules of probability with real-life uses
ravatkaran694
 
Artificial Intelligence in Gastroentrology: Advancements and Future Presprec...
AyanHossain
 
20250924 Navigating the Future: How to tell the difference between an emergen...
McGuinness Institute
 
Digital Professionalism and Interpersonal Competence
rutvikgediya1
 
TOP 10 AI TOOLS YOU MUST LEARN TO SURVIVE IN 2025 AND ABOVE
digilearnings.com
 
Command Palatte in Odoo 18.1 Spreadsheet - Odoo Slides
Celine George
 
DRUGS USED IN THERAPY OF SHOCK, Shock Therapy, Treatment or management of shock
Rajshri Ghogare
 
pgdei-UNIT -V Neurological Disorders & developmental disabilities
JELLA VISHNU DURGA PRASAD
 
How to Track Skills & Contracts Using Odoo 18 Employee
Celine George
 
The Minister of Tourism, Culture and Creative Arts, Abla Dzifa Gomashie has e...
nservice241
 
TOP 10 AI TOOLS YOU MUST LEARN TO SURVIVE IN 2025 AND ABOVE
digilearnings.com
 
Virat Kohli- the Pride of Indian cricket
kushpar147
 
PROTIEN ENERGY MALNUTRITION: NURSING MANAGEMENT.pptx
PRADEEP ABOTHU
 
INTESTINALPARASITES OR WORM INFESTATIONS.pptx
PRADEEP ABOTHU
 
Top 10 AI Tools, Like ChatGPT. You Must Learn In 2025
Digilearnings
 
Dakar Framework Education For All- 2000(Act)
santoshmohalik1
 
CONCEPT OF CHILD CARE. pptx
AneetaSharma15
 
Module 2: Public Health History [Tutorial Slides]
JonathanHallett4
 
ENGLISH 8 WEEK 3 Q1 - Analyzing the linguistic, historical, andor biographica...
OliverOllet
 
Python-Application-in-Drug-Design by R D Jawarkar.pptx
Rahul Jawarkar
 
Basics and rules of probability with real-life uses
ravatkaran694
 
Ad

Introduction to Computer Program -1.pptx

  • 1. Aksum University Aksum institute of Technology Faculty of Electrical and Computer Engineering Department of Computer Engineering Mr. Haftom Aregawi Computer Programming
  • 2. Outline ‱ Chapter one - Fundamental of Computer ‱ Chapter Two - Fundamental of C++ Program ‱ Chapter Three – Functions and Program Structures ‱ Chapter Four - Array ‱ Chapter Five - Pointers 01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 2
  • 3. Chapter one Fundamentals of Computer ‱ Introduction ‱ Hardware and Software Components of Computer ‱ Evolution of Programming Language ‱ Computer Architecture Basics ‱ Representation of numbers in computer ‱ Computer Generations ‱ Exercise 01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 3
  • 4. Introduction ‱ Computers are sophisticated electronic devices capable of processing vast amounts of data and executing complex instructions with incredible speed and accuracy. ‱ They have revolutionized communication, transformed industries, and empowered individuals worldwide. ‱ Computer can also be defined in terms of functions it can perform. A computer can: i) accept data, ii) store data, iii) process data as desired, and iv) retrieve the stored data as and when required and v) print the result in desired format. ‱ The major characteristics of a computer are high speed, accuracy, diligence, versatility and storage. 01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 4
  • 5. Hardware and Software Components of Computer ‱ Hardware Components of the Computer: ‱ Hardware refers to the physical components of a computer system. These components include the tangible parts of the computer that you can see and touch. ‱ Major components of computer: I. Central Processing Unit (CPU): Often referred to as the brain of the computer, the CPU is responsible for executing instructions and performing calculations. It processes data and controls the operation of other components. II. Main Memory (RAM): Random Access Memory temporarily stores data and instructions that the CPU needs to access quickly. RAM is volatile memory, meaning it loses its contents when the power is turned off. III. Secondary Storage Devices: These devices store data permanently or semi- permanently. Examples include hard disk drives (HDDs), solid-state drives (SSDs), and optical drives (like CD/DVD drives) 01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 5
  • 6. Hardware and Software Components of Computer
 ‱ Hardware Components of the Computer
 ‱ Major components of computer
 IV. Input Devices: These devices allow users to input data into the computer. Common examples include keyboards, mice, touchpads, and touchscreens. V. Output Devices: Output devices display information processed by the computer. Examples include monitors, printers, speakers, and projectors. ‱ Additional components of computer: ‱ Motherboard: The motherboard is the main circuit board of the computer. It houses the CPU, memory, and other essential components and provides connections for peripherals. ‱ Power Supply Unit (PSU): The PSU converts electrical power from an outlet into a form that the computer can use. It supplies power to the various components of the computer. ‱ Graphics Processing Unit (GPU): The GPU is responsible for rendering images, videos, and graphics. It offloads graphical tasks from the CPU and is essential for gaming, video editing, and other graphics-intensive applications. 01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 6
  • 7. Hardware and Software Components of Computer
 ‱ Hardware Components of the Computer
 ‱ Additional components of computer: ‱ Cooling Systems: Computers generate heat during operation, and cooling systems, such as fans and heat sinks, help dissipate this heat to prevent overheating and maintain optimal performance. ‱ Software: ‱ Software refers to the programs, applications, and operating systems that enable a computer to perform various tasks and interact with users and other software. It encompasses the intangible instructions and data that tell the computer's hardware what to do. 01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 7
  • 8. Hardware and Software Components of Computer
 ‱ Software
 ‱ Software can be categorized into several types based on its purpose, functionality, and target users. Here are some common types of software: ‱ System Software: ‱ System software refers to the core software that manages and controls the hardware components of a computer system and provides a platform for running application software. It acts as an intermediary between the hardware and the end-user applications, facilitating communication and coordination between them. System software includes several essential components: ‱ Operating Systems: Manage hardware resources and provide a user interface for interacting with the computer. Examples include Windows, macOS, Linux, and Android. ‱ Device Drivers: Facilitate communication between the operating system and hardware devices. ‱ Utility Software: Tools and programs designed to optimize, maintain, and manage computer systems. Examples include antivirus software, disk cleanup utilities, and backup tools. 01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 8
  • 9. Hardware and Software Components of Computer
 ‱ Software
 ‱ Application Software: ‱ Application software, also known as applications or apps, refers to software programs designed to perform specific tasks or provide specific functionality for users. Example: ‱ Productivity Software: Helps users create, edit, and manage documents, spreadsheets, presentations, etc. Examples include Microsoft Office (Word, Excel, PowerPoint), Google Workspace, and LibreOffice. ‱ Communication Software: Enables communication between users, such as email clients, instant messaging apps, and video conferencing software. ‱ Web Browsers: Software for accessing and browsing the internet, such as Google Chrome, Mozilla Firefox, Microsoft Edge, and Safari. ‱ Multimedia Software: Allows users to create, edit, and play multimedia content, including audio, video, and images. Examples include media players, video editors, and graphic design software. 01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 9
  • 10. Hardware and Software Components of Computer
 ‱ Software
 ‱ Application Software
 ‱ Educational Software: Designed to facilitate learning and educational activities, including interactive tutorials, simulations, and virtual learning environments. ‱ Financial Software: Helps users manage personal or business finances, including accounting software, tax preparation tools, and budgeting applications. ‱ Enterprise Software: Software designed for businesses and organizations to manage operations, processes, and resources. Examples include customer relationship management (CRM) software, enterprise resource planning (ERP) systems, and project management tools. 01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 10
  • 11. Hardware and Software Components of Computer
 ‱ Software
 ‱ Development Software: ‱ Integrated Development Environments (IDEs): Software tools that provide comprehensive facilities for software development, including code editors, debuggers, and compilers. ‱ Version Control Systems: Tools for managing changes to source code and coordinating work among developers, such as Git and Subversion. ‱ Database Management Systems (DBMS): Software for creating, managing, and querying databases, such as MySQL, PostgreSQL, Oracle Database, and Microsoft SQL Server. 01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 11
  • 12. Hardware and Software Components of Computer
 ‱ Software
 ‱ Embedded Software: ‱ Software embedded into hardware devices or systems to control their operation. Examples include firmware in IoT devices, automotive systems, consumer electronics, and industrial machinery. ‱ Mobile Apps: ‱ Software applications designed to run on mobile devices like smartphones and tablets, available through app stores. They include a wide range of categories like productivity, social networking, gaming, entertainment, and utilities. 01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 12
  • 13. Evolution of Programming Language ‱ Programming languages are categorized into five generations. These programming languages can be categorized into low level and high- level languages. ‱ Low level languages are machine specific or dependent. ‱ High level languages like COBOL, BASIC are machine independent and can run on variety of computers. ‱ Note: the first and second-generations are low level languages and the rest are high level programming languages. 01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 13
  • 14. Evolution of Programming Language
 ‱ First Generation (1940s - 1950s): ‱ Machine Language: The earliest programming languages were machine languages, consisting of binary code (0s and 1s) directly understood by computers. ‱ Each instruction corresponded to a specific operation performed by the computer's hardware. ‱ Programming in machine language required detailed knowledge of the computer's architecture ‱ It was highly error-prone and tedious. 01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 14
  • 15. Evolution of Programming Language
 ‱ Second Generation (1950s - 1960s): ‱ Assembly Language: Assembly language introduced symbolic representations of machine instructions, using mnemonic codes to represent operations and memory addresses. ‱ While still closely tied to the computer's hardware, assembly language provided a more readable and manageable alternative to machine language, enabling programmers to write code with more abstraction. ‱ Third Generation (1960s - 1970s): ‱ High-Level Languages: Third-generation languages (3GLs) introduced higher levels of abstraction and were designed to be more human-readable and programmer-friendly. ‱ Examples include COBOL, Fortran, ALGOL, and BASIC. ‱ These languages introduced features like variables, loops, conditionals, and functions, making it easier to write and maintain complex programs. 01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 15
  • 16. Evolution of Programming Language
 ‱ Fourth Generation (1970s - Present): ‱ Domain-Specific Languages (DSLs): Fourth-generation languages (4GLs) are specialized languages designed for specific application domains or tasks. ‱ They provide higher levels of abstraction and often include built-in support for common operations, such as database queries, report generation, and business process automation. ‱ Examples include SQL (Structured Query Language) for database management and MATLAB for numerical computing. ‱ Fifth Generation (Present and Beyond): ‱ Advanced and Specialized Languages: Fifth-generation languages are still evolving and encompass a wide range of advanced and specialized languages designed for specific purposes, such as artificial intelligence, machine learning, and parallel computing. ‱ These languages often incorporate features like concurrency, immutability, and functional programming paradigms. ‱ Examples include Python, Java, C++, and Swift. 01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 16
  • 17. Evolution of Programming Language
 ‱ The evolution of Operating Systems: ‱ 1950s - Early Mainframe Systems: ‱ Batch Processing Systems: Early operating systems were primarily designed for batch processing, where jobs were submitted in batches and processed sequentially without user interaction. Examples include the GM-NAA I/O for the IBM 704 and the IBM 7090. ‱ 1960s - Time-Sharing Systems: ‱ Time-Sharing Operating Systems: Time-sharing systems allowed multiple users to interact with a computer simultaneously, sharing its resources. IBM's CTSS (Compatible Time-Sharing System) and MIT's CTSS were notable examples of early time-sharing systems. 01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 17
  • 18. Evolution of Programming Language
 ‱ The evolution of Operating Systems
 ‱ 1970s - Rise of Minicomputers and Microcomputers: ‱ Multics and UNIX: Multics, developed by MIT, Bell Labs, and General Electric, was a pioneering time-sharing operating system. UNIX, inspired by Multics, was developed at Bell Labs and became one of the most influential operating systems in history, particularly in the development of subsequent systems. ‱ 1980s - Personal Computers and Graphical User Interfaces (GUIs): ‱ DOS and Windows: MS-DOS (Microsoft Disk Operating System) was the dominant operating system for IBM-compatible personal computers in the 1980s. The release of Windows 1.0 in 1985 marked the beginning of Microsoft's transition to GUI-based operating systems. ‱ Macintosh System Software: Apple's Macintosh System Software introduced the Macintosh operating system (later macOS), which featured a graphical user interface and became popular among home and business users. 01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 18
  • 19. Evolution of Programming Language
 ‱ The evolution of Operating Systems
 ‱ 1990s - Client-Server Computing and Networked Environments: ‱ Windows NT and Windows 95: Windows NT, released in 1993, introduced a new architecture for Microsoft's operating systems, designed for high reliability and scalability. Windows 95 brought significant improvements in usability and multimedia capabilities to the Windows platform. ‱ Linux: Linux, an open-source Unix-like operating system kernel, was developed by Linus Torvalds and released in 1991. It quickly gained popularity in server environments and became a cornerstone of the open-source software movement. ‱ 2000s - Internet and Mobile Computing: ‱ Windows XP and macOS: Windows XP, released in 2001, became one of Microsoft's most successful operating systems, offering improved stability, security, and multimedia features. macOS (formerly Mac OS X) introduced a Unix-based architecture and became the foundation for Apple's desktop and server operating systems. ‱ Mobile Operating Systems: The rise of smartphones led to the development of mobile operating systems such as iOS (Apple), Android (Google), and Windows Mobile (Microsoft), which revolutionized personal computing and communication. 01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 19
  • 20. Evolution of Programming Language
 ‱ The evolution of Operating Systems
 ‱ 2010s - Cloud Computing and Virtualization: ‱ Windows 7/8/10 and macOS: Microsoft's Windows 7, released in 2009, and subsequent versions continued to evolve with improved performance, security, and support for touch-based interfaces. macOS also saw regular updates and enhancements, integrating more tightly with iOS devices. ‱ Virtualization and Cloud Operating Systems: Virtualization technologies and cloud computing platforms emerged, enabling the creation of virtual machines and distributed computing environments. Operating systems like VMware ESXi, Microsoft Hyper-V, and cloud platforms like Amazon Web Services (AWS) and Microsoft Azure became prominent. ‱ 2020s - Continued Innovation and Convergence: ‱ The evolution of operating systems continues in the 2020s with a focus on security, privacy, and integration across devices and platforms. Trends such as containerization, edge computing, and AI-driven automation are shaping the future of operating systems in a rapidly evolving technological landscape. 01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 20
  • 21. Computer Architecture Basics ‱ Computer architecture refers to the design and organization of a computer system's components, including its hardware and software, to achieve specific performance objectives and functionality. 01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 21 ‱ Note: The CPU consists of an arithmetic logic unit (ALU) for performing computations, control unit (CU) for coordinating operations, and registers for temporary storage of data and instructions.
  • 22. Representation of numbers in computer ‱ Numbers in computers are represented using binary notation, which is a base- 2 numeral system consisting of only two digits: 0 and 1. In binary representation, each digit is called a bit (short for binary digit), and a sequence of bits represents a numeric value or other data. ‱ There are several common ways to represent numbers in computers: ‱ Unsigned Integer Representation: ‱ non-negative integers are represented using binary digits. ‱ Example: represent 42 integer number in binary notation using 8-bits ‱ Ans: 00101010 ‱ Signed Integer Representation: ‱ Signed integer representation extends unsigned integer representation to include negative numbers. ‱ Example: represent the signed integer -21 in binary notation using 8 bits with two's complement notation. ‱ Ans: 11101011 01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 22
  • 23. Representation of numbers in computer
 ‱ There are several common ways to represent numbers in computers: ‱ Floating-Point Representation: ‱ Floating-point representation is used to represent real numbers (numbers with fractional parts) in computers. ‱ It consists of three components: the sign bit (0 for positive, 1 for negative), the exponent, and the mantissa (or significand). ‱ The exponent represents the scale of the number, while the mantissa represents its precision. ‱ Floating-point representation follows standards such as IEEE 754, which defines formats for single-precision (32-bit) and double-precision (64-bit) floating-point numbers. ‱ Example: represent the floating-point number 3.14 using the IEEE 754 single-precision floating-point format, which uses 32 bits. 01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 23
  • 24. Representation of numbers in computer
 ‱ There are several common ways to represent numbers in computers: ‱ Floating-Point Representation
 ‱ Example: represent the floating-point number 3.14 using the IEEE 754 single-precision floating- point format, which uses 32 bits. ‱ Answer: ‱ The IEEE 754 single-precision floating-point format consists of three components: the sign bit, the exponent, and the mantissa (or significand). ‱ Sign Bit: 1 bit. ‱ The leftmost bit (most significant bit) represents the sign of the number: 0 for positive and 1 for negative. ‱ Exponent: 8 bits. ‱ The next 8 bits represent the exponent of the number. ‱ The exponent is biased by a constant value (127 in single-precision format) to allow for both positive and negative exponents. ‱ Mantissa: 23 bits. ‱ The remaining 23 bits represent the mantissa (or significand) of the number. ‱ The mantissa represents the significant digits of the number in binary form. 01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 24
  • 25. Representation of numbers in computer
 ‱ There are several common ways to represent numbers in computers: ‱ Floating-Point Representation
 ‱ Example: represent the floating-point number 3.14 using the IEEE 754 single-precision floating-point format, which uses 32 bits. ‱ Answer
 ‱ Step 1: Convert 3.14 to binary: 11.001001001... ‱ Step 2: Normalize the binary representation: 11.001001001... becomes 1.1001001001... × 2^1. ‱ Step 3: Represent the sign, exponent, and mantissa: ‱ Since 3.14 is positive, the sign bit is 0. ‱ The exponent is biased by 127, so the exponent is 1 + 127 = 128, which is represented as 10000000 in binary. ‱ The mantissa is the fractional part of the normalized binary representation, which is 1001001001... (excluding the leading 1). ‱ Putting it all together: ‱ Sign Bit: 0 ‱ Exponent: 10000000 ‱ Mantissa: 10010010010000000000000 (23 bits) ‱ So, the IEEE 754 single-precision floating-point representation of 3.14 is: ‱ 0 10000000 10010010010000000000000 01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 25
  • 26. Representation of numbers in computer
 ‱ There are several common ways to represent numbers in computers: ‱ Character Representation: ‱ Characters, symbols, and text are represented using character encoding schemes such as ASCII (American Standard Code for Information Interchange) and Unicode. ‱ Hexadecimal Representation: ‱ Hexadecimal notation (base-16) is commonly used in computing for representing binary numbers more compactly. ‱ Each hexadecimal digit represents four bits (a nibble) of binary data. ‱ Hexadecimal notation is often used in memory addresses, bitwise operations, and debugging. 01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 26
  • 27. Computer Generations ‱ First Generation (1940s - 1950s): ‱ Vacuum Tubes: The first generation of computers used vacuum tube technology for electronic components. ‱ Mainframes: Computers were large, expensive, and primarily used by government and research institutions for complex calculations. ‱ Examples: ENIAC, UNIVAC, EDVAC. ‱ Second Generation (1950s - 1960s): ‱ Transistors: Transistors replaced vacuum tubes, leading to smaller, faster, and more reliable computers. ‱ Batch Processing: Operating systems introduced batch processing, allowing multiple jobs to be processed sequentially without user interaction. ‱ Examples: IBM 1401, IBM 7090, CDC 1604. 01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 27
  • 28. Computer Generations
 ‱ Third Generation (1960s - 1970s): ‱ Integrated Circuits: Integrated circuits (ICs) were developed, combining multiple transistors on a single semiconductor chip. ‱ Minicomputers: Smaller and more affordable computers called minicomputers became available, expanding access to computing. ‱ Time-Sharing Systems: Time-sharing operating systems allowed multiple users to interact with a computer simultaneously. ‱ Examples: IBM System/360, DEC PDP-11, HP 2100. ‱ Fourth Generation (1970s - 1980s): ‱ Microprocessors: Microprocessors, consisting of an entire CPU on a single chip, revolutionized computing by enabling personal computers. ‱ Personal Computers: The rise of personal computers (PCs) brought computing into homes and businesses, leading to widespread adoption. ‱ Graphical User Interfaces (GUI): GUIs introduced intuitive interfaces with graphical elements like icons and windows. ‱ Examples: IBM PC, Apple II, Commodore 64. 01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 28
  • 29. Computer Generations
 ‱ Fifth Generation (1980s - Present): ‱ Advancements in VLSI: Very Large Scale Integration (VLSI) allowed for the integration of millions of transistors on a single chip. ‱ Networking and the Internet: Networking technologies and the internet transformed communication and collaboration. ‱ Mobile and Embedded Systems: Mobile devices, embedded systems, and wearable technology became ubiquitous. ‱ Examples: IBM AS/400, Apple Macintosh, IBM ThinkPad, smartphones, IoT devices. 01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 29
  • 30. Exercise 1. What is a CPU, and what is its role in a computer system? 2. Describe the difference between RAM and ROM memory in a computer. 3. What is an operating system, and what functions does it perform? 4. Explain the difference between binary and decimal number systems. 5. What is a computer network, and how does it facilitate communication between devices? 6. What are the primary components of a computer system, and what roles do they play? 7. Describe the function and importance of the CPU (Central Processing Unit) in a computer. 8. What is the difference between HDD (Hard Disk Drive) and SSD (Solid State Drive) storage devices, and what are their advantages and disadvantages? 9. Explain the purpose and functionality of RAM (Random Access Memory) in a computer system. 10. How do input and output devices facilitate communication between users and computers, and what are some examples of each? 01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 30
  • 31. Exercise
 11. What is software, and how does it differ from hardware in a computer system? 12. What is the role of system software in a computer, and what are some examples of system software? 13. Describe the functions and categories of application software, providing examples of each category. 14. Explain the difference between proprietary software and open-source software, and provide examples of each. 15. How do operating systems interact with application software, and why is compatibility important for software development and usage? 16. What are the main characteristics of first-generation programming languages, and what were some of the earliest examples? 17. Describe the transition from assembly language to high-level programming languages. What were some of the key features introduced in high-level languages? 18. How did the development of object-oriented programming languages contribute to the evolution of software development practices? 19. What role did the internet and the rise of web technologies play in shaping modern programming languages and frameworks? 20. Explain the significance of domain-specific languages (DSLs) in addressing specialized programming needs, and provide examples of popular DSLs in various domains. 01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 31
  • 32. Exercise
 21. What is the central processing unit (CPU) in a computer system, and what are its main components? 22. Describe the role of memory in a computer system, including the different types of memory and their functions. 23. What is the function of input/output (I/O) devices in a computer, and how do they interact with the CPU and memory? 24. Explain the concept of system bus in computer architecture, and how does it facilitate communication between different components of a computer system? 25. What is instruction set architecture (ISA), and how does it define the interface between hardware and software in a computer system? 26. What is the CPU, and what role does it play in a computer system? 27. Describe the components of a CPU and their functions. 28. How does the CPU execute instructions stored in memory? 29. What factors affect the performance of a CPU, and how are CPUs typically measured in terms of performance? 30. Explain the difference between single-core and multi-core CPUs, and discuss the advantages and disadvantages of each. 01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 32
  • 33. Exercise
 31. What is binary notation, and how is it used to represent numbers in computers? 32. Describe the difference between signed and unsigned integer representation in computer systems. 33. How does two's complement notation allow computers to represent negative integers? 34. What is floating-point representation, and how is it used to represent real numbers in computers? 35. Explain the IEEE 754 standard for floating-point representation and its components. 36. What is character encoding, and how are characters represented in computer systems? 37. Describe the hexadecimal number system and its use in computer programming. 38. How does the representation of numbers in computers affect arithmetic operations such as addition, subtraction, multiplication, and division? 39. What are the advantages and disadvantages of using different representations for numbers in computer systems? 40. How does the representation of numbers in computers impact the accuracy and precision of calculations performed by software programs? 01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 33
  • 34. Exercise
 41. What defines a computer generation, and what are the key characteristics of each generation? 42. Describe the technological advancements that distinguish one computer generation from another. 43. How did the size, cost, and accessibility of computers change across different generations? 44. Explain the impact of each computer generation on computing applications, industries, and society. 45. What trends or developments are expected in future computer generations, and how might they shape the future of computing technology? 46. What defines a computer generation, and what are the key characteristics of each generation? 47. Describe the technological advancements that distinguish one computer generation from another. 48. How did the size, cost, and accessibility of computers change across different generations? 49. Explain the impact of each computer generation on computing applications, industries, and society. 50. What trends or developments are expected in future computer generations, and how might they shape the future of computing technology? 01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 34
  • 35. Exercise
 51. In what ways do modern programming languages handle memory management differently compared to early languages like C or assembly? 52. Can you explain the differences between RISC and CISC architectures and provide examples of processors that use each? 53. How does the IEEE 754 floating-point standard ensure consistency and accuracy in representing real numbers across different computer systems? 54. Describe the differences between system software and application software, and provide examples of each that illustrate their roles in a computing environment. 55. Discuss the challenges and strategies involved in optimizing software performance across diverse hardware architectures and platforms. 56. What defines a computer generation, and what are the key characteristics of each generation? 57. Describe the technological advancements that distinguish one computer generation from another. 58. How did the size, cost, and accessibility of computers change across different generations? 59. Explain the impact of each computer generation on computing applications, industries, and society. 60. What trends or developments are expected in future computer generations, and how might they shape the future of computing technology? 01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 35
  • 36. Exercise
 61. In what ways do modern programming languages handle memory management differently compared to early languages like C or assembly? 62. Can you explain the differences between RISC and CISC architectures and provide examples of processors that use each? 63. How does the IEEE 754 floating-point standard ensure consistency and accuracy in representing real numbers across different computer systems? 64. Describe the differences between system software and application software, and provide examples of each that illustrate their roles in a computing environment. 65. Discuss the challenges and strategies involved in optimizing software performance across diverse hardware architectures and platforms. 66. What are the primary components of a computer system, and how do they interact to perform computations? 67. Describe the purpose and function of the CPU (Central Processing Unit) in a computer. 68. Explain the role of memory in a computer system, including the difference between RAM and ROM. 69. How do input and output devices facilitate communication between users and computers? 70. Discuss the significance of binary notation in representing data and instructions in computers. 01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 36
  • 37. Exercise
 71. What is a programming language, and why are they necessary for software development? 72. Describe the difference between high-level and low-level programming languages, and provide examples of each. 73. How do programming paradigms, such as procedural, object-oriented, and functional programming, influence language design and usage? 74. Explain the concept of syntax and semantics in programming languages, and why they are important for writing correct code. 75. What factors might influence the choice of programming language for a particular software project? 76. Discuss the Von Neumann architecture and its impact on modern computer systems. 77. Explain the role of the system bus in facilitating communication between different components of a computer system. 78. What is the difference between Harvard architecture and Von Neumann architecture, and how do they affect computer performance? 79. Describe the purpose and function of cache memory in a computer system. 80. How do pipelining and parallel processing improve the performance of CPUs? 01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 37
  • 38. Exercise
 81. Describe the binary, decimal, octal, and hexadecimal number systems, and explain their relevance in computing. 82. What is two's complement notation, and how is it used to represent negative integers in computers? 83. Discuss the IEEE 754 standard for floating-point representation, and explain its significance in representing real numbers in computers. 84. How does character encoding work, and why is it important for representing text in computers? 85. Explain the concept of endianness in computer architecture, and discuss its implications for data storage and communication. 86. What is system software, and what functions does it perform in a computer system? 87. Describe the difference between operating systems, device drivers, and utility programs, providing examples of each. 88. Discuss the role of compilers, interpreters, and assemblers in the software development process. 89. What are application software, and how do they differ from system software? Provide examples of common application software categories. 90. Explain the concept of software licensing, including the difference between proprietary and open- source software licenses. 01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 38
  • 39. 01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 39 Reference
  • 40. 01/28/2025 Computer Programming - Haftom A. (FECE-DCE) 40 Thank You! ??? @Letsgo