Care for a Byte – Explaining Bits, Bytes and More
What is it with these bytes? And what about the bits? Are you up with the bits and bytes?
It’s estimated that, each year more than 80 billion plus photographs are taken worldwide; if they were all digital you’d need more than 400 Petabytes (PB) of storage.
A Petabyte is about half the content of all the US’s academic libraries. Up with your bits and bytes?
Terms
A bit is a binary digit — the basic unit of information storage. The bit is also a unit of measurement, the information capacity of one binary digit. A single bit is a one or a zero.
A byte (abbreviation: B) mostly consists of eight bits; a Kilobyte (KB) is 1024 bytes; a Megabyte (MB) is 1024 Kilobytes; a Gigabyte (GB) is 1024 Megabytes; a Terabyte (TB) is 1024 Gigabytes; a Petabyte (PB) is 1024 Terabytes; an Exabyte (EB) is 1024 Petabytes; a Zettabyte (ZB) is 1024 Exabytes; a Yottabyte (YB) is 1024 Zettabytes.
Five Exabytes equates to all the words ever spoken; a Zettabyte is the number of all the grains of sand on every beach in the world. A Yottabyte equals the number of atoms in 7000 human bodies.
If you have trouble remembering all that that, just recite Baudy Kings Must Gallop Towards Petulant Elephants Zoo-bound Yearly.
Got it?
Bit Depth
Life was easy when digital images were described as having a bit depth of 8-bits. These days it’s not unusual to see cameras that will capture images in 12-bit and 16-bits.
The more bits, the more gradation information an image can hold.
A 2-bit image is a limited grey scale image and contains four grey tones.

A 2-bit image

A 4-bit Image
An 8-bit image can hold 256 levels of grey in a monochrome image. An 8-bit, three colour image (red, green and blue) can also be described as a 24-bit image … 8-bits for each of the three colours. This means an 8-bit image can contain over 16 million possible colours.

An 8-bit Image
A three colour, 16-bit image can contain almost three billion colours.
However, in the real world we can only really see about 7-8 million discrete colours and print out, at most, a few tens of thousands of colours on the best of output devices.
A massive colour range allows us increased editing elbow room.
Capacity

Have you ever wondered why your 80GB drive cannot hold 80GB of data? The answer is that the magnetic surface of the hard drive is divided into sectors; this formatting soaks up capacity so that the 80GB becomes a 75GB.
In similar fashion a 2GB flash memory stick will allow the storage of only 1.8GB of data.


12 Responses to “Care for a Byte – Explaining Bits, Bytes and More” - Add Yours
April 5th, 2009 at 9:22 am
To be fair, about the hdd size, there is also the issue with manufacturers advertised 2000MB as 2GB, when really its 2048MB. Also most file systems use sort of buffer on each drive to store such things as inode information. Anyway, I’m getting off topic…
April 5th, 2009 at 9:32 am
0100011101110010011001010110000101110100001000000011101000101001
(Real message! Just had a flashback to my computer science lessons)
April 5th, 2009 at 9:42 am
The reduction in size isn’t because of sectors, it’s purely due to marketing being deceptive.
A 2GB drive that you buy will typically be very close to 2,000,000,000 bytes, which is actually only 1.86GB, properly counted (1.86* 1024 * 1024 * 1024). The manufacturers use 1000 rather than 1024 to artificially inflate advertised drive prices.
April 5th, 2009 at 10:30 am
And here’s a useful connection: 1 megapixel = 1 million pixels (as opposed to 2^20, which is slightly more — “mega” usually means “million” in everyday computer usage), and each pixel typically is recorded with 8 bits of information. That makes for 24 bits (= 3 bytes) of information per pixel, so the uncompressed size of your 10 MP image is 10,000,000 * 3 = 30,000,000 bytes = 28 megabytes (approximately — there is usually a little more information included, such as exposure data). This is why your images shot in raw format are so huge! On the other hand, images converted to jpegs are considerably smaller, because not every single pixel is recorder — rather, big swaths of (approximately) the same color are recorded all together. This is why jpegs are smaller, but also why they can look worse if you compress them too much — too many “similar” colors get compressed into just a single color.
Anyhow, that’s a connection between bits, bytes, and megapixels. Enjoy!
April 5th, 2009 at 5:43 pm
What chrisc said. You should delete that sectors nonsense in the article. Formatting only accounts for a small percentage of the apparent loss.
April 6th, 2009 at 5:21 am
No, sectors are relevant. Think of a formatted hard drive as being like a spiral-bound notepad. Each page is represents a sector on the drive. Every time you save a file, it starts on a new page. If the file is bigger than the page, it spills over to the next one. However, any empty space between the end of the file and the end of the page can’t be used for a new file, it’s effectively “dead space”, until you delete the file and free up the whole sector again. A sector on a hard drive might be 4K in size, so if you write out that shopping list in notepad and save it, it may only take up 2% of the sector. The other 98% can’t be used at all until you delete the shopping list. It may say in explorer that the shopping list is 1K in size, but it’s actually using up 4K of disc space.
April 6th, 2009 at 2:35 pm
Actually, both dan and Chris/chrisc are correct, but the impact is different.
A hard drive that is marketed as being “500GB” is in fact roughly 500,000,000,000 bytes in size, thus using the “metric” giga meaning 1,000,000,000. This is roughly 465 of the “computer” gigabytes, as described in the article.
However, that space is allocated in sectors (typically 512 bytes), and organized by the operating system into blocks, which are usually 4kB (so eight sectors). As dan indicates, every file is allocated in terms of these blocks, so there is an average of 2kB of wasted space per file. However, this wasted space is not a consideration when discussing the total drive capacity.
There are a number of tables on the disk that are used by the operating system to actually locate the correct blocks, which does reduce the available space or capacity. In the grand scheme of things, however, the difference between metric or hard drive marketing GB (1,000,000,000 bytes) and computer or binary GB (1,073,741,824 bytes) is much larger than the amount of disk space consumed by these tables.
The question is a good one to answer, as there is frequently confusion when people ask why their drive is smaller than advertised, but a better answer than what is in the article would be beneficial.
April 6th, 2009 at 3:23 pm
@Bruce’s answer is the most correct – dan and Chris’s previous comments were both technically correct, but have different impacts
I’d say that this article fails to go over the importance of 12-bit and 14-bit images. The JPEG implementation that most computers use usually only does 8-bit images (AFAIK). You get 12 and 14 bit images from shooting in RAW. The nice thing about 12-14 bit images is that you get a better _dynamic range_. Although you might not get a wider range (someone verify this?) you’ll definitely get a finer gradiation/steps between each color that can make all the difference in post processing. For example – say something is majorly underexposed. When you up the exposure in post, 12-14 bit images offer you 16-64 times more colors, so you’ll probably be able to extract more detail. =]
April 6th, 2009 at 11:13 pm
I find it disheartening that most everyone who has commented seems to be nitpicking details of measurement and overlooking one of the primary intentions of the post. Regardless whether your drive is truly 80GB or only “nominally” 80GB, understanding bit-depth as it applies to photography is the most relevant issue here. I think it was pretty well explained, though full understanding does require some prior technical knowledge.
Given that this is such a technical and complex topic, I think it was very well summarized in such a short post.
April 7th, 2009 at 2:15 am
I got this from another site, but it made me laugh. Thanks to Ilan for the inspiration.
010000100110010100100000011100110111010101110010011001
010010000001110100011011110010000001100100011100100110
100101101110011010110010000001111001011011110111010101
110010001000000100111101110110011000010110110001110100
01101001011011100110010100101110
April 8th, 2009 at 12:39 pm
Well, Jeffery, It is not nitpicking. 80gig drive holds 75gigs of data, thats the fact that we all knew already. But the author was trying to explain WHY it is so. Information given to us was incorrect, so why not correct it?
I don’t see anything wrong with getting facts straight. I see a different issue: This info was not given to us as a authors guess, or opinion. It was given like a pure truth, which is wasn’t. That worries me a little as for quality of other info, advice, explanation I am getting here. So it si a good reality check. While this site is extremely good and helpfull, I think its very important that we all get smarter and educated by getting the proper info. You dont have to get deep into math, computer science, or nuclear disbalance chemistry, but no reason to expain things wrong way. It wont benefit newbies, and will turn off the pros. IMHO, anyway. No disrespect or offence meant to anyone.
April 8th, 2009 at 12:43 pm
My previous post was refered to Jeffrey Kontur’s comment.
and I just wanted to add, that I actualy find jeffrey’s post (1 before that) most educating and interesting. Although it was a bit harsh of him to start with words “I’d say that this article fails” :)
Nevertheless, If someone knows better, they should talk so we can learn from it. That what I think.
Leave a Reply