Computer Basics for Photographers - Bits and Bytes Explained!
I have seen several posts, in fact three today, where photographers confuse camera math terms with computer math terms and end up completely confused. Let me try and somewhat simplify a complicated subject. Let’s start with computers.
Computers are mathematically based devices and their operation at the most basic level involves binary math. What is binary math? To answer that question, you must first understand a couple of simple concepts. First, there are two ways to count. The Roman’s used a non-positional counting system. If you look at how one counts in Roman numerals, you will see that the sequence is I, II, III, IV, V, VI, VII, Etc. Note that the value of the numbers are unrelated to their position. Four IV has the higher value “V” (five) to the right of the “I” (one), but VI (six) has the higher value “V” to the left of the lower value “I”.
You are most familiar with the decimal “base-10” number system, a positional number system; each position to the left or right of the decimal point has place value. From the decimal point to the left, the place values are 1, 10, 100, Etc.; while to the right of the decimal point the values are 0.1 (tenths), 0.01 (hundredths), 0.001 (thousandths), Etc.
The second thing you must understand is that computers do everything in a binary number system also called “base 2”. A binary system is also a positional system, however instead of ten numbers (0 through 9), there are only two (0 and 1). In a binary system, you count 000 (equals 0 decimal), 001 (equals 1 decimal), 010 (equals 2 decimal), 011 (equals 3 decimal), 100 (equals 4 decimal), 101 (equals 5 decimal), 110 (equals 6 decimal) and 111 (equals 7 decimal). In a computer, binary numbers describe the position of electronic switches (0=off and 1=on). One byte is 8 bits or two hexidecimal digits.
In a binary system the equivalent of a single base-10 digit is called a “bit”. In computer Machine Language, the computer language in which a computer calculates, everything is binary. When trying to write programs, this is very cumbersome because a programmer could need to enter a 64-bit number for each of the thousands of commands that make up a program. To simplify programming, bits are converted to “words”. In modern computers, words are expressed as hexadecimal (base-16) numbers. Instead of each position having ten possible values as in the decimal system, each position has 16 possible values. In “hex”, you count 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D and F. Letters are used above the value of 9 because decimal digits only go as far as 9. By using hex, programmers are able to form four position bytes so that one byte equals four bits. Furthermore, by combining those 16 bytes into a “word” (a collection of bytes), programming is substantially simplified because the 64 bits can be programmed with less input.
“Pixels” and “Megapixels” (=1,000,000 pixels) are relative to the camera and not the computer. The computer’s file size is a function of many things besides the number of pixels. Remember, that the file contains “Metadata”. The metadata contains information on the camera and settings used to take the picture, detailed information about the picture itself including each and every editing step that was applied to the picture, copyright information, Etc. Look at the size of a file both before and after editing and you will see that the file size can grow substantially.
Therefore, the notion that there is a DIRECT mathematical relationship between the camera’s pixel quantity, file type, or anything else related to the camera and the computer’s file size should be considered questionable.
Computer Basics for Photographers - Bits and Bytes... (
show quote)