Fundamentals of Information Technology

Chapter 2
Data Representation and Computing Principles

Bachelors Program in IT
Fundamentals of Information Technology   •   Bachelor

Data Representation and Computing Principles

Introduction

Information technology depends on a deceptively simple idea: all forms of information can be represented as patterns of symbols that electronic systems can store, process, and transmit. Modern computers represent these patterns primarily with binary digits, or bits. Text, numbers, photographs, audio, video, program instructions, and network messages are all transformed into binary data.

Understanding representation is essential for several reasons. It explains why digital systems are reliable and scalable, why storage capacities are measured in bytes, why images become pixelated when enlarged, why audio quality depends on sampling, and why software can perform logical operations at extraordinary speed. It also provides the foundation for programming, databases, cybersecurity, computer architecture, networking, and artificial intelligence.

This chapter examines binary and hexadecimal notation, Boolean logic, character encoding, multimedia representation, storage units, computer operations, performance measures, and the principles of algorithms and computational thinking.

Learning Objectives

By the end of this chapter, you should be able to:

  1. Convert values among decimal, binary, and hexadecimal notation.
  2. Explain bits, bytes, signed and unsigned integers, and storage units.
  3. Apply Boolean operators and truth tables to simple computing problems.
  4. Describe how text, images, audio, and video are represented digitally.
  5. Distinguish clock speed, throughput, latency, bandwidth, and execution time.
  6. Explain the fetch–decode–execute cycle and the roles of major computer components.
  7. Design and evaluate basic algorithms using computational-thinking principles.
  8. Recognize practical, ethical, and governance issues associated with digital representation.

1. Information as Data

Data is a representation of facts, observations, instructions, or symbols. Information is data interpreted in a meaningful context. A temperature value such as 23 is data; identifying it as 23 °C in a weather report gives it informational meaning.

Computers require data to be encoded in a form that electronic circuits can distinguish. Binary uses two states, conventionally represented as 0 and 1. These states may correspond to low and high voltage, absence and presence of charge, or two magnetic orientations. A binary digit is called a bit. A group of eight bits is a byte.

A bit does not inherently mean “false” or “true,” nor does it inherently represent a particular number or letter. Meaning depends on the encoding scheme and the instructions used to interpret it. The same eight-bit pattern might represent a number, a character, part of an image, or an instruction.

2. Number Systems and Binary Representation

2.1 Positional notation

In a positional number system, the value of a digit depends on its position and the system’s base. A number in base b has positional weights that are powers of b. For a four-digit decimal number, for example:

4726 = 4×103 + 7×102 + 2×101 + 6×100

Binary is base 2 and uses only 0 and 1. The rightmost position has weight 2⁰, the next has weight 2¹, and so forth.

(101101)2 = 1×25 + 0×24 + 1×23 + 1×22 + 0×21 + 1×20 = 4510

The subscript identifies the base. In ordinary prose, a number without a subscript is generally assumed to be decimal, but programmers often use prefixes such as 0b for binary and 0x for hexadecimal.

2.2 Decimal-to-binary conversion

To convert a positive decimal integer to binary, repeatedly divide by 2 and record the remainders. Reading the remainders from bottom to top produces the binary result.

Worked example: Convert 45₁₀ to binary.

DivisionQuotientRemainder
45 ÷ 2221
22 ÷ 2110
11 ÷ 251
5 ÷ 221
2 ÷ 210
1 ÷ 201

Reading upward gives 1011012.

2.3 Binary arithmetic

Binary addition follows rules analogous to decimal addition:

ABSum bitCarry
0000
0110
1010
1101

For example:

1011
+ 0110
------
10001

This is 11 + 6 = 17 in decimal. In fixed-width arithmetic, a carry beyond the available number of bits may be discarded, causing overflow.

2.4 Unsigned and signed integers

With n bits, an unsigned binary number can represent values from 0 through:

2n − 1

For example, eight unsigned bits represent 0 through 255. A common signed representation is two’s complement. With n bits, two’s-complement representation covers:

−2^(n−1) through 2^(n−1) − 1

Thus, eight-bit two’s-complement integers range from −128 to +127. Negative values are formed by inverting every bit of the positive value and adding 1. Two’s complement is widely used because ordinary binary addition also works for signed values, subject to overflow limits.

2.5 Fractions and floating-point values

Binary fractions use negative powers of two. For example:

(0.101)2 = 1×2^(−1) + 0×2^(−2) + 1×2^(−3) = 0.62510

Computers commonly represent very large or very small real numbers using floating-point notation. A floating-point value contains a sign, a significand, and an exponent. This provides a wide range but only finite precision. Consequently, some decimal fractions, including 0.1, cannot be represented exactly in binary floating point. This can produce small rounding differences in financial, scientific, or statistical calculations.

3. Hexadecimal Representation

Hexadecimal is base 16 and uses the symbols 0–9 and A–F, where A represents 10 and F represents 15. One hexadecimal digit represents exactly four bits, making hexadecimal a compact way to read binary data.

BinaryHexadecimalDecimal
000000
010155
1010A10
1111F15

To convert binary to hexadecimal, group bits from the right into groups of four and replace each group with its hexadecimal equivalent.

(11010110)2 = (D6)16

To verify, D is 13 and 6 is 6, so:

13×16 + 6 = 21410

Hexadecimal is used in memory addresses, machine code, debugging, color values, and network identifiers. A web color such as #3366CC contains three hexadecimal pairs representing red, green, and blue intensity values.

4. Boolean Logic and Digital Decision-Making

Boolean logic operates on two logical values: true and false. In digital systems these are commonly encoded as 1 and 0. The principal operators are NOT, AND, and OR.

  • NOT A reverses A.
  • A AND B is true only when both inputs are true.
  • A OR B is true when at least one input is true.
ABA AND BA OR BNOT A
00001
01011
10010
11110

Other useful operators include XOR, which is true when exactly one input is true, and NAND and NOR, which are the inversions of AND and OR. NAND and NOR are functionally complete: circuits using either operator alone can implement any Boolean function.

Boolean expressions are used in computer programs, search queries, access-control rules, spreadsheet formulas, and digital circuits. For example, access may be granted when:

(A authenticated) AND (role = “manager” OR role = “auditor”)

The laws of Boolean algebra support simplification. De Morgan’s laws are particularly important:

NOT(A AND B) = (NOT A) OR (NOT B)
NOT(A OR B) = (NOT A) AND (NOT B)

A careful distinction is required between logical operators and bitwise operators. Logical AND evaluates truth conditions, whereas bitwise AND compares corresponding bits in binary values. For example, 1100 AND 1010 = 1000 as a bitwise operation.

5. Character Encoding

A character encoding maps symbols to numerical code points and then to binary sequences. Early systems used limited encodings. ASCII represents 128 standard characters, including English letters, digits, punctuation, and control characters. Extended eight-bit character sets can represent 256 values, but different regional encodings are not always compatible.

Unicode was developed to support writing systems worldwide. Unicode assigns code points to characters; UTF-8, UTF-16, and UTF-32 are different methods for encoding those code points as bytes. UTF-8 is dominant on the web because it preserves ASCII compatibility and uses one to four bytes per Unicode character.

A character is not always equivalent to one visible symbol or one byte. An accented letter may be represented as a single precomposed code point or as a base letter followed by a combining mark. Some visible symbols, including emoji sequences, may consist of multiple code points. Applications should therefore distinguish bytes, code points, and user-perceived characters.

Encoding errors can produce mojibake, in which text appears as unrelated symbols. Reliable systems specify character encoding explicitly, normalize text where appropriate, validate input, and preserve Unicode metadata during data exchange.

6. Multimedia Representation

6.1 Images

A raster image is a rectangular grid of pixels. Each pixel stores color information. In an RGB model, a color is represented by red, green, and blue components. If each component uses 8 bits, the color depth is 24 bits per pixel and the number of possible color combinations is:

224 = 16,777,216

For an uncompressed image, approximate storage is:

storage = width × height × color depth in bits ÷ 8

This estimate excludes headers, metadata, and possible padding. A 1,920 × 1,080 image at 24 bits per pixel requires:

1,920 × 1,080 × 24 ÷ 8 = 6,220,800 bytes

That is approximately 6.22 MB using decimal prefixes, before compression.

Vector graphics represent shapes, lines, curves, and fills mathematically rather than storing every pixel. They scale well for logos and diagrams, whereas raster images are appropriate for photographs.

Compression may be lossless or lossy. Lossless methods preserve the original data and are suitable for text, program files, and images requiring exact reproduction. Lossy methods remove information judged less perceptible and can achieve smaller files, but repeated editing may introduce artifacts.

6.2 Audio

Digital audio samples the amplitude of a sound wave at regular intervals. Three important parameters are sample rate, bit depth, and number of channels. For uncompressed pulse-code modulation, approximate storage is:

storage = sample rate × bit depth × channels × duration ÷ 8

For 44,100 samples per second, 16 bits per sample, two channels, and 60 seconds:

44,100 × 16 × 2 × 60 ÷ 8 = 10,584,000 bytes

The sample rate must be high enough to capture the frequencies of interest. The Nyquist condition states that a sampling rate must be greater than twice the highest frequency being represented to avoid aliasing. In practical systems, an anti-aliasing filter is used before sampling.

Bit depth affects quantization resolution and dynamic range. Increasing bit depth reduces quantization error, but it also increases storage requirements. Compressed formats such as AAC and Opus reduce size through coding techniques, often with some loss of information.

6.3 Video

Digital video is a sequence of images displayed at a frame rate. Storage depends on frame dimensions, color depth, frame rate, duration, audio, metadata, and compression. Uncompressed video is usually very large, so codecs use spatial and temporal redundancy. Spatial compression reduces repetition within a frame; temporal compression represents changes between frames.

Compression settings involve trade-offs among quality, file size, processing requirements, and latency. A streaming service may use adaptive bitrate delivery, selecting a suitable representation according to network conditions and device capability.

7. Units of Storage and Data Transfer

The basic units are the bit and byte. Common decimal prefixes use powers of 10, while binary prefixes use powers of 2.

UnitDecimal meaningBinary meaning
kilobyte / kibibyte1,000 bytes1,024 bytes
megabyte / mebibyte10⁶ bytes2²⁰ bytes
gigabyte / gibibyte10⁹ bytes2³⁰ bytes
terabyte / tebibyte10¹² bytes2⁴⁰ bytes

The symbols kB, MB, and GB conventionally indicate decimal units, while KiB, MiB, and GiB indicate binary units. Manufacturers often advertise storage using decimal units; operating systems may display a related binary quantity, which can make a disk appear smaller than expected.

Storage capacity is not the same as data-transfer rate. Capacity is measured in bytes; network speed is commonly measured in bits per second. A nominal 100 megabit-per-second link has a theoretical byte rate of:

100,000,000 ÷ 8 = 12,500,000 bytes per second

Actual throughput is lower because of protocol overhead, congestion, signal conditions, and competing traffic.

8. Computer Operations and Architecture

A computer system combines hardware, software, data, and users or procedures. The central processing unit contains an arithmetic and logic unit, registers, and control circuitry. Main memory stores instructions and data that are actively being used. Secondary storage retains data when power is removed. Input and output devices connect the system to its environment.

The basic instruction cycle is:

  1. Fetch: obtain the next instruction from memory.
  2. Decode: determine the operation and operands.
  3. Execute: perform the operation.
  4. Store or write back: place the result in a register or memory when required.
  5. Update the program counter: identify the next instruction.

Modern processors improve performance through caches, pipelining, multiple cores, branch prediction, and specialized accelerators. These mechanisms do not change the logical meaning of a program, but they affect execution time, energy use, and predictability.

The operating system manages processes, memory, files, devices, protection, and user interfaces. Applications request services through system calls or higher-level APIs rather than directly controlling most hardware.

9. Performance Measures

Performance must be measured in relation to a workload. Important measures include:

  • Latency: time taken to complete one operation or respond to a request.
  • Throughput: amount of work completed per unit of time.
  • Bandwidth: maximum or measured data-transfer capacity.
  • Clock frequency: cycles per second, measured in hertz.
  • Execution time: elapsed time required by a program or task.
  • Utilization: proportion of a resource’s capacity being used.

Clock speed alone does not determine performance. A useful CPU relationship is:

CPU time = instruction count × cycles per instruction ÷ clock rate

Instruction count depends on the program and compiler, cycles per instruction depends on the instruction mix and processor, and clock rate is cycles per second. The formula assumes the relevant averages are meaningful for the workload and that CPU time, rather than waiting for input/output, is being analyzed.

Worked example. A program executes 3 × 10⁹ instructions, averages 1.5 cycles per instruction, and runs on a 3 × 10⁹ Hz processor:

CPU time = (3×109 × 1.5) ÷ (3×109) = 1.5 seconds

Amdahl’s law explains why improving only one part of a system has limited effect. If fraction f of execution time is improved by factor s, the overall speedup is:

speedup = 1 ÷ ((1 − f) + f ÷ s)

The formula assumes the workload remains comparable and that the improved and unimproved portions can be separated. If 40% of a task is improved by a factor of 4, the overall speedup is:

1 ÷ (0.60 + 0.40 ÷ 4) = 1 ÷ 0.70 ≈ 1.43

This demonstrates why balanced optimization is more valuable than focusing blindly on peak clock rate.

10. Algorithms and Computational Thinking

An algorithm is a finite, precise sequence of steps for solving a problem or transforming input into output. A good algorithm has defined inputs and outputs, unambiguous steps, termination, and effectiveness: each step can be carried out in practice.

Computational thinking is a problem-solving approach involving:

  • Decomposition: divide a complex problem into manageable parts.
  • Pattern recognition: identify similarities and repeated structures.
  • Abstraction: focus on essential characteristics while ignoring irrelevant detail.
  • Algorithm design: specify a repeatable procedure.
  • Evaluation: test correctness, efficiency, usability, and limitations.

Consider a linear search through a list. The algorithm examines elements in sequence until it finds the target or reaches the end. With n elements, its worst-case time grows proportionally to n, commonly expressed as O(n). If a sorted list supports binary search, the search range is halved at each step, giving O(log n) time. Big-O notation describes asymptotic growth; it does not provide an exact running time for every machine.

A basic algorithm can be expressed in pseudocode:

LinearSearch(list, target)
    for each item in list
        if item equals target
            return position of item
    return “not found”

Testing should include normal cases, boundary cases, empty input, invalid input, duplicate values, and unusually large inputs. Correctness means the algorithm produces the required result for every input within its defined domain. Efficiency concerns time and memory, but a theoretically efficient algorithm may be unsuitable if it is difficult to maintain or violates privacy requirements.

11. Illustrative Case: Designing a Campus Event-Booking System

Background

A university wants students and staff to reserve classrooms and laboratories through an online system. Existing email-based booking causes duplicate reservations and makes it difficult to identify available resources.

Problem

The system must accept a requested room, date, start time, end time, and user identity. It must reject incomplete or invalid requests, prevent overlapping bookings, apply authorization rules, and provide a reliable confirmation.

Analysis

The problem can be decomposed into input validation, identity verification, authorization, conflict detection, persistence, and notification. Dates and times must use an unambiguous standard representation, preferably with explicit time-zone handling. User roles can be represented as Boolean conditions, such as “authenticated AND authorized.”

Approach

A suitable algorithm is:

BookRoom(request)
    validate room, date, start time, and end time
    reject if end time is not after start time
    authenticate requester
    check requester’s permission for the room
    search existing bookings for an overlap
    if an overlap exists, return conflict message
    otherwise save the booking atomically
    record an audit event
    send confirmation

The overlap test must consider whether intervals touching at an endpoint are allowed. If a booking occupies [start, end), a second booking may begin exactly at the first booking’s end. This convention avoids ambiguity, but it must be documented.

Outcome

The system reduces duplicate bookings, provides an audit trail, and improves resource utilization. Performance depends on indexing room and time fields, while reliability depends on transactions that prevent two simultaneous requests from both observing an apparently free room.

Learning Points

The case demonstrates that representation choices affect correctness. Time formats, character encodings, Boolean authorization rules, database constraints, and algorithmic search all contribute to system quality. It also demonstrates that a technically functional system must address privacy, accessibility, security, and accountability.

12. Limitations, Ethics, and Contemporary Practice

Digital representation is finite and selective. Sampling can omit information; compression can discard detail; encoding schemes can exclude communities; and numerical precision can affect decisions. Developers should document assumptions and choose representations appropriate to the domain.

Personal data should be minimized, protected in transit and at rest, and retained only as long as justified. Access rules should follow least privilege, and audit records should avoid exposing unnecessary sensitive information. Systems handling health, financial, educational, or biometric data may be subject to sector-specific laws and institutional governance.

Artificial-intelligence systems intensify the importance of representation. Training data are encoded, normalized, tokenized, compressed, and transformed into numerical vectors. Poorly represented or imbalanced data can produce inaccurate or discriminatory results. Responsible practice requires data provenance, quality checks, privacy protection, explainability appropriate to the context, and human oversight.

Contemporary systems increasingly use heterogeneous processors, cloud services, edge computing, graphics processors, and specialized AI accelerators. These environments make performance multidimensional: energy efficiency, latency, throughput, memory movement, reliability, and security may matter as much as raw processing speed. Benchmark results should therefore state the workload, configuration, measurement method, and relevant units.

Best Practices

  1. Specify numeric ranges, units, precision, and overflow behavior.
  2. Use explicit character encodings, preferably Unicode with a documented format such as UTF-8.
  3. Distinguish bits from bytes and decimal from binary prefixes.
  4. Choose lossless or lossy compression according to the purpose of the data.
  5. Validate inputs and test boundary conditions.
  6. Measure performance using representative workloads rather than clock speed alone.
  7. Document algorithm assumptions, complexity, and failure conditions.
  8. Protect data through access control, encryption, auditing, and appropriate retention.
  9. Treat accessibility, fairness, and privacy as design requirements.
  10. Record provenance and transformation steps for data used in analytical or AI systems.

Chapter Summary

Computers represent information as binary patterns, but the meaning of a pattern depends on its encoding and interpretation. Binary positional notation supports digital arithmetic, while hexadecimal provides a compact representation of binary values. Unsigned and two’s-complement systems represent integers within defined ranges, and floating-point systems trade exactness for range and efficiency.

Boolean logic provides the foundation for digital circuits, program conditions, access rules, and search expressions. Character encodings map symbols to code points and bytes; Unicode and UTF-8 support international text. Images are represented as pixels or geometric descriptions, audio as sampled amplitudes, and video as sequences of compressed frames. Storage capacity, transfer rate, latency, throughput, and bandwidth are related but distinct measures.

The fetch–decode–execute cycle describes fundamental processor operation, while CPU time and Amdahl’s law help explain performance. Algorithms transform inputs into outputs through finite, precise procedures. Computational thinking applies decomposition, pattern recognition, abstraction, algorithm design, and evaluation. Finally, representation choices have practical, ethical, privacy, and governance consequences.

Key Terms

Bit: The smallest binary data unit, having a value of 0 or 1.

Byte: A group of eight bits.

Binary: A base-2 number system using 0 and 1.

Hexadecimal: A base-16 number system using 0–9 and A–F.

Two’s complement: A common representation for signed binary integers.

Overflow: A condition in which a result exceeds the range available in a fixed number of bits.

Boolean logic: A system of reasoning using true/false values and logical operators.

Truth table: A table showing outputs for every combination of logical inputs.

Character encoding: A mapping between characters, code points, and binary storage.

Unicode: A universal character-set standard supporting writing systems worldwide.

Pixel: A single addressable element of a raster image.

Sampling: Measuring a continuous signal at discrete time intervals.

Bit depth: The number of bits used to represent one sample or component.

Lossless compression: Compression that permits exact reconstruction of the original data.

Lossy compression: Compression that discards some information to reduce size.

Latency: Time taken to respond to or complete an operation.

Throughput: Amount of work completed per unit of time.

Algorithm: A finite, precise procedure for solving a problem.

Computational thinking: A structured approach using decomposition, abstraction, patterns, and algorithms.

Big-O notation: A description of how resource use grows as input size increases.

Review Questions

Short Answer Questions

  1. What is the difference between a bit and a byte?
  2. Why is hexadecimal useful when working with binary data?
  3. State the logical conditions under which AND and OR are true.
  4. What is the difference between latency and throughput?
  5. Name the main stages of the fetch–decode–execute cycle.

Long Answer Questions

  1. Explain unsigned and two’s-complement integer representation, including their ranges for n bits.
  2. Compare raster and vector image representation and identify suitable applications for each.
  3. Explain how sample rate and bit depth affect digital audio quality and storage.
  4. Discuss why clock frequency alone is an inadequate measure of computer performance.
  5. Explain decomposition, abstraction, pattern recognition, and algorithm design as elements of computational thinking.

Analytical / Application Questions

  1. A system stores 2,000 × 1,500 pixel images using 24 bits per pixel without compression. Calculate the approximate storage requirement in bytes and explain two factors that could change the actual file size.
  2. Design a Boolean expression for a laboratory door that opens only when a person is authenticated and either an enrolled student or an authorized technician. Discuss one security limitation of this rule.
  3. A booking application sometimes creates duplicate reservations when two users submit requests simultaneously. Analyze the likely cause and propose an algorithmic or database-level solution.

Multiple Choice Questions with Answers

Question 1

What decimal value is represented by 1011012?

A. 35

B. 45

C. cinc?

D. 55

Correct Answer: B. 45

Question 2

How many different values can be represented by eight unsigned bits?

A. 128

B. 255

C. 256

D. 512

Correct Answer: C. 256

Question 3

Which Boolean operation is true only when both inputs are true?

A. AND

B. OR

C. XOR

D. NOT

Correct Answer: A. AND

Question 4

Which encoding is designed to support writing systems worldwide?

A. ASCII

B. Unicode

C. BCD

D. Morse code

Correct Answer: B. Unicode

Question 5

A 24-bit RGB image has how many possible color combinations per pixel?

A. 256

B. 65,536

C. 16,777,216

D. 24,000,000

Correct Answer: C. 16,777,216

Question 6

What is the approximate uncompressed storage for 60 seconds of stereo audio sampled at 44,100 Hz with 16-bit samples?

A. 1,058,400 bytes

B. 10,584,000 bytes

C. 44,100,000 bytes

D. 105,840,000 bytes

Correct Answer: B. 10,584,000 bytes

Question 7

Which measure describes the amount of work completed per unit of time?

A. Latency

B. Throughput

C. Clock frequency

D. Capacity

Correct Answer: B. Throughput

Question 8

What is the usual purpose of the decode stage in the instruction cycle?

A. Convert an instruction into an executable operation and identify operands

B. Store a file permanently on secondary storage

C. Increase the processor clock frequency

D. Compress the instruction into fewer bits

Correct Answer: A. Convert an instruction into an executable operation and identify operands

Question 9

What is the typical worst-case time complexity of linear search through n unsorted items?

A. O(1)

B. O(log n)

C. O(n)

D. O(n²)

Correct Answer: C. O(n)

Question 10

If 40% of a task is improved by a factor of 4, what is the approximate overall speedup according to Amdahl’s law?

A. 1.11

B. 1.43

C. 2.50

D. 4.00

Correct Answer: B. 1.43

Fundamentals of Information Technology
Chapter 2 of 15