# Text, Bytes and Videotape

January 2003

## Understanding bits and bytes

With 8 bits, we have 28= 256 possibilities (each bit can be zero or one, and the possibilities multiply together). We call 8 bits a byte. The very common ASCII system makes each letter of the alphabet, both capital and small (plus punctuation and some other symbols) correspond to a number from 0 to 255 (for example a=97, b= 98 and so on), so one letter can be expressed with one byte.

Thus the word "Shannon" takes 7 bytes. A page of a book (with 50 characters per line, 50 lines per page) takes 2,500 bytes, so a 400 page book takes 1,000,000 bytes. As with metres and kilometres, we need some new units, or we'd need a lot of zeroes! Hence we write that a page is approximately 2.5KB, and a book is approximately 1 MB (something strange happens here in that KB ("kilobyte") = 1,024 = 210 bytes, not 1000 as you might expect). It's easiest to keep track of things with powers of 2 like this. The next largest unit is 1MB ("megabyte") = 1,048,576 = 220 bytes, and then 1GB ("gigabyte") = 230 bytes.

Bits and bytes
Image from DHD photo gallery

Computers often represent a pixel of colour with 3 bytes. This is like mixing paint - the amount of red in the mixture varies from 0 to 255, the amount of green varies from 0 to 255, the amount of blue from 0 to 255. A computer monitor showing $800\times600$ pixels therefore needs $3 \times 800\times600 = 1,440,000$ bytes - more than a whole book - just to fill the screen. A picture really is worth more than a thousand words! \par As for a movie, we need $60 \times 60 \times 24 = 86,400$ pictures per hour (60 minutes per hour, 60 seconds per minute, 24 frames per second). That is, we'd need $1,440,000 \times 86,400 = 124,416,000,000$ bytes or $115.8 {\rm GB}$ to store an hour of film.

A CD-R can typically store about 700MB, a DVD can store about 4GB. It's clear we have to do something clever (that is, data compression) to fit a movie on a disc.

Back to main article