Introduction to Computers, Hardware, Data Storage, and Programming Logic
Overview of Computers and Software
Computer Utilization:
Educational Settings: Used for writing papers, conducting research, sending emails, and attending online classes.
Professional Settings: Used for analyzing data, creating business presentations, processing financial transactions, communicating with clients and staff, and controlling automated machinery.
Personal Settings: Used for paying household bills, online shopping, personal communication, and entertainment such as video games.
Devices Classified as Computers:
SmartPhones
MP3 Players
Tablets
Car Navigation Systems (GPS)
Programs and Software Defined:
Program Definition: A set of precise instructions that a computer follows to execute a specific task (e.g., Microsoft Word, Microsoft PowerPoint).
Software Terminology: Software is the general term used to describe computer programs.
Programmers and Software Developers: Individuals with specialized training and skills who design, write, test, and maintain software applications.
Hardware Components of a Computer System
Hardware Definition:
Hardware refers to all physical components that make up a computer system.
A computer is an integrated system of physical devices working together.
Primary Hardware Components:
Central Processing Unit (CPU)
Main Memory (RAM)
Secondary Storage Devices
Input Devices
Output Devices
Central Processing Unit (CPU):
Purpose: The central component responsible for executing program instructions. A computer cannot run software without a CPU.
Terminology: Often referred to as the processor. Running or executing a program refers to the process of performing the tasks dictated by the program instructions.
Historical Example (ENIAC):
Built in as the world's first programmable electronic computer.
Created to calculate artillery ballistic tables for the U.S. Army.
Physical Dimensions: CPU stood tall, spanned in length, and weighed .
Microprocessors:
Modern CPUs constructed as microprocessors are significantly smaller and vastly more powerful than early computers like ENIAC.
Memory and Data Storage
Main Memory (Random-Access Memory / RAM):
Serves as the active workspace of the computer, storing both the program currently running and the data being processed.
Allows rapid data access for processing tasks.
Volatile Nature: RAM provides temporary storage only; all content stored in RAM is erased when the computer is powered off.
Read-Only Memory (ROM):
Nonvolatile Storage: Contents remain intact even when the computer's power supply is disconnected.
Read-Only Operations: The computer can read instructions stored in ROM, but it cannot alter or write new data into ROM. System Usage: Stores vital startup programs, such as the initial bootstrap software executed whenever the system is turned on.
Secondary Storage Devices:
Function: Provides permanent, nonvolatile storage capable of retaining data and programs for long periods.
Magnetic Disk Drives: Encode data magnetically onto rotating circular disks. Installed internally in most computers or connected externally to create backup copies.
Solid-State Drives (SSD): Utilize solid-state memory with no moving internal components; operate significantly faster than mechanical disk drives.
Universal Serial Bus (USB) Drives: Portable storage devices plugging into standard USB ports. Use flash memory (also called memory sticks or flash drives) and offer cheap, reliable, compact storage.
Optical Storage Devices: Use CDs or DVDs where data is encoded as microscopic pits on the disc surface read by lasers; possess high storage capacity for data backups.
Cloud Storage: Data is stored on remote servers accessed via the internet or dedicated private networks. Allows remote access across multiple locations and acts as an off-site backup.
Input and Output Devices
Input Data and Devices:
Input Definition: Any information collected by the computer from human operators or external hardware.
Input Devices: Physical hardware components dedicated to gathering data.
Examples: Keyboards, mice, touch screens, scanners, microphones, and digital cameras.
Output Data and Devices:
Output Definition: Any information generated by the computer and presented to users or transmitted to external systems.
Output Devices: Physical hardware components dedicated to formatting and presenting output.
Examples: Computer monitors and printers.
Data Representation in Binary
Binary Encoding Principles:
All stored information inside a computer is converted into binary sequences composed strictly of s and s.
Memory Architecture (Bytes and Bits):
Byte: The primary unit of storage in computer memory; one byte represents a single data character or small number.
Bit (Binary Digit): Each individual byte is subdivided into smaller storage units known as bits.
Electrical Representation: Bits consist of tiny electrical components where a positive charge represents an "on" state (digit ) and a negative charge represents an "off" state (digit ).
Binary Number System:
Works on powers of to encode numerical values using sequences of s and s.
Single Byte Limits: An -bit byte can hold non-negative integer values ranging from to a maximum value of ().
Two-Byte Limits: Combining bytes ( bits) enables storage of integer values up to a maximum of ().
Character Representation Schemes:
ASCII (American Standard Code for Information Interchange): Consists of a set of numeric codes representing basic text characters. For example, uppercase letter 'A' corresponds to code 65$.\n * Unicode: An expanded, comprehensive coding standard fully compatible with ASCII that supports non-English language scripts and international symbols.\n* Complex Data Formats:\n * Standard Binary: Used to store positive integer numbers.\n * Two's Complement: Encoding technique used to store negative integers.\n * Floating-Point Notation: Encoding method used to store real numbers containing fractional components.\n* Digital Media Formats:\n * Digital Data: Information represented strictly in binary form.\n * Digital Images: Structured as grids of individual color elements called pixels (picture elements).\n * Digital Audio: Sound streams split into discrete, measurable units called samples.\n\n# Program Execution and the CPU\n\n* Operational Scope of the CPU:\n * The CPU is an electronic component built for strict execution of mechanical logic operations; it is not a conscious brain.\n* Permissible Primitive CPU Operations:\n * Reading a piece of data from a main memory location.\n * Adding two numbers together.\n * Subtracting one number from another.\n * Multiplying two numbers.\n * Dividing one number by another.\n * Moving a piece of data from one memory location to another.\n * Comparing two values to evaluate equality.\n* Machine Language and Instruction Sets:\n * Instruction Set: The total set of native operations a CPU model is designed to carry out.\n * Hardware Specificity: Microprocessor vendors such as Intel, AMD, and Motorola each design distinct instruction sets.\n * Machine Language: Binary instructions (01$$s) directly understood and run by the CPU hardware.
The Fetch-Decode-Execute Cycle:
Fetch Phase: The CPU reads the next binary instruction from main memory.
Decode Phase: The CPU decodes the fetched instruction to determine the operation to be performed.
Execute Phase: The CPU carries out the specified operation.
Programming Languages and Translation
Assembly Language:
A low-level programming abstraction designed to replace obscure binary machine code with short textual words called mnemonics.
Assembler: A conversion utility that translates assembly language source code directly into executable machine language.
High-Level Languages:
Languages allowing software creation through readable commands without requiring detailed knowledge of underlying CPU hardware operations.
Examples: Java, C++, Python, Visual Basic, Ada, Fortran, and C#.
Syntax Elements of High-Level Languages:
Key Words / Reserved Words: Predefined terms with specific, restricted meanings within a programming language.
Operators: Characters performing specialized mathematical or logical operations on data.
Syntax: The formal set of structural rules governing valid code composition.
Statements: Individual lines or execution units written in high-level code.
Program Translation Utilities:
Source Code: The high-level language statements written by a programmer.
Syntax Error: Code structural violations such as misspelled keywords, omitted punctuation, or invalid operator usage that prevent execution.
Compiler: A program translating an entire high-level program into a distinct machine language program file before execution.
Interpreter: A program translating and executing high-level statements line by line dynamically during runtime.
Categorization of Computer Software
System Software:
Software managing internal computer hardware infrastructure and operational security.
Operating Systems: Manage system hardware resource access and regulate attached hardware peripherals.
Utility Programs: Execute specialized maintenance, security, or data management functions.
Software Development Tools: Software suites used by programmers to write, edit, translate, and debug code.
Application Software:
End-user software designed for general tasks, including word processing, spreadsheets, databases, presentations, web browsing, and email communication.