4.2 Encoding, Files & Storage Concepts

Key Takeaways

  • Encoding maps abstract symbols (characters, numbers, colors) into bit patterns; file types describe how those bits are structured for an application; a filesystem organizes files on a storage device
  • A bit is 0 or 1; a byte is 8 bits; larger units use either binary prefixes (1024-based: KiB/MiB/GiB) or decimal SI prefixes (1000-based: KB/MB/GB) — know both conventions
  • ASCII and Unicode/UTF-8 are character encodings; binary formats (images, executables) are not “plain text” even though they are still sequences of bytes
  • Volatile storage (RAM) loses contents without power; non-volatile storage (SSD/HDD) keeps data for later retrieval
  • Backups make recoverable copies; RAID (at a basic level) combines disks for redundancy and/or performance — RAID is not a substitute for backups
Last updated: July 2026

4.2 Encoding, Files & Storage Concepts

Quick Answer: Encoding turns symbols into bit patterns; a file type/format defines how an application should interpret a sequence of bytes; a filesystem is how an operating system names, locates, and manages those files on disk. Storage sizes grow from bits → bytes → KB/MB/GB, but 1,024 vs 1,000 multipliers matter on exams and in vendor marketing.

Earlier sections covered binary, hex, and ASCII as number and character representations. This section zooms out: how encoded data becomes files, how big those files are, and where they live.

Three Layers Candidates Often Mix Up

Keep these distinct — Cyber Test distractors love to blur them.

LayerWhat it answersExample
EncodingHow is a symbol represented as bits/bytes?Letter A → ASCII 0x41; UTF-8 for emoji
File type / formatHow is a whole document or object structured?.png image chunks; .pdf objects; .exe PE headers
FilesystemHow does the OS store and find files on a volume?NTFS, ext4, APFS directories, permissions, free space

Encoding can exist without a file (a packet payload, a string in RAM). A file format assumes a byte stream with rules. A filesystem can store many formats and does not care whether a file is text or a video — it tracks names, sizes, timestamps, and block allocation.

Encoding Recap (Tied to Prior Chapters)

  • Binary / hex — how we write the bit patterns humans discuss
  • ASCII — classic 7-bit character set (often stored in 8-bit bytes)
  • Unicode / UTF-8 — modern character encoding; ASCII letters remain single-byte compatible in UTF-8

Encoding answers “what do these bits mean as characters or values?” It does not by itself tell you whether the bytes are a spreadsheet, a photo, or a kernel module.

File Types vs “Just Bytes”

Every file is ultimately a sequence of bytes. The format adds meaning:

KindTypical extensionsNotes
Plain text.txt, .csv, .logHuman-readable if you know the character encoding
Structured text.json, .xml, .htmlText plus format rules
Images.png, .jpg, .gifBinary layouts; opening in a text editor shows garbage
Archives.zip, .tar.gzContainers holding other files
Executables.exe, ELF binariesMachine instructions + headers

Extension tips: Extensions are hints, not cryptographic proof. Renaming photo.jpg to photo.txt does not convert pixels into prose — the byte layout is still JPEG. Security tools therefore inspect magic bytes / file signatures, not only the name.

Filesystems

A filesystem provides:

  • Namespaces — directories and filenames
  • Metadata — size, owner, permissions, timestamps
  • Allocation — which disk blocks hold which file
  • Integrity features — journaling, checksums (implementation-dependent)

When you “save a file,” the application writes bytes; the OS filesystem decides where those bytes land on the SSD or HDD and how to retrieve them later by path.

Bits, Bytes, and Size Units

UnitDefinitionNotes
BitSingle 0 or 1Smallest unit of information
Byte8 bitsAddressable unit in almost all modern systems
Nibble4 bitsOne hex digit

1,024 vs 1,000 — The Exam Trap

Two counting systems appear in the wild:

Name (common speech)Binary (IEC)SI / decimal
Kilobyte-ish1 KiB = 1,024 bytes (2¹⁰)1 KB = 1,000 bytes (10³)
Megabyte-ish1 MiB = 1,024 KiB = 1,048,576 bytes (2²⁰)1 MB = 1,000,000 bytes (10⁶)
Gigabyte-ish1 GiB = 1,024 MiB (2³⁰)1 GB = 1,000,000,000 bytes (10⁹)

Practical guidance for the Cyber Test:

  • Operating systems and many technical contexts historically used powers of 1,024 while still saying “KB/MB/GB.”
  • Drive manufacturers often advertise powers of 1,000, so a “500 GB” drive shows fewer “GB” in an OS that divides by 1,024.
  • If a question says powers of 2 or 1,024, use binary multipliers. If it says SI / decimal / 1,000, use 10³ steps.

Quick conversions (binary convention):

  • 1 byte = 8 bits
  • 1 KiB = 1,024 bytes
  • 1 MiB = 1,024 × 1,024 = 1,048,576 bytes
  • 4 KiB is a common memory page / disk block size in many systems (useful context, not a universal law)

Worked example: How many bits in 2 KiB? 2 × 1,024 bytes × 8 bits/byte = 16,384 bits.

Worked example (decimal): 3 MB (SI) = 3 × 1,000,000 = 3,000,000 bytes.

Where Data Lives: Volatility

StorageVolatile?Role
CPU registers / cacheYesFastest working storage near the CPU
RAMYesActive programs and data; cleared on power loss
SSD / HDDNo (non-volatile)Persistent files and OS install
Optical / tape / cloud object storageNoArchives and backups (access speed varies)

Rule of thumb: If power disappears and the data must still be there, it needs non-volatile storage (or a surviving remote copy). RAM is for work-in-progress speed, not long-term trust.

Backups vs RAID (Basic Concepts)

Cyber aptitude questions sometimes touch resilience vocabulary. Keep the distinction sharp.

Backups

A backup is a copy of data stored separately so you can restore after deletion, ransomware, corruption, or hardware loss. Good backup thinking (even at intro level):

  • Separate from the primary system (different disk, site, or account)
  • Tested restores matter more than unchecked “we have a backup job”
  • Versioning helps if corruption is discovered late

RAID (Conceptual Only)

RAID (Redundant Array of Independent Disks) combines multiple physical disks into one logical volume for redundancy, performance, or both, depending on the level. You do not need to memorize every RAID level for this guide’s depth, but know:

IdeaMeaning
StripingSpread data across disks for speed
MirroringKeep identical copies on two disks
ParityStore extra bits that help rebuild a failed disk

Critical exam point: RAID (especially mirroring) can survive a disk failure, but it does not replace backups. Accidental deletes, ransomware encrypting the volume, and site disasters can wipe or corrupt an entire RAID set. RAID ≠ backup.

Putting It Together: A Single User Action

Suppose you save notes.txt containing the word Go:

  1. Encoding: Characters become bytes (ASCII/UTF-8: G = 0x47, o = 0x6F).
  2. File format: A plain-text file is essentially those bytes (plus maybe a newline); a .docx would wrap text in a ZIP-based Office format instead.
  3. Filesystem: The OS allocates blocks on the SSD, records the path /home/user/notes.txt, and updates metadata.
  4. Size: Two letters are 2 bytes of payload — tiny compared with filesystem block allocation overhead, which is why “empty” files can still consume more than the logical byte count suggests on disk.
  5. Resilience: A nightly backup copies notes.txt elsewhere; RAID might keep the volume online if one drive fails, but only the backup helps if you overwrite the file by mistake.

Common Exam Traps

  1. Calling the filesystem an encoding — NTFS is not how letters map to bits; UTF-8 is.
  2. Assuming .exe is text — executables are binary formats.
  3. Mixing 1,000 and 1,024 — read the question’s wording carefully.
  4. Treating RAID as a backup strategy — redundancy against disk failure is not recovery from logical destruction.
  5. Confusing RAM with disk — RAM is fast and volatile; disk/SSD is persistent and slower.

Study Drill

Explain in one sentence each: encoding, file format, filesystem. Then compute: bits in 1 MiB (binary), and whether a “1 TB” marketing drive matches 2⁴⁰ bytes exactly (it usually does not under decimal labeling). If you can answer those without hesitation, you are ready for Cyber Test items in this area.

Test Your Knowledge

Which statement best separates encoding from a filesystem?

A
B
C
D
Test Your Knowledge

Using the binary (powers of 1,024) convention, how many bytes are in 1 MiB?

A
B
C
D
Test Your Knowledge

Why is RAID alone not an adequate substitute for backups?

A
B
C
D
Test Your Knowledge

Which storage type loses its contents when power is removed?

A
B
C
D