Data, information and knowledge
Data are raw facts: numbers, words, sounds or pictures with no meaning yet. Example: 38, 39, 41.
Information is data that has been put in order and given meaning. Example: "The temperature in Delhi rose from 38 °C to 41 °C this week."
Knowledge is information we understand well enough to act on. Example: "It will be hot, so drink more water."
Good data is accurate, complete, up to date and relevant to your goal. We process data to get information: we collect it, search it, sort it, edit it and calculate with it. Before you collect data, decide your goal, then choose only the data that helps that goal.
Bits, bytes and units of information
Inside a computer, millions of tiny switches can be on (1) or off (0). One such 0-or-1 is a bit (binary digit). 4 bits are a nibble and 8 bits are a byte.
| Unit | Size |
|---|---|
| 1 kilobyte (kB) | 1000 bytes |
| 1 megabyte (MB) | 1000 kB |
| 1 gigabyte (GB) | 1000 MB |
| 1 terabyte (TB) | 1000 GB |
These are the SI (decimal) prefixes. Some books and operating systems use powers of 2 instead: 1 kibibyte (KiB) = 1024 bytes, 1 MiB = 1024 KiB.
Binary numbers
In our normal (denary) system, places are worth 1, 10, 100. In binary the places are worth 1, 2, 4, 8, 16, 32, 64, 128 — each one double the last. To change binary to denary, add the place values that have a 1. To change denary to binary, take away the biggest place value that fits, write 1 there, and repeat. With n bits you can make 2n different patterns, so one byte stores 0 to 255. A logical value (true/false) needs just 1 bit. Hexadecimal (base 16) is a short way to write binary: one hex digit = 4 bits, so 1111 1111 = FF.
Representing text: ASCII and Unicode
A character set is a table that gives every character a number (its code). The computer stores the code in binary.
- ASCII uses 7 bits, so it has 128 codes: English letters, digits, punctuation and control codes. 'A' = 65, 'B' = 66, 'a' = 97, '0' = 48. Letters are in order, so if A = 65 then E = 69.
- Unicode gives a code to characters from every writing system — Devanagari, Arabic, Chinese, emoji and more. It needs more bits per character (commonly stored with UTF-8, which uses 1 to 4 bytes).
Encoding is a choice: the same bits can mean a number, a letter or a colour. The program decides how to read them.
Representing images: bitmap and vector
A bitmap (raster) image is a grid of pixels (picture elements). Each pixel stores one colour as a binary code.
- Resolution = number of pixels, e.g. 1920 × 1080.
- Colour depth = bits per pixel. 1 bit gives 2 colours, 8 bits give 256, 24 bits give about 16.7 million.
- File size (bits) = width × height × colour depth. Divide by 8 for bytes. Real files also hold metadata (width, height, date, camera).
A vector image stores a list of objects (lines, circles, rectangles, text) with their properties: position, size, line colour, fill colour, thickness. The computer draws them fresh each time.
| Bitmap | Vector | |
|---|---|---|
| Good for | photos, rich detail | logos, icons, maps, diagrams |
| When enlarged | becomes blocky (pixelated) | stays sharp |
| File size | grows with pixels | usually small; grows with number of objects |
Representing sound, and making files smaller
Sound in air is analogue: it changes smoothly. A computer is digital: it stores separate numbers. An ADC (analogue-to-digital converter) measures the wave many times a second; a DAC turns the numbers back into a wave for the speaker.
- Sample rate: samples per second, in hertz (Hz). Music CDs use 44 100 Hz.
- Bit depth (sample resolution): bits per sample. More bits = more exact heights.
- Size (bits) = sample rate × bit depth × seconds (× number of channels for stereo).
- Nyquist rule: sample at least twice as fast as the highest frequency you want to keep. Humans hear up to about 20 000 Hz, so 44 100 Hz is enough.
- MIDI does not store the sound at all. It stores instructions: which note, how loud, how long, which instrument. MIDI files are tiny and easy to edit.
Compression
Lossless compression makes a file smaller and gives back every bit exactly (ZIP, PNG). Two ways: run-length encoding (RLE) stores runs, so WWWWWBBB becomes 5W3B; dictionary coding replaces repeated words with short codes. Lossy compression throws away detail people hardly notice (JPEG, MP3). Files become much smaller but can never be fully restored.
Errors and secrets
With a fixed number of bits a computer must round: 1/3 or 0.1 cannot be stored exactly, so tiny errors appear. If a result is too big for the bits it gets an overflow error. Data can also be hidden by encryption: a Caesar cipher shifts each letter (shift 3: A → D), which is easy to break; a Vernam cipher combines each character with a random key as long as the message, used only once, and cannot be broken without the key.
Showing data clearly: tables and graphs
People also represent data so that humans can read it. Pick the display that fits the data:
- Table: exact values you need to look up.
- Bar chart: compare separate groups (rainfall in 5 cities).
- Line graph: change over time (temperature each month).
- Pie chart: parts of one whole (how a family spends ₹100).
- Scatter graph: is there a link between two things (height and shoe size)?
- Histogram: how continuous data is spread (heights of a class).
To judge a display, check: a title, labelled axes with units, a scale that starts at zero for bars, equal intervals, a key, and the source of the data. A cut or stretched axis can make a small change look huge.
Key formulas and definitions
- 1 byte = 8 bits; 1 kB = 1000 B; 1 MB = 1000 kB; 1 GB = 1000 MB; 1 TB = 1000 GB
- Number of patterns with n bits = 2^n
- Image size (bits) = width × height × colour depth
- Number of colours = 2^(colour depth)
- Sound size (bits) = sample rate × bit depth × seconds × channels
- Nyquist: sample rate ≥ 2 × highest frequency
Worked examples
1. Convert 01101001 (binary) to denary.
Place values: 128, 64, 32, 16, 8, 4, 2, 1. The 1s are at 64, 32, 8 and 1. 64 + 32 + 8 + 1 = 105.
2. Convert 200 (denary) to 8-bit binary.
128 fits: 200 − 128 = 72 → 1. 64 fits: 72 − 64 = 8 → 1. 32 no → 0. 16 no → 0. 8 fits: 8 − 8 = 0 → 1. 4, 2, 1 → 0. Answer: 11001000.
3. In ASCII, 'A' is 65. What is the code for 'H', and what is it in binary?
H is the 8th letter, 7 after A: 65 + 7 = 72. 72 = 64 + 8 → 01001000.
4. An image is 800 × 600 pixels with 24-bit colour. Find its size in MB.
Bits = 800 × 600 × 24 = 11 520 000. Bytes = 11 520 000 ÷ 8 = 1 440 000. MB = 1 440 000 ÷ 1 000 000 = 1.44 MB.
5. A 30-second mono sound clip uses 44 100 Hz and 16 bits per sample. How big is it in kB?
Bits = 44 100 × 16 × 30 = 21 168 000. Bytes = 2 646 000. kB = 2646 kB (about 2.6 MB).
6. Compress the row of pixels WWWWBBBBBBWW with run-length encoding. How many characters are saved?
Runs: 4 W, 6 B, 2 W → 4W6B2W. The original has 12 characters, the code has 6, so 6 are saved (50%). RLE is lossless: we can rebuild the row exactly.
Common mistakes
- Reading binary place values from the left as 1, 2, 4… They start at 1 on the RIGHT.
- Forgetting to divide by 8 to change bits into bytes in file-size questions.
- Thinking a vector logo gets blurry when enlarged. Bitmaps get blocky; vectors stay sharp.
- Calling every compression 'lossless'. JPEG and MP3 are lossy: the removed detail is gone for good.