Bits & bytes
You have probably been directed here because you sent me an email with data volumes quoted in GB/MB/B or Gb/Mb/b inconsistently. Don’t worry, it happens all the time; so often in fact that I wrote this blog post to explain why the difference is important.
Network people measure traffic (or bandwidth) in terms of bits per second. A bit is a single 1 or 0 (binary digit) and your home broadband speed is almost certainly quoted in Mbps which is megabits per second. If you have a really good broadband connection then it might be measured in Gbps which is gigabits per second. You might see these on commercial advertising as ‘meg’ and ‘gig’ or Mb and Gb or you might see them quoted as Mb/s and Gb/s. It’s worth noting that 1Gbps is 1000Mbps, 1 Mbps is 1000Kbps (Kilobits per second) and 1 Kbps is 1000bps (bits per second).
Data on disk is measured in Bytes though, and that’s where things get a bit different. A byte is a hangover from the days of 8 bit computing so is made up of 8 bits. To further complicate things a kilobyte is used synonymously with a kibibyte so 1KB is 1024B. Again mebibyte are used synonymously with megabytes so 1MB is 1024KB or 1,048,576B. When used strictly accurately a kilobyte is 1000 bytes and a megabyte is 1000 kilobytes or 1,000,000 bytes; but nobody actually uses it this way.
File transfer applications often measure file transfers in B/s which is bytes per second. This is why your browser might show close to 10MB/s download speed when using your 80Mbps (or 80Mb/s) broadband. This isn’t the broadband company messing you around, it’s just different units; it’s unlikely you would get this speed because most file transfer protocols have an ‘overhead’ of other data which uses some of the bandwidth.
Conversely realtime media like VoIP voice streams or streaming video are more likely to be measured and quoted in bps, Kbps or Mbps. In the table below g.711 has a payload of 160 bytes with a sample length of 20ms which results in 50pps (packets per second). 160 bytes is 1280 bits so the voice stream would be 1280bits per packet multiplied by 50 packets per second or 64,000 bits per second . Note that the last column has a bandwidth calculation for Ethernet which includes packet headers and frame headers for Ethernet, this adds the same amount of data per packet regardless of the size of the payload.
|Codec & Bit Rate (Kbps)||Voice Payload Size (Bytes)||Voice Payload Size (ms)||Packets Per Second (PPS)||Bandwidth Ethernet (Kbps)|
|G.711 (64 Kbps)||160 Bytes||20 ms||50||87.2 Kbps|
|G.729 (8 Kbps)||20 Bytes||20 ms||50||31.2 Kbps|
In summary, when working out a data transfer over a network connection make sure to check how the data you are transferring is measured. Pay attention to if the data is measured in bits or bytes and ensure that information is communicated correctly; if using abbreviated units such as MB/s or Mb/s, make sure you are using the correct one. If you don’t then bandwidth may be over, or under, estimated and that can be a costly mistake.