What's the Difference Between Bits and Bytes? (original) (raw)

The terms bits and bytes in computer networking refer to standard units of digital data transmitted over network connections. There are 8 bits for every 1 byte.

The "mega" prefix in megabit (Mb) and megabyte (MB) are often the preferred way to express data transfer rates because it's dealing mostly with bits and bytes in the thousands. For example, your home network might be able to download data at 1 million bytes every second, which is more appropriately written as 8 megabits per second, or even 8 Mb/s.

Lifewire / Derek Abella

Some measurements yield bits to massive values like 1,073,741,824, which is how many bits are in a single gigabyte (1,024 megabytes).

How Bits and Bytes Are Created

Computers use bits (short for binary digits) to represent information in digital form. A computer bit is a binary value. When represented as a number, bits have a value of either 1 or 0.

Modern computers generate bits from higher and lower electric voltages running through the device's circuits. Computer network adapters convert these voltages into the ones and zeros needed to transmit bits across the network link physically; a process sometimes called encoding.

Methods of network message encoding vary depending on the transmission medium:

A byte is simply a fixed-length sequence of bits. Modern computers organize data into bytes to increase the data processing efficiency of network equipment, disks, and memory.

Examples of Bits and Bytes in Computer Networking

Even casual users of computer networks encounter bits and bytes in normal situations. Consider these examples.

IP addresses in Internet Protocol version 4 (IPv4) networking consist of 32 bits (4 bytes). The address 192.168.0.1, for example, has values 192, 168, 0, and 1 for each of its bytes. The bits and bytes of that address are encoded like so:

The rate at which data travels through a computer network connection is usually measured in units of bits per second (bps). Modern networks can transmit millions or billions of bits per second, called megabits per second (Mbps) and gigabits per second (Gbps), respectively.

So, if you're downloading a 10 MB (80 Mb) file on a network that can download data at 54 Mbps (6.75 MBs), you can use the conversion information below to find that the file can be downloaded in just over a second (80/54=1.48 or 10/6.75=1.48).

In contrast, computer storage devices like USB sticks and hard drives transfer data in units of bytes per second (Bps). It's easy to confuse the two, but bytes per second is Bps, with a capital B, while bits per second uses a lowercase b.

Wireless security keys like those for WPA2, WPA, and the old WEP are sequences of letters and numbers usually written in hexadecimal notation. Hexadecimal numbering represents each group of four bits as one value, either a number between 0 and 9 or a letter between A and F.

WPA keys look like this:

IPv6 network addresses also use hexadecimal numbering. Each IPv6 address contains 128 bits (16 bytes), like:

How to Convert Bits and Bytes

It's straightforward to convert bit and byte values when you know the following:

As an example, to convert 5 kilobytes into bits, you'd use the second conversion to get 5,120 bytes (1,024 X 5) and then the first to get 40,960 bits (5,120 X 8).

An easier way to get these conversions is to use a calculator like a Bit Calculator. You can also estimate the values by entering the question into Google.

Thanks for letting us know!

Get the Latest Tech News Delivered Every Day

Subscribe