Digital Data Representation

Pixel Canvas: Visualising Digital Images

Draw Your Shape

Interact with pixels to create your shape

Binary Representation

How your shape is stored in memory (1-bit depth)

Memory Usage Calculation

Grid dimensions: 0 × 0 = 0 pixels

Bits per pixel: 1

Total bits calculation: 0 pixels × 1 bits = 0 bits

Bytes calculation: 0 bits ÷ 8 = 0 bytes (rounded up: 0 bytes)

Colour Representation (1-bit)

With 1-bit colour depth, each pixel can only be on or off (2 possible values).

0
1

Image Compression

Lossless Compression: Reduces file size without losing any data. For example, instead of storing "0000000000000000", we could store "16 zeros" (run-length encoding). Formats like PNG use lossless compression.

Lossy Compression: Reduces file size by discarding some data. For example, similar colours might be merged together, or less noticeable details removed. Formats like JPEG use lossy compression.

Compression ratio: For this 0×0 grid at 1-bit depth:

  • Uncompressed: 0 bytes
  • Lossless (estimated): ~0 bytes (50% reduction)
  • Lossy (estimated): ~0 bytes (80% reduction)