Introduction to Computers and Numbering Systems
A computer is an electronic device that accepts data (input), processes that data according to
a set of predefined instructions (a program), produces results (output), and stores the results
for future use. It is designed for individual use. Common examples include:
• Desktop Computers: For general use at a fixed location.
• Laptops/Notebooks: Portable, all-in-one computing devices.
• Workstations: High-powered desktops for specialized tasks (e.g., graphic design, engineering).
• Tablets and Smartphones: Mobile devices with computing capabilities.
Core Components of a Microcomputer (Hardware):
1. Central Processing Unit (CPU): The "brain" of the computer. It executes instructions from
software.
2. Memory (RAM - Random Access Memory): Temporary working space for the CPU. Data is
lost when the computer is turned off. More RAM allows for smoother multitasking.
3. Storage (HDD/SSD):
o Hard Disk Drive (HDD): Uses magnetic platters to store data permanently. Higher capacity,
slower speed.
o Solid State Drive (SSD): Uses flash memory (like a USB drive). No moving parts, much faster,
more durable, but more expensive per gigabyte.
4. Input Devices: Allow users to enter data and commands (e.g., keyboard, mouse, scanner,
microphone).
5. Output Devices: Communicate results to the user (e.g., monitor, printer, speakers).
6. Motherboard: The main circuit board that connects all components, allowing them to
communicate.
Software: The Instructions
Software is a set of instructions that tells the hardware what to do. It is divided into two main
categories:
1. System Software: Operates the hardware and provides a platform for running application
software.
o Operating System (OS): The most important software (e.g., Windows, macOS, Linux). It
manages memory, processes, and all hardware and software.
2. Application Software (Apps): Programs designed to help users perform specific tasks.
o Productivity Software: Word processors (MS Word, Google Docs), spreadsheets (MS Excel,
Google Sheets), presentation software (MS PowerPoint).
o Communication Software: Web browsers (Chrome, Firefox), email clients (Outlook), video
conferencing (Zoom, Teams).
o Specialized Software: Graphic design (Adobe Photoshop), accounting (QuickBooks),
programming environments (Visual Studio Code).
1
The Importance of Microcomputer Applications:
These tools are fundamental in academic, professional, and personal contexts. Proficiency in
them enhances:
• Efficiency: Automating calculations, organizing data.
• Communication: Creating professional documents and presentations.
• Data Analysis: Transforming raw data into meaningful insights.
• Problem-Solving: Using software as a tool to address complex tasks.
What is a Programming Language?
A programming language is a formal system of syntax and rules used to write instructions (code)
that a computer can execute. It acts as an intermediary between human logic and the binary
machine code (1s and 0s) that the computer's hardware understands.
1. Low-Level Languages
These languages are closer to the computer's native binary language and hardware. They offer
more control but are harder to write and understand.
• Machine Code (First Generation - 1GL): The raw, binary code that the CPU executes directly.
It is not written by humans but is the final output of all programming.
o Example: 10110000 01100001 (This is an instruction for an x86 CPU to move the value 97 into
a register).
• Assembly Language (Second Generation - 2GL): Uses simple abbreviations (mnemonics) and
symbols to represent machine code instructions. It requires an assembler to convert it to
machine code. It is specific to a processor's architecture.
o Example (x86 Assembly):
2. High-Level Languages
These languages use natural language elements (like English words) and mathematical notation.
They are easier for humans to read, write, and maintain. They must be translated into machine
code by a compiler or interpreter.
A. Procedural & Imperative Languages
Focus on a sequence of steps or procedures to solve a problem.
• C: A powerful, efficient, and widely used language. It's the foundation for operating systems
(like Windows and Linux), databases, and embedded systems.
• Pascal: Designed for teaching good programming practices. It's clear and verbose.
2
• Fortran (Formula Translation): One of the oldest languages, still dominant in scientific
computing, numerical analysis, and high-performance computing (e.g., weather forecasting
models).
• COBOL (Common Business-Oriented Language): Designed for business, finance, and
administrative systems. Still runs a massive amount of legacy systems in banks and
governments.
B. Object-Oriented Programming (OOP) Languages
Organize code around "objects" (which contain data and methods) rather than functions and
logic.
• Java: A "write once, run anywhere" language. It is compiled to bytecode that runs on the Java
Virtual Machine (JVM), making it highly portable. Extremely popular for large enterprise
applications, Android app development, and web back-ends.
• C++: An extension of the C language that adds object-oriented features. It is used where high
performance is critical: game engines (Unreal), graphics, browsers (Chrome), and high-
frequency trading.
• C# (C-Sharp): Developed by Microsoft as part of its .NET framework. Similar to Java, it is used
for developing Windows applications, web services, and games with the Unity engine.
• Python: A general-purpose language that supports multiple paradigms, including OOP. Known
for its simple, readable syntax.
C. Scripting Languages
Often interpreted rather than compiled. They are typically used to automate tasks, glue
components together, and for web development.
• JavaScript: The language for adding interactivity to web pages. It runs in every modern web
browser. Note: It is not related to Java despite the name.
o Example (Hello World in JavaScript, in a browser):
o PHP: A server-side scripting language designed specifically for web development. It powers a
large portion of the web, including platforms like WordPress.
o Ruby: Known for its elegant syntax and the Ruby on Rails web application framework.
D. Functional Languages
Focus on the evaluation of mathematical functions and avoids changing-state and mutable data.
• Haskell: A purely functional language known for its strong static typing and academic use.
• Lisp (and its dialect Scheme): One of the oldest high-level languages, known for its unique
parenthesized syntax. Influential in AI research.
3
• Scala: Runs on the JVM and combines object-oriented and functional programming concepts.
Often used as a more modern alternative to Java for big data processing (Apache Spark).
E. Special-Purpose Languages
Designed for a specific application domain.
• SQL (Structured Query Language): The standard language for managing and querying data in
relational database management systems (e.g., MySQL, PostgreSQL). It's declarative—you
specify what you want, not how to get it.
• R: Designed specifically for statistical computing, data analysis, and graphics. Heavily used in
academia and data science.
• MATLAB: A proprietary language and environment for numerical computation, matrix
manipulation, and algorithm prototyping, widely used in engineering and mathematics.
Summary Table for Various Programming Languages
Category Language Primary Use Case Key Feature
Low-Level Assembly Hardware drivers, firmware Direct hardware control
Operating systems, High performance,
Procedural C
embedded systems efficiency
Object- Enterprise apps, Android, Platform independence
Java
Oriented web back-end (JVM)
Object- Web, data science, AI,
Python Simple, readable syntax
Oriented scripting
Runs in every web
Scripting JavaScript Web front-end interactivity
browser
4
Category Language Primary Use Case Key Feature
Pure functional
Functional Haskell Academic research, teaching
programming
Special- Database queries and Declarative language
SQL
Purpose management for data
Numbering Systems
Why Study Numbering Systems?
Computers process all information—numbers, text, images, sound—as binary digits (1s and 0s).
Understanding how to represent numbers in different systems (binary, decimal, hexadecimal) is
crucial for understanding how computers work at a fundamental level.
1. Decimal System (Base-10)
• Base: 10
• Digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
• How it works: This is the system we use every day. Each digit's position represents a power of
10.
• Example: The number 345 is:
o (3 × 10²) + (4 × 10¹) + (5 × 10⁰) = (3 × 100) + (4 × 10) + (5 × 1) = 300 + 40 + 5
2. Binary System (Base-2)
• Base: 2
• Digits (Bits): 0, 1
• How it works: This is the native language of computers. Electronic circuits can easily represent
two states: ON (1) and OFF (0). Each digit's position represents a power of 2.
• Example: The binary number 1101 is:
o (1 × 2³) + (1 × 2²) + (0 × 2¹) + (1 × 2⁰) = (1 × 8) + (1 × 4) + (0 × 2) + (1 × 1) = 8 + 4 + 0 + 1 =
13 (in decimal)
• Terminology:
o Bit: A single binary digit (0 or 1).
o Nibble: 4 bits (e.g., 1011).
o Byte: 8 bits (e.g., 1100 1011). This is the fundamental unit of data storage.
3. Hexadecimal System (Base-16)
• Base: 16
5
• Digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F
o Where A=10, B=11, C=12, D=13, E=14, F=15.
• Why it's used: Binary numbers are long and hard for humans to read. Hexadecimal is a compact
and convenient shorthand for binary. One hex digit represents exactly four binary digits (a
nibble).
• Example: The hexadecimal number 2F is:
o (2 × 16¹) + (F × 16⁰) = (2 × 16) + (15 × 1) = 32 + 15 = 47 (in decimal)
• Conversion to Binary: Convert each hex digit to its 4-bit binary equivalent.
o Example: A3 in hex:
▪ A = 10 in decimal = 1010 in binary
▪ 3 = 3 in decimal = 0011 in binary
▪ So, A3 in hex = 1010 0011 in binary.
Quick Conversion Table
Decimal Binary (4-bit) Hexadecimal
0 0000 0
1 0001 1
2 0010 2
3 0011 3
4 0100 4
5 0101 5
6 0110 6
7 0111 7
8 1000 8
9 1001 9
10 1010 A
6
Decimal Binary (4-bit) Hexadecimal
11 1011 B
12 1100 C
13 1101 D
14 1110 E
15 1111 F