Megabytes and Mebibytes

Megabytes and Mebibytes

Computers, as electronic devices, function at their most basic level as a vast series of electric switches, turning off and on. Each switch state is known as a bit, which is represented as a binary digit, a 1 or a 0. These bits combine into huge collections to represent text, images, files, computer programs, and more. The computer can process these bits in entire streams, but to make them easier for human beings to deal with and understand, they are grouped together.

Firstly, we group them together into “words” or small groups of bits that the computer’s memory can deal with. These have standardized into the byte, which is made up of 8 bits. (There is also use of the term “nibble” or “nybble,” which is half a byte, or 4 bits.) Because it has eight bits, this is specifically referred to as an octet. (There are some places where the term “byte” might refer to six bits or other numbers of bits.)

a table showing bits, nibbles, and bytes

There are two main systems to group these bytes into larger bundles. The most commonly used system is based on powers of 10, and follows the typical conventions of our denary or decimal number system and the standard system of prefixes (as used in the metric system). In general, CS students should know the terms up to Exabyte.

A table showing the definitions of kilobytes, megabytes, etc.

To convert between quantities in this system, you simply multiply or divide by thousands. So, 3MB is 3,000KB or 0.003GB. 2.5TB is 2,500GB or 0.0025PB. As we’re used to the denary system, this is fairly easy – simply appending zeros or moving the decimal point.

The other system is based on the binary system, with powers of 2. These are more technically correct and are the proper terms and quantities for use in computer science. Note that the quantities are very close to the denary groupings, so we can use the standard terms of “millions” or “billions.”

A table showing the definitions of kibibytes, mebibytes, etc.

Converting here is not as straightforward, since you need to multiply or divide by 1024. A calculator is really needed. If a student is in an exam situation without a calculator, by remembering that 1024 = 210 this can be done more easily by doubling or halving a number ten (or multiples of ten) times. 200,000 bytes can be converted to kibibytes (KiB) by dividing by two (finding half) ten times. Mentally, that’s fairly easy: 100,000 then 50,000 then 25,000 then 12,5000 …and so on until you reach 195KiB (rounded to the nearest KiB). Similarly, you can convert 3.4GiB to MiB by doubling ten times: 6.8 then 13.6 then 27.2 …and so on until you reach 3,481.6 GiB.

There is also a system referred to as the “customary convention” in which these base-2 quantities are referred to using the terms of the previous system. (For example: 1024 bytes would be referred to as a “kilobyte” and not a “kibibyte.”) Many computer hardware vendors use this “customary convention.”

Computer Science students can use visualization to remember these terms: watch this video to learn how!

For more information on mebibytes and more, check out my online course “Conquer Computer Science: Data Representation”

John Iglar

John Iglar has taught Computer Science to students aged 3 to 83. He has taught in some of the finest international schools around the world, covering the IB Diploma, IGCSE, and many more curricula! No longer tied to a school, he tutors, blogs, freelances, and creates online courses.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.