Bits and Bytes

BITS AND BYTES
September 6, 2016
Units of Measurement
 Recall: Eight bits of data are called a byte.
 A single character of ASCII text requires one byte.
 How many bytes would it require to store “hello” in a plain text
document?
 Plain text document (.rtf): 5 bytes.
 Word document (.docx): 21,969 bytes
 Why the difference??
Bytes and Whatnot
 Kilobyte (KB): about 1000 (103) bytes
 Megabyte (MB): about 1000 KB, or 1 million (106) bytes
 Gigabyte (GB): about 1000 MB, or 1 billion (109) bytes
 Fun fact: A DVD disk has a capacity of 4.7 GB
 Terabyte (TB), about 1000 GB, or 1 trillion (1012) bytes
 Used to be some mythical object; now becoming more
commonplace
Why “about”?
 Since all of these measures are based on bits (i.e., binary
digits), which are in turn based on powers of 2, there is a
school of thought that says 1 KB = 210 bytes.
 210 = 1024 bytes
 Similarly, 1 MB = 220 bytes = 1,048,576 (10242) bytes
 1 GB = 230 bytes = 1,073,741,824 (10243) bytes…
 The terms “kibibyte,” “mebibyte,” “gibibyte,” and “tebibyte”
have been introduced as a means of referring to this powersof-2 interpretation.
 For our purposes, stick with the powers-of-10 interpretation.
Unit Conversions
 Simple math: If you have N bytes, you have N/1000 KB.
 23,000 bytes = 23 KB
 Similarly, if you have N KB, you have N/1000 MB.
 45,400 KB = 45.4 MB
 Et cetera.
Unit Conversions
 2,000,000 bytes is about how many MB?
 23,000 KB is about how many MB?
 500 KB is about how many MB?
 4,000,000,000 bytes is about how many GB?
 Suppose you have several 5 MB .jpg images. How many
would fit on a 16 GB flash drive?
Moore’s Law
 Named for Intel co-founder Gordon Moore.
 More (Moore?) of an observation than a “law.”
 Essentially states that chip capacity doubles every two years.
 E.g., MP3 player capacity every 2 years: 2 GB, 4 GB, 8 GB…
 Why? Transistors get twice as small every two years; if you
can fit twice as many transistors on a chip, the capacity will
also double.