What's the difference between a megabit and a megabyte?

Recently on a commercial for an internet provider, they used the word megabit to say how fast their internet is. I’ve always known the word megabyte so hearing megabit was a bit odd.
I looked up both the definitions and they are the same.
What’s the difference between a megabit and megabyte? Are they synonyms?

They are not the same. A megaBYTE is eight megaBITS.

One bit is the smallest unit of binary information: a single 1 or 0. A byte is, practically, 8 bits. So, a megabyte is 8 times larger than a megabit. Computer memory is usually measured in bytes, whereas bandwidth is usually given in bits.

A byte is eight bits. A megabyte is eight megabits. That “blazing fast 15 megabit per second broadband connection with UltraTurboSuperDuperMode” is 1.875 megabytes per second. The reason why link bandwidth is quoted in megabits per second instead of megabytes per second is that it makes more sense in the context of signals, where a byte isn’t actually a common grouping of bits when you get into the nuts and bolts of a system. On the other hand, bytes are a common grouping of bits in the context of memory modules, which is why memory capacity is quoted in megabytes.

One megabyte is eight megabits. :slight_smile:

Oh, you wanted details?

It is traditional when discussing data communications to quote data transfer speeds in bits per second. Multiples of this include kilobits per second (1 kilobit per second = 1000 bits per second) and megabits per second (1 megabit per second = 1000 kilobits per second).

Computer data storage, on the other hand, is traditionally measured in bytes. One byte is eight bits, and is the minimum amount usually needed to store one character, such as a number or letter of the alphabet.

Data storage includes various sorts of computer disks, such as hard drives, floppy disks, and optical discs* like CDs and DVDs.

The capacity of disks is quoted in bytes, kilobytes, megabytes, and also gigabytes (1 gigabyte is 1000 megabytes). Recently the terabyte has appeared on the consumer scene: 1 terabyte is 1000 gigabytes.

Computer memory is also described with bytes, kilobytes, megabytes and gigabytes, but these are often multiples of 1024 rather than 1000. Here, 1 kilobyte = 1024 bytes; 1 megabyte = 1024 kilobytes, 1 gigabyte = 1024 megabytes.

This has to do with the way the memory is constructed and accessed electronically; memory tends to be made available in amounts that are powers of 2. 1024 = 2[sup]10[/sup].

[sub]*That’s not a typo. Optical discs are spelt with a c, and magnetic disks with a k. This is only the beginning of the weirdness.

[/sub]

I was under the impression that 1 gigabyte = 1024 megabyte. About.com seems to agree:

I will say that sometimes manufactures will claim a storage capacity using the 1 GB = 1000 MB conversion in order to make their drives seem larger. If you look at the actual capacity in Windows, you’ll see a smaller number than was claimed, due to the difference in representations.

7,340,032 bits or 917,504 bytes.

There is actually a reason for the difference. For memories the size of the address register must be the log base 2 of the number of words in the memory. Thus, if memory size weren’t a power of 2, you’d be wasting address space. For convenience a kilobyte of memory was always 1024 bytes, back as long as I remember.
Disk addressing uses a totally different system, so there is no need for capacity to be a power of two. I won’t discuss the motives of the manufacturers.
Before too long systems will be shipping with flash memory disks. We’ll see what factor gets used then.

To be a bit pedantic, a byte is not necessarily 8 bits, although that is its common usage. The more precise term is octet, which is what you will see in many international standards documents. A byte has traditionally been the space needed to store one character and the smallest addressable unit of memory. The 8-bit byte is a convention that can be traced back to the IBM 360 and the popularity of 8-bit character sets such as ASCII and EBCDIC. This convention has been weakened by the introduction of newer character sets like Unicode, which can be represented with 16 or more bits.

For the most part, computers that have memory that is not byte addressable, or character sizes other than 8 bits, are to be found mainly in museums. There are some exceptions, but you aren’t likely to see them on some one’s desk being used as a general purpose computer.

Due to the way that digital logic circuits are designed, random-access memory (RAM) is usually designed around powers of 2. A kilobyte of RAM is 210 bytes, a megabyte is 220 bytes, a gigabyte is 2**30 bytes. These look like SI units (metric system), but they aren’t, they’re just a non-standard convention used by the computer industry.

The fundamental unit of data storage is the bit and the standard SI prefixes are powers of 10. Kilo is 103, mega is 106, and giga is 10**9. When dealing with things other than computer memory, like the speed of data lines, it’s best to assume that things are measured in bits and SI prefixes. A 5 megabit/s data line is operating at 5,000,000 bits per second.

Disk drives are a fuzzy area. Although there is no reason to measure their capacity in the non-standard units used for computer RAM, that is a common convention. Disk drives record data as streams of bits. If tomorrow, we decided to use 60-bit characters (bytes), and store 10,000 characters per disk block, it wouldn’t require any fundamental changes to the way disk drives are designed. 8-bit bytes and 512-byte blocks are just a convention. In fact, future disk drives will be moving to larger block sizes in order to improve their efficiency and speed. Block sizes may also be increased to support the addition of an end-to-end error detection code to each block.

Um…

http://www.sonystyle.com/webapp/wcs/stores/servlet/ProductDisplay?catalogId=10551&storeId=10151&langId=-1&productId=8198552921665411974
http://www.toshibadirect.com/td/b2c/cmod.to?coid=-33781

Now, to complicate things a bit (ha!), a byte almost always means 8 bits, but not always. In some cases, you can see references to 7-bit bytes, for instance. However, I think most writers avoid using “byte” in this context, although some do.

And to add more confusion

Converting bits per second to bytes per second transferred is not a simple divide by eight :smack:

Any serial data flow requires some sort of overhead to ensure that both ends remain synchronised, and to prevent data corruption. In the days of RS-232 terminals, these settings would be explicitly specified - 8 data bits, 1 stop bit with parity, for example. The parity bit is a simple 1-bit checksum that detects 1 bit errors. This gives 10 bits used per byte transferred.

Modern protocols (ethernet, ADSL, etc) use more complex (and efficient) protocol schemes to manage the serial data flow, but the upshot is that the bit rate does not map directly to the bytes transferred, and can in fact vary wildly (particularly if some form of compression is used as well, depending on the data). Also, higher level protocols have large-scale structures that can limit transfer rates to a percentage of the theoretical maximum - so an ethernet connection (nominally 10, 100, 1000 or 10 000 megabits per second) can max out at 30%-60% utilisation due to the way collisions and framing are handled.

Si

Some interesting information here on that subject.

There is actually a standard, where kilo (k/K)- means 1000 and kibi (Ki) - means 1024 (for kilo-binary).

Thus memory should be quoted in mibi-bytes (MiB) and gibi-bytes (GiB), and disk manufacturers can get away with using gigabytes (GB) and terabytes (TB) [which are smaller than gibibytes (GiB) and tebi-bytes (TiB)].

From here

Si

Don’t forget, half a byte is a nybble.

You need to stop using whatever reference you used here.

Actually the OLPC laptop comes with a flash disk. But the latest ITRS discussions seem to indicate that the flash price point is going to be better than the mechanical pricepoint real soon, and hard disks will go the way of floppies.

Cite? Are you sure there isn’t one bit of ECC, so there are 7 bits of data in the byte even though there are physically 8 bits? Cybers had 6 bit “bytes”, but they weren’t really bytes.

What reference said they were the same?

Wasn’t the Cyber a word addressed (60-bit) machine? I remember that the original CDC Pascal compilers were designed around a 6-bit character set.

I’ve seen and used old hardware that used 7-bit bytes, back when memory was so expensive that it was worthwhile to use only the minimum number of bits needed to store a (US-ASCII) character.

I only claim that you sometimes, though rarely, see writers using “byte” to refer to groups of other sizes than 8 bits. Now, 7 bits wasn’t the best example but searching for “7-bit byte” brings out several examples. In some cases, the usage is iffy: MIDI doesn’t have 7-bit bytes, it’s 8 bits but there’s one status bit so that leaves you with 7 useable bits for data.

I’ve never heard of 7-bit bytes, but I have heard of 7-bit words. I think a 7-bit “byte” is just a sloppy use of the term “byte”.