What a computer does
A computer is an electronic device that accepts data (input), processes it according to a set of instructions (program), stores it and produces information (output). This is the IPO cycle: Input → Process → Output, with Storage supporting every step. Raw facts are data; processed, meaningful data is information. If the input is wrong the output is wrong: GIGO (Garbage In, Garbage Out).
Parts of the CPU
| Unit | Job | Remember |
|---|---|---|
| ALU (Arithmetic Logic Unit) | Arithmetic (+, −, ×, ÷) and logical operations (AND, OR, NOT, comparisons) | The calculator of the CPU |
| CU (Control Unit) | Fetches and decodes instructions, sends control signals, coordinates all units | Does not process data itself; acts like a traffic controller |
| Registers | Tiny, fastest storage locations inside the CPU | Accumulator, Program Counter (PC), Instruction Register (IR), MAR, MDR |
The CPU is called the brain of the computer. It sits on the motherboard (main circuit board) with RAM slots, chipset, BIOS/UEFI chip and expansion slots. Processor speed (clock speed) is measured in hertz – modern CPUs run at a few GHz (1 GHz = 10⁹ cycles per second). A multi-core processor has two or more processing cores on one chip.
System bus
- Data bus – carries data; bidirectional.
- Address bus – carries the memory address the CPU wants; unidirectional (CPU to memory). A 32-bit address bus can address 2³² bytes = 4 GB.
- Control bus – carries control signals such as read/write and clock.
Number systems
| System | Base | Digits used | Example |
|---|---|---|---|
| Binary | 2 | 0, 1 | 1010₂ = 10 |
| Octal | 8 | 0–7 | 17₈ = 15 |
| Decimal | 10 | 0–9 | 45₁₀ |
| Hexadecimal | 16 | 0–9 and A–F (A=10 … F=15) | 2A₁₆ = 42 |
- Decimal to binary: divide repeatedly by 2 and read the remainders from bottom to top (25 → 11001).
- Binary to decimal: add place values 1, 2, 4, 8, 16, 32 … where the bit is 1 (101101 = 32+8+4+1 = 45).
- One octal digit = 3 bits; one hex digit = 4 bits (a nibble).
- 1's complement: flip every bit (10110 → 01001). 2's complement = 1's complement + 1 (used to store negative numbers).
- Binary addition rules: 0+0=0, 0+1=1, 1+1=10 (0 carry 1), 1+1+1=11.
Units of data
Bit (binary digit) is the smallest unit. 4 bits = 1 nibble; 8 bits = 1 byte; a word is the number of bits a CPU processes at a time (for example 32 or 64 bits).
Character codes
| Code | Full form | Bits / use |
|---|---|---|
| ASCII | American Standard Code for Information Interchange | 7 bits, 128 characters (extended ASCII: 8 bits, 256) |
| EBCDIC | Extended Binary Coded Decimal Interchange Code | 8 bits, IBM mainframes |
| Unicode | Universal character standard | Covers almost all scripts including Devanagari; UTF-8 is the common web encoding |
| BCD | Binary Coded Decimal | Each decimal digit stored in 4 bits |
Types of computers
By working principle: Analog (continuous quantities, e.g. speedometer), Digital (discrete 0/1 data, e.g. PCs), Hybrid (both, e.g. ICU patient monitors, petrol pumps).
By size and power: Supercomputer (fastest, weather forecasting, measured in FLOPS; India's PARAM series) > Mainframe (bank and railway reservation servers, thousands of users) > Minicomputer (mid-range) > Microcomputer (PCs, laptops, tablets, smartphones).
Hardware, software and firmware
- Hardware – physical parts you can touch.
- Software – programs: system software (OS, drivers, utilities) and application software (Word, Tally, browsers).
- Firmware – software stored permanently on a chip (ROM/flash), e.g. BIOS/UEFI.
Booting
Cold booting starts a computer from the power-off state; warm booting restarts a running computer without cutting power. During boot the firmware runs POST (Power-On Self-Test), then the bootloader loads the operating system into RAM. BIOS = Basic Input/Output System; modern PCs use UEFI.