PDA

View Full Version : Grabbing a byte for a bit


Mediaman
08-19-2008, 08:31 AM
I'm sure this has been discussed a 1000 times (no pun intended), but is my cheat sheet below correct? My poor brain was raised on bytes, actually megabytes (MB), as in hard drives, RAM, digital memory etc. The networking world seems to be in bits - gigabit cards, 10/100 fast ethernet, 54/108/300 Mbps wireless etc. I know its 8 bits to a byte and I know a kilobyte is 1024 bits (not 1000 bits) so I think I have this correct:


Wireless:
54 Mbps = 54 x .119 = 6.43 MB per second
108 Mbps = 108 x .119 = 12.85 MB per second
300 Mbps = 300 x .119 = 35.7 MB per second

A Fast Ethernet card:
100 Mbps = 100 x .119 = 11.9 MB per second

A Gigabit card:
1000 Mbps = 1000 x .119 = 119 MB per second


.119 is simply 1 / (8*1.024*1.024)


Ref: http://www.wu.ece.ufl.edu/links/dataRate/DataMeasurementChart.html



Eg

Gigabits per second:
=1 Gbps 1,000,000,000 Bits/sec
=125,000,000 Bytes/sec (above divided by 8)
=122,070 Kilobytes/sec (above divided 1024)
=119MB/sec (above divided 1024)


Megabits per second
=1 Mbps 1,000,000 Bits/sec
=125,000 Bytes/sec (above divided by 8)
=122.070 Kilobytes/sec (above divided 1024)
=.119MB/sec (above divided 1024)

scotty
08-19-2008, 10:27 AM
I, er, just multiply or divide by 8.

But this was, and I imagine is still a big problem for companies. I had to calm my neighbor down the other day because he wasn't getting the advertized '5Mbit/s' downloads speeds from his ISP. He was expecting 5MB/s. Sigh.

thiggins
08-19-2008, 10:56 AM
I just divide by 8, too.

Mediaman
08-19-2008, 04:28 PM
Divide by 10, add 20% ... easier still and more accurate... who can divide by 8 these days!!! ... But my main reason for asking was just to confirm the order of magnitude....

jdabbs
08-19-2008, 05:52 PM
.119 is simply 1 / (8*1.024*1.024)


Ref: http://www.wu.ece.ufl.edu/links/dataRate/DataMeasurementChart.html



Eg

Gigabits per second:
=1 Gbps 1,000,000,000 Bits/sec
=125,000,000 Bytes/sec (above divided by 8)
=122,070 Kilobytes/sec (above divided 1024)
=119MB/sec (above divided 1024)


Megabits per second
=1 Mbps 1,000,000 Bits/sec
=125,000 Bytes/sec (above divided by 8)
=122.070 Kilobytes/sec (above divided 1024)
=.119MB/sec (above divided 1024)

I follow what you're doing; the .119 conversion factor comes from converting decimal megabits to binary megabytes. However, it hasn't been demonstrated that 1 Mbps of bandwidth is a decimal measurement. If 1Mb = 1024x1024b, the conversion would be 1/8, or .125, not .119. But which is it, decimal, or binary? Gigabit Ethernet can be argued in favor of decimal, as it also goes by 1000BaseWhatever. But for older variants, I'm inclined towards binary. The decimal MB/GB misrepresentation came to the forefront with consumer hard drives, I don't think it's made much headroom elsewhere.

Madwand
08-22-2008, 02:01 AM
Eg
Gigabits per second:
=1 Gbps 1,000,000,000 Bits/sec
=125,000,000 Bytes/sec (above divided by 8)
=122,070 Kilobytes/sec (above divided 1024)
=119MB/sec (above divided 1024)


I thought only iperf propagated confusion like that -- using "G" and "M" to mean two different things according to whether bits or bytes were being counted. It's confusing, and deprecated. GiB is the geeky way to denote binary, and has been for a while. M and G are more naturally decimal, as is taught in school and in SI, and the base-2 stuff belongs in CS textbooks, not on capacity screens shown to every user.

http://en.wikipedia.org/wiki/Gigabyte

Dennis Wood
08-25-2008, 11:47 AM
Technically you're right...sort of. http://physics.nist.gov/cuu/Units/binary.html

Gb and Mb are indeed decimal conventions and we should be perhaps referring to Medibytes and Gibibytes. That said, I do just use the 8 bits/byte and divide all of my measurements (following the windows convention) by 1024 to get the decimal equivalent, using MB and GB as these are what folks are most familiar with. Convention though is not correct in light of the 1998 convention. Coming from Canada (SI standard) the kilo, mega, giga thing has always been a bit confusing as these refer to powers of 10, not powers of 2 as in the standard posted above.

To be correct, we should be using Mib and Gib as Steve is here: http://www.alternativerecursion.info/?p=31