Unit 1: Computer Fundamentals
I. Orientation — The Computer as a Data-Processing System
A computer is an electronic, programmable machine that accepts data as input, processes it according to stored instructions, produces information as output, and stores results for future use. Its operation follows the input–process–output–storage cycle, while all internal data is ultimately represented using binary digits.
- Data: Raw facts such as numbers, text, images, or measurements; for example,
72,"Asha", and a temperature reading of28°C. - Information: Data transformed into a meaningful form, such as a calculated class average of
72%. - Program: An ordered set of instructions directing the computer to perform a task.
- Hardware: Physical components, including the keyboard, processor, memory, monitor, and storage drive.
- Software: Programs and related data, such as an operating system, word processor, or web browser.
- Processing cycle:
- Input: Data and instructions enter the computer.
- Processing: The central processing unit performs arithmetic and logical operations.
- Output: Processed results are presented to the user.
- Storage: Data, programs, and results are retained.
- Digital representation: Computers encode information using two binary states, conventionally written as
0and1. - Units of data:
1 bitis one binary digit.4 bitsform a nibble.8 bitscommonly form a byte.- Larger units include kilobytes, megabytes, gigabytes, and terabytes.
II. Nature and Historical Development of Computers
A. Characteristics of computers
The main characteristics of computers arise from their ability to execute stored instructions electronically and repeatedly.
- Speed: A processor can execute millions or billions of operations per second; processor speed is commonly expressed in hertz, such as
3 GHz, meaning approximately three billion clock cycles per second. - Accuracy: A computer produces precise results when its hardware, data, and instructions are correct. An incorrect result often follows the GIGO principle—Garbage In, Garbage Out.
- Diligence: Unlike humans, computers do not become tired or lose concentration while repeating a task, such as processing thousands of payroll records.
- Automation: After a program and required data are supplied, operations can proceed automatically with limited human intervention.
- Storage capacity: Computers can store large quantities of data in compact devices; for example, a
1 TBdrive holds roughly one trillion bytes under decimal measurement. - Versatility: The same computer can support calculation, communication, document preparation, entertainment, design, and scientific analysis by running different software.
- Reliability: A properly maintained computer can consistently produce the same output from the same input and program.
- Multitasking: An operating system can manage several activities, such as playing audio while downloading a file and editing a document.
- Communication capability: Network hardware allows computers to exchange data through local networks and the Internet.
- Lack of independent intelligence: A conventional computer does not possess human judgment or common sense; it follows programmed instructions and available data.
B. Generations of computers
Computer generations classify major stages in hardware development according to the dominant electronic technology used.
- First generation—vacuum tubes, approximately 1940s–1950s:
- Machines used thousands of vacuum tubes for switching and amplification.
- They were large, expensive, power-hungry, and produced substantial heat.
- Programming relied mainly on machine language and punched cards.
- Example: ENIAC, completed in the 1940s, was a prominent vacuum-tube computer.
- Second generation—transistors, approximately mid-1950s–mid-1960s:
- Transistors replaced bulky vacuum tubes, improving speed and reliability.
- Computers became smaller, cooler, and less power-consuming.
- Assembly language and high-level languages such as FORTRAN and COBOL became important.
- Third generation—integrated circuits, approximately mid-1960s–early 1970s:
- Integrated circuits placed multiple electronic components on a silicon chip.
- Operating systems, keyboards, monitors, and multiprogramming became more common.
- Cost and physical size declined while processing capability increased.
- Fourth generation—microprocessors, from the 1970s onward:
- A microprocessor placed the principal CPU functions on a single chip.
- Personal computers, graphical interfaces, portable systems, and computer networks expanded rapidly.
- Very-large-scale integration enabled chips containing millions and later billions of transistors.
- Fifth generation—intelligent and highly parallel systems:
- This category emphasizes artificial intelligence, natural-language processing, robotics, machine learning, and parallel computation.
- Modern systems can recognize speech and images, but their results still depend on algorithms, training data, and computing resources.
- Overall trend: Each generation generally brought reduced size and cost together with greater speed, capacity, reliability, and ease of use.
III. Functional Organization of a Computer
A. Block diagram of a computer
A computer block diagram shows how input, processing, memory, storage, and output units exchange data and control signals.
Input Unit ──► Main Memory ◄──► CPU ──► Output Unit
▲ │
│ │
└──► Secondary Storage
CPU = Control Unit + Arithmetic Logic Unit + Registers- Input unit: Accepts data and instructions and converts them into machine-readable signals; examples include a keyboard, mouse, scanner, microphone, and touchscreen.
- Central Processing Unit (CPU): Executes instructions and controls system operations.
- Control Unit (CU): Fetches instructions from memory, decodes them, and directs other components.
- Arithmetic Logic Unit (ALU): Performs arithmetic operations such as addition and logical operations such as comparisons and Boolean AND.
- Registers: Very fast internal storage locations holding current instructions, addresses, operands, and intermediate results.
- Main memory: Stores programs and data currently in use.
- RAM: Volatile read/write memory whose contents are normally lost when power is removed.
- ROM: Non-volatile memory used for instructions or firmware that must persist.
- Secondary storage: Retains data long-term; examples include solid-state drives, hard disks, optical discs, and flash drives.
- Output unit: Converts processed results into a usable form through devices such as monitors, printers, speakers, and projectors.
- System buses:
- Data bus: Carries actual data.
- Address bus: Identifies the memory or device location involved.
- Control bus: Carries signals such as read, write, and clock commands.
- Instruction cycle: The CPU repeatedly performs fetch, decode, execute, and store, using memory and registers at each stage.
IV. Digital Encoding of Information
A. Data representation
Data representation is the process of encoding numbers, characters, images, sound, and instructions as binary patterns.
- Bit patterns: With
nbits, a computer can represent2ⁿdistinct patterns.
Number of patterns = 2^nHere, n is the number of bits; for example, 8 bits provide 2⁸ = 256 patterns.
- Unsigned integers: An
n-bit unsigned value ranges from0to2ⁿ − 1; therefore, one byte represents values from0to255. - Signed integers: Two’s complement is widely used; an
n-bit value ranges from−2ⁿ⁻¹to2ⁿ⁻¹ − 1. - Characters: Encoding standards assign numbers to symbols.
- ASCII represents common English letters, digits, and control characters; uppercase
Ahas decimal code65. - Unicode supports writing systems and symbols from many languages.
- ASCII represents common English letters, digits, and control characters; uppercase
- Images: A bitmap is a grid of pixels; each pixel stores colour information. A
1920 × 1080image contains2,073,600pixels. - Colour depth: A 24-bit RGB pixel commonly uses 8 bits each for red, green, and blue, allowing about
2²⁴ = 16.7 millioncolour combinations. - Sound: Digital audio records amplitude samples. Quality depends on sampling rate, bit depth, channels, and compression; CD-quality audio commonly uses
44.1 kHz, 16-bit samples, and two channels. - Storage measurement: Decimal units use
1 KB = 1000 bytes, whereas binary units use1 KiB = 1024 bytes.
V. Base-Two Numeration
A. Binary number system
The binary number system has base 2 and uses only the digits 0 and 1.
- Place values: Positions to the left of the binary point have weights
2⁰, 2¹, 2², …; positions to the right have weights2⁻¹, 2⁻², …. - Positional value:
Value = Σ(d_i × 2^i)Here, d_i is the binary digit at position i, and i is an integer position counted from 0 at the units place.
- Binary arithmetic rules:
0 + 0 = 00 + 1 = 11 + 1 = 101 + 1 + 1 = 11
- Worked example: The binary number
101101₂equals:
(1×2^5) + (0×2^4) + (1×2^3) + (1×2^2) + (0×2^1) + (1×2^0)
= 32 + 8 + 4 + 1
= 45_10- Importance: Binary maps directly to two-state electronic circuits, such as high/low voltage or on/off switching conditions.
VI. Base-Eight Numeration
A. Octal number system
The octal number system has base 8 and uses digits from 0 through 7.
- Place values: Octal positions have weights
8⁰, 8¹, 8², …. - Digit restriction: Symbols
8and9are invalid in an octal numeral; therefore,728₈is not valid. - Binary relationship: One octal digit corresponds exactly to three binary bits because
8 = 2³. - Worked example:
347_8 = (3×8^2) + (4×8^1) + (7×8^0)
= 192 + 32 + 7
= 231_10- Use: Octal provides a shorter representation of binary data and has historically been useful in systems organized around groups of three bits.
VII. Base-Sixteen Numeration
A. Hexadecimal number system
The hexadecimal number system has base 16 and uses digits 0–9 and letters A–F.
- Digit values:
A = 10,B = 11,C = 12,D = 13,E = 14, andF = 15. - Place values: Hexadecimal positions have weights
16⁰, 16¹, 16², …. - Binary relationship: One hexadecimal digit represents four binary bits because
16 = 2⁴; for example,F₁₆ = 1111₂. - Worked example:
2AF_16 = (2×16^2) + (10×16^1) + (15×16^0)
= 512 + 160 + 15
= 687_10- Uses: Hexadecimal compactly represents memory addresses, machine instructions, binary data, and web colours; for example,
#FF0000represents full red in RGB notation.
VIII. Converting Between Number Systems
A. Number system conversions
Number-system conversion changes a numeral’s written form without changing its mathematical value.
- Other bases to decimal:
- Multiply each digit by its positional base power and add the results.
- For a base
bnumeral:
Decimal value = Σ(d_i × b^i)Here, b is the original base, d_i is a digit, and i is its positional exponent.
-
Decimal integer to another base:
- Repeatedly divide the decimal number by the target base.
- Record each remainder.
- Read the remainders from last to first.
-
Decimal fraction to another base:
- Repeatedly multiply the fractional part by the target base.
- Record each integer part in order.
- Some fractions produce recurring representations and may require approximation.
-
Binary and octal:
- Group binary digits in sets of three from the binary point outward.
- Add leading or trailing zeros when necessary.
- Example mappings include
000₂ = 0₈and111₂ = 7₈.
-
Binary and hexadecimal:
- Group binary digits in sets of four from the binary point outward.
- Convert each group independently; for example,
1010₂ = A₁₆.
-
Octal and hexadecimal:
- Use binary as an intermediate form: replace each octal digit with three bits, regroup into four-bit units, and convert to hexadecimal.
- Worked example: Convert
11010110₂to octal and hexadecimal.
Octal: 011 010 110 → 3 2 6 → 326_8
Hexadecimal: 1101 0110 → D 6 → D6_16- Verification: Equivalent representations have the same decimal value:
11010110_2 = 214_10 = 326_8 = D6_16Did this save you a night before the exam?
LPU Notes is free, and it stays free. Ads cover part of the server bill. The rest comes out of a student's own pocket: the domain, the storage, and keeping the site up through the weeks everyone needs it at once.
The payment button didn't load. An ad blocker or a filtered network is the usual reason. to try again.
Nothing here is ever locked, and nothing unlocks. Chip in only if it was worth it. What it pays for →