close
    search Buscar

    What is the difference between bits, bytes, megabytes, megabits and gigabits?

    Who I am
    Pau Monfort
    @paumonfort

    Item Feedback:

    content warning

    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 prefix "mega" in megabits (Mb) and megabytes (MB) is often the preferred way to express data transfer rates because it mainly deals with bits and bytes in the thousands.


    For example, your network may be able to download data at 1 million bytes per second, which is more appropriately written as 8 megabits per second or even 8 Mb / s.



    Some measurements return massively valued bits such as 1.073.741.824, which is how many bits are in a single gigabyte (i.e. 1.024 megabytes). Plus, terabytes, petabytes, and exabytes are even bigger than megabytes!

    Read also: Terabytes, Gigabytes and Petabytes: what do they mean?


    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 numbers, bits can have a value of 1 (one) or 0 (zero).

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

    The methods of encoding network messages vary according to the transmission medium:


    • Ethernet connections carry bits using electrical signals of different voltages.
    • Wi-Fi carries bits using radio signals of different frequencies.
    • Fiber connections use pulses of light to carry bits.

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



    Examples of bits and bytes in the computer network

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

    IP addresses in the Internet Protocol version 4 (IPv4) network 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 this:


    11000000 10101000 00000000 00000001

    The rate at which data travels across a network connection is traditionally measured in units of bits per second (bps). Modern networks are capable of transmitting millions or billions of bits per second, called megabits per second (Mbps) and gigabits per second (Gbps), respectively.

    • Gigabit Ethernet connections are rated for 1 Gbps.
    • Wireless broadband routers offer different connection speeds depending on the form of Wi-Fi used. Common speeds supported by routers include 54 Mbps, 150 Mbps, and 600 Mbps.

    So, if you are downloading a 10MB (80MB) file over a network capable of downloading data at 54Mbps (6,75MB), you can use the conversion information below to find that the file can be downloaded in a little more. of a second (80/54 = 1,48 or 10 / 6,75 = 1,48).

    You can see how fast your network can download and upload data with an internet speed test site.

    Conversely, computer storage devices such as USB sticks and hard drives transfer data in units of bytes per second (Bps). It is easy to confuse the two but the bytes per second are Bps, with a capital "B" while the bits per second use a lowercase "b".



    Wireless security keys such as those for WPA2, WPA and old WEP are sequences of letters and numbers usually written in hexadecimal notation. The hexadecimal numbering represents each group of four bits as a value, a number between zero and nine, or a letter between "A" and "F."


    WPA keys look like this:

    12345678 9ABCDEF1 23456789 AB

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

    0: 0: 0: 0: 0: FFFF: C0A8: 0101

    How to convert bits and bytes

    It's really easy to manually convert bit and byte values ​​when you know the following:

    • 8 bit = 1 byte
    • 1.024 bytes = 1 kilobyte
    • 1.024 kilobytes = 1 megabyte
    • 1.024 megabytes = 1 gigabyte
    • 1.024 gigabytes = 1 terabyte

    For example, to convert 5 kilobytes to bits, 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).

    A much easier way to get these conversions is to use a calculator such as a bit calculator. You can also estimate the values ​​by entering the question in Google.


    Further Reading:

    • Megabit vs megabyte: what's the difference?
    • How to check the speed of the Internet connection on PC and mobile devices
    • Terabytes, Gigabytes and Petabytes: what do they mean?
    • OLED TV: what you need to know
    • Honor 8X vs Huawei P20 Lite, which one should I buy?
    add a comment from What is the difference between bits, bytes, megabytes, megabits and gigabits?
    Comment sent successfully! We will review it in the next few hours.