Chapter 1.1: Basic Concepts
Introduction
Learning Outcomes
Explain the input, processing, output and storage stages.
Interpret the role of bits, bytes, the binary number system and logical operations.
Compare computers by purpose and capacity.
Explain how data becomes information and what IT does in everyday life.
How a Computer Works
What Is a Computer?
A computer is an electronic system that processes data according to the instructions in a program.
- Data: raw values before processing. Information: a result you can interpret.
- It takes in data from users or other systems.
- It processes the data and produces a meaningful result.
- It presents the result or stores it for later use.
How a Computer Works · Step by step
The Basic Cycle
Every task goes through the same four stages. Example: computing a grade in a student information system.
Input: The instructor types midterm = 70 and final = 90 into a form. The keyboard sends these values to the computer.
Process: The CPU applies the formula: 0.4 × 70 + 0.6 × 90 = 82. This is an arithmetic operation.
Output: The screen shows "Average: 82". The monitor is an output device.
Storage: The grade record is written to a database, where it can be read and processed again later (two-way arrow).
How a Computer Works
Input
Input is how a computer receives data from a user, a sensor or another system.
Characters and commands
Position and clicks
Sound waves
Physical measurements
Every input device turns a physical event into numbers (bits).
How a Computer Works
Processing
- The central processing unit (CPU) executes program instructions in order; the control unit manages that sequence.
- The ALU (arithmetic logic unit) does the calculations: 12 + 8 = 20.
- Logical operations make comparisons and decisions possible.
- Both data and instructions are represented in binary.
How a Computer Works
Output and Storage
Open documents and running programs live in RAM: fast access.
Save copies the document from RAM to the SSD.
When the power goes off, RAM is wiped; files on the SSD are kept.
Processed information is presented on a monitor, printer or speaker.
result → screenFast, but loses its contents when the power goes off.
SSD, hard disk, USB drive: keeps data without power.
Digital Representation
Everything Becomes a Number
Characters are stored as numeric codes.
A → 65 → 01000001A position on screen becomes a pair of coordinates.
(x, y) → (420, 180)Each pixel is made of color components.
RGB(255, 0, 0)A sound wave is sampled at regular intervals.
amplitude → list of numbersDigital Representation · Step by step
Bits and Binary: From Binary to Decimal
A bit (binary digit) takes only the values 0 and 1. 8 bits = 1 byte.
An 8-bit string: from right to left, each position's value doubles: 1, 2, 4, … 128.
The bit in position 6 is 1 → its value 64 is added to the sum. Zero bits contribute nothing.
The bit in position 0 is 1 → its value 1 is added to the sum. Zero bits contribute nothing.
01000001₂ = 65₁₀. In the ASCII table, 65 is the letter A.
Digital Representation
What Binary Digits Are Worth
| Bits | Combinations | Unsigned range |
|---|---|---|
| 1 bit | 21 = 2 | 0–1 |
| 2 bits | 22 = 4 | 0–3 |
| 8 bits | 28 = 256 | 0–255 |
| 10 bits | 210 = 1,024 | 0–1,023 |
| 32 bits | 232 | 0–4,294,967,295 |
Each extra bit doubles the number of distinct values: n bits → 2n values.
Digital Representation · Step by step
How Many Bits? 58 Letters
The Turkish alphabet has 29 letters; coding upper and lower case separately needs N = 58 distinct values. How many bits, at minimum?
One bit gives only 2 codes (0 and 1). Since 2 < 58, the loop continues.
One more bit doubles the codes: 4. Still fewer than 58.
One more bit doubles the codes: 8. Still fewer than 58.
One more bit doubles the codes: 16. Still fewer than 58.
One more bit doubles the codes: 32. Still fewer than 58.
6 bits → 64 codes. 64 ≥ 58: the condition fails and the loop stops.
Answer: 6 bits; 64 − 58 = 6 codes go unused. ASCII, designed for English, needs more than 64 codes for 52 letters, 10 digits, punctuation and control characters: 7 bits (128). Turkish letters (ç, ğ, ı, İ, ö, ş, ü) are not in ASCII; they need Unicode (UTF-8).
N = 58 (29 upper + 29 lower case) n = 1; capacity = 2 while capacity < N: n = n + 1; capacity = capacity × 2 capacity ≥ N → n bits suffice
Digital Representation · Step by step
Decimal to Binary: 45
Let's convert 45 to binary. Method: divide by 2 until the quotient is 0, noting the remainder (0 or 1) at each step.
45 ÷ 2 = 22, rem 1 (odd → remainder 1). The first remainder is the rightmost (ones) digit.
22 ÷ 2 = 11, rem 0 (even → remainder 0). This remainder goes one place to the left.
11 ÷ 2 = 5, rem 1 (odd → remainder 1). This remainder goes one place to the left.
5 ÷ 2 = 2, rem 1 (odd → remainder 1). This remainder goes one place to the left.
2 ÷ 2 = 1, rem 0 (even → remainder 0). This remainder goes one place to the left.
1 ÷ 2 = 0, rem 1 (odd → remainder 1). This remainder goes one place to the left. The quotient is 0, so we stop.
Reading the remainders from the last division to the first gives 45₁₀ = 101101₂. Check: add up the place values.
Digital Representation
Transistors
- A processor is built from a huge number of transistors.
- A transistor works like a tiny switch that controls electric current.
- The gate voltage turns the transistor on (current flows) or off (no current); these two states are read as 1 and 0.
- Billions of switches working together make complex operations possible.
Data Representation
Text and Numbers
Integers and floating-point numbers are stored with specific binary encoding rules.
13 → 00001101ASCII and Unicode map characters to numeric codes.
A → U+0041The encoding standard decides what a given bit string means.
Provides a large character set covering many alphabets and symbols.
Ğ · 中 · €Data Representation
Images
- A digital image is made of small colored cells called pixels.
- Resolution is the number of pixels horizontally and vertically.
- In the RGB model, a color is defined by red, green and blue components.
- Each component is a number from 0 to 255 (1 byte).
RGB(255, 255, 255)is white,RGB(0, 0, 0)is black.
Data Representation
Color Depth and Image Size
| Bits / pixel | Colors | Typical use |
|---|---|---|
| 1 | 21 = 2 | Line art, fax, scanned documents |
| 8 | 28 = 256 | Grayscale or palette images (GIF) |
| 24 | 224 = 16,777,216 | Photos: 8 bits each for R, G, B |
| 32 | 16.7 million + transparency | UI graphics, PNG (alpha channel) |
Uncompressed image = width × height × bit depth ÷ 8 bytes.
24 bits: 800 × 600 × 3 = 1,440,000 bytes ≈ 1.44 MB (1.37 MiB). The same image at 1 bit: 60,000 bytes ≈ 60 KB (58.6 KiB).
Data Representation
Audio and Video
Audio
The analog wave is measured at equal intervals (sampling); each measurement is rounded to a number.
Samples: 4, 5, 7, 7, 7, 5, 4, 2, 0, 0, 0, 2
Video
Showing frames in quick succession creates the illusion of motion. Audio is usually stored in a separate track.
Data Representation · Step by step
Digitizing Sound: Sample, Quantize, Encode
A microphone turns sound into a continuously varying voltage. This analog signal has a value at every instant, and infinitely many values cannot be stored.
Sampling: the signal is measured at equal intervals. The measurements are decimals (4.76, 6.55, …); whatever happens between two samples is not recorded.
Quantization: 3 bits allow only 8 levels, so each sample is rounded to the nearest one. The difference (at most 0.45) is the quantization error.
Encoding: each level is written as a 3-bit binary number; 5 → 101, 7 → 111. Eight samples take 24 bits.
Real audio takes thousands of samples per second. CD quality: 44,100 Hz, 16 bits, 2 channels → one minute ≈ 10.6 MB (10.1 MiB).
Lossy formats such as MP3 drop details the ear barely notices: at 128 kbit/s one minute is 960,000 bytes, about 11 times smaller.
analog signal: continuous wave sample: measure at equal intervals quantize: round to nearest level (3 bits → 0…7) encode: write each level in 3 bits size = sample rate × bit depth × channels × time lossy compression (MP3)
Data Representation
Lossless and Lossy Compression
| Lossless | Lossy | |
|---|---|---|
| After decompression | The original data comes back bit for bit | You get a close approximation of the original |
| Method | Shortens repetitions (RLE, ZIP) | Drops detail the eye and ear barely notice |
| Example formats | ZIP, PNG, FLAC | JPEG, MP3, MP4 (H.264) |
| Typical reduction | Usually 2–3× | 10× or more |
| Suitable data | Text, programs, spreadsheets, medical images | Photos, music, video |
Data Representation · Step by step
Run-Length Encoding (RLE)
The row has two colors: B (blue) and W (white). At the first pixel, count is 1 and the current color is B.
Pixels 1–5 are also B: count goes up by one at each. At pixel 5, count = 6.
Pixel 6 is W: the color changed. The finished run is written as (6, B); count resets to 1 and the new color is W.
The same rule fires twice more: four W → (4, W), three B → (3, B). A new W run starts at pixel 13.
End of row: the last open run (3, W) is written too. The output has 4 pairs.
Each pair is 2 bytes: 4 × 2 = 8 bytes, half of the original 16. Decoding restores the row exactly; nothing is lost.
Worst case: if the color changes at every pixel, every run has length 1; 16 pairs = 32 bytes. RLE only pays off with long runs (line art, icons, scans).
count = 1; color = first pixel if next pixel has same color: count = count + 1 on color change: write (count, color); count = 1 at end of row: write last pair size: 16 bytes → 4 pairs × 2 bytes worst case: B W B W …
Data Representation
Units of Memory
| Decimal (SI) | Value | Binary (IEC) | Value |
|---|---|---|---|
| bit | 0 or 1 (binary digit) | ||
| byte (B) | 8 bits | ||
| KB | 1,000 B | KiB | 1,024 B |
| MB | 1,000 KB | MiB | 1,024 KiB |
| GB | 1,000 MB | GiB | 1,024 MiB |
| TB | 1,000 GB | TiB | 1,024 GiB |
| PB | 1,000 TB | PiB | 1,024 TiB |
Disk makers use SI units (1 TB = 1012 bytes). The operating system often computes the binary value but still labels it “GB”: a 1 TB disk ≈ 931 GiB, shown as “931 GB”.
Data Representation · Step by step
The Scale of Units
bit: the smallest unit, 0 or 1. Example: a single switch.
1 byte = 8 bits. A byte can take 28 = 256 values; example: one character, “A”.
1 KiB = 1,024 B (210×; in SI, 1 KB = 1,000 B). Example: half a page of plain text ≈ 2 KB.
1 MiB = 1,024 KiB (210×). Example: a phone photo ≈ 3 MB.
1 GiB = 1,024 MiB (210×). Example: an HD movie ≈ 4 GB.
1 TiB = 1,024 GiB (210×). Example: a laptop drive ≈ 1 TB.
Bar heights are not to scale; each step is roughly a thousand times larger.
Data Representation
Bits or Bytes? Speed and Size
b is a bit, B is a byte: 100 Mb and 100 MB differ by a factor of 8.
Network speed is bits per second: 100 Mbps = 100,000,000 bit/s (M = 106).
File and disk sizes are in bytes: MB, GB.
| Example: a 3 GB file over a 100 Mbps link | Result |
|---|---|
| Speed in bytes: 100,000,000 ÷ 8 | 12,500,000 bytes/s = 12.5 MB/s |
| File in bits: 3 × 109 bytes × 8 | 24 × 109 bits |
| Time: 24 × 109 ÷ 108 | 240 s = 4 minutes (best case) |
In practice it takes longer because of protocol overhead and other devices sharing the network.
Processing Data
Arithmetic and Logical Operations
Calculates with numeric values.
+ − × ÷ %Tests how two values relate.
> < ≥ ≤ == !=Combines or negates conditions.
AND OR NOTPicks the path the program follows based on the result.
score ≥ 60 → passProcessing Data · Step by step
Catching Errors with a Parity Bit
The data to send is 1011001 (“Y” in ASCII, 89). The seven data bits contain four 1s.
Even parity: the count of 1s is already even, so the parity bit is 0. The 8 bits sent: 10110010.
Noise during transmission flips bit 3 from 1 to 0. The receiver gets 10010010.
The receiver counts the 1s: 3, which is odd. The rule is broken, so the error is detected; which bit flipped is unknown, so the data is requested again.
If two bits flip, the count of 1s stays even and the receiver accepts bad data. Parity only catches an odd number of bit errors.
data = 1011001; count the 1s even parity: parity = 0 → send 10110010 bit 3 flipped in transit receiver counts 1s: odd means error two bits flipped: even → error missed
Types of Computers
By Capacity and Purpose
Types of Computers
Supercomputers and Mainframes
Used for scientific problems that need enormous computing power.
Examples: climate modeling, physics simulations, training AI models.
Built to run many concurrent transactions reliably and without interruption.
Examples: banking, insurance, large government systems.
| Priority | Supercomputer | Mainframe |
|---|---|---|
| Main goal | Computing speed | Transaction volume and availability |
| Typical workload | Large scientific computations | Many business transactions |
Types of Computers · Step by step
Servers and Thin Clients
Many clients connect to the same server over the network.
Request: Client 1 asks for the grade list; the request travels over the network to the server.
Processing: The real work happens on the server: it queries the database and computes the result.
Response: The result goes back to the client. The thin client only displays it and takes input.
Provides web, email, file, database or application services over a network.
Leaves most of the work to the server, so it needs less local hardware and administration.
Types of Computers
Personal and Mobile Devices
Stationary, expandable hardware
Portable, battery-powered
Touchscreen, light use
Mobile connectivity, sensors, apps
Types of Computers · Step by step
Embedded Computers
An embedded computer performs a specific task inside a larger device.
The embedded computer in an air conditioner runs a continuous measure → decide → act loop.
The sensor reads 28 °C. 28 > 24 → compressor on; the room cools.
The sensor reads 26 °C. 26 > 24 → compressor on; the room cools.
The sensor reads 24 °C. 24 > 24 is false → compressor turns off. The loop keeps measuring.
- Examples: engine control units, washing machines, air conditioners, medical monitors.
- Usually low-power, running on limited resources.
- Reliability and real-time response matter.
- Users may not even realize there is a computer inside.
Types of Computers
Quantum Computers
Quantum computers process information with quantum bits, called qubits.
- They offer different ways of computing for certain problems.
- Studied for cryptography, optimization, chemistry and materials research.
- They have not replaced classical computers for everyday general-purpose use.
Information Technology
Information Technology (IT)
Information technology is the set of systems used to collect, process, store and transmit data.
Information Technology · Step by step
Data vs. Information
38, 41, 39: just numbers. Without knowing what was measured, they mean nothing.
Add context: these are three temperature readings from one patient (°C).
Process: average = (38 + 41 + 39) / 3 = 39.3.
Information: "Average temperature 39.3 °C, high fever." Now a decision can be made.
Raw measurements, numbers, text or records. Without context, their meaning may be unclear.
The meaningful result of organizing and interpreting data.
Information Technology
IT in Everyday Life
Online courses, digital resources and learning platforms.
Electronic records, imaging systems and patient monitoring.
Banking, payment systems and transaction security.
Corporate communication, automation, games and media services.
Information Technology · Step by step
The Data Life Cycle
Example: data from a weather station goes through four stages, and then the cycle starts again.
Collect: Data comes from people, machines or sensors. The sensor sent 4 readings.
Process: Errors are removed and calculations done. −99 (a faulty reading) is dropped; the average is 22.2 °C.
Store: Data is kept in files, databases or the cloud.
Present: The result is shared as a report, table, chart or app screen; new decisions trigger new data collection.
Information Technology
Benefits and Responsibilities
Data is processed quickly and repetitive tasks are automated.
Information is easier to reach and share from anywhere.
Personal data must be protected from unauthorized access and loss.
Bad data and biased systems can produce wrong results.
Information Technology
The Future of IT
Systems that learn patterns from data to support decisions and generate content.
Devices with sensors sharing data over a network.
Computing and storage resources delivered over a network.
Extracting meaningful results from large, varied datasets.
Alongside new technology, energy use, accessibility, security and ethics matter more and more.
Summary
Chapter Summary
- Computers process data in a cycle of input, processing, output and storage.
- All kinds of data are represented as bit strings.
- Each extra bit doubles the number of representable values; binary–decimal conversion uses place values.
- AND, OR and NOT combine conditions; addition and comparison happen in the ALU.
- Sound becomes numbers through sampling, quantization and encoding; compression is lossless (ZIP, PNG) or lossy (JPEG, MP3).
- A parity bit catches single-bit transmission errors; network speed is measured in bit/s, file size in bytes.
- Computer types differ in purpose, capacity and operating environment.
- Information technology consists of hardware, software, data, communication, people and processes.
Summary
Review Questions
- What are the input, processing, output and storage steps in an ATM transaction?
- Why can 8 bits represent 256 different values?
- What is the key difference between RAM and an SSD?
- How does a server differ from a mainframe?
- What context does a temperature reading need to become information?
- Why is security in IT not just a technical issue?
Summary
Exercises
- Convert 37 to binary (by repeated division by 2).
- What is 101011₂ in decimal?
- What is the minimum number of bits needed to encode only the 29 uppercase letters of the Turkish alphabet? How many codes are left unused?
- Write the word “Hi” as ASCII codes and as 8-bit bytes (H = 72, i = 105).
- How many bytes does an uncompressed 1920×1080 image take at 3 bytes per pixel? Roughly how many MB is that?
- How many frames are in a 10-second video at 30 fps?
Show answers
- 37 = 100101₂ (32 + 4 + 1).
- 101011₂ = 32 + 8 + 2 + 1 = 43.
- 5 bits: 24 = 16 is not enough, 25 = 32 ≥ 29; 32 − 29 = 3 codes unused.
- H = 72 = 01001000, i = 105 = 01101001 → 2 bytes.
- 1920 × 1080 × 3 = 6,220,800 bytes ≈ 6.2 MB (5.9 MiB).
- 30 × 10 = 300 frames.
Summary
References
- Brookshear and Brylow, Computer Science: An Overview, Pearson.
- Stallings, Computer Organization and Architecture, Pearson.
- Unicode Consortium, The Unicode Standard.
- NIST, Glossary of Key Information Security Terms.