Bits and bytes

A bit is a single binary value, often explained as 0 or 1. A byte is commonly eight bits. Many file sizes, memory amounts, and storage capacities are measured using bytes and larger units.

Binary data units
UnitSimple meaningCommon use
BitOne binary valueSmallest basic data unit
ByteEight bitsText characters and file sizes
KilobyteThousands of bytes approximatelySmall files
MegabyteMillions of bytes approximatelyPhotos, documents, apps
GigabyteBillions of bytes approximatelyStorage and memory
TerabyteTrillions of bytes approximatelyLarge drives and backups

Text as numbers

Computers store text by mapping characters to numbers using encoding systems. The visible letter is human friendly, but the computer stores a code.

Images and sound as samples

Digital images store color values for pixels. Digital audio stores samples of sound waves. Video stores sequences of images plus audio and timing information.

Compression

Compression reduces file size by representing information more efficiently. Some compression keeps exact data, while other compression sacrifices detail to save space.

text
human idea -> encoding -> bits and bytes -> storage or processing -> decoded output

Binary questions

Electronic systems can represent two stable states very reliably. Binary is simple for circuits, even when higher level software hides it from users.