Really 1 KB (KiloByte) equals 1024 bytes?

前端 未结 4 976
花落未央
花落未央 2020-12-13 03:24

Until now I believed that 1024 bytes equals 1 KB (kilobyte) but I was reading on the internet about decimal and binary system.

4条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-13 04:28

    There are two ways to represent big numbers: You could either display them in multiples of 1000 (base 10) or 1024 (base 2). If you divide by 1000, you probably use the SI prefix names, if you divide by 1024, you probably use the IEC prefix names. The problem starts with dividing by 1024. Many applications use the SI prefix names for it and some use the IEC prefix names. But it is important how it is written:

    Using IEC standard:
    1 KiB = 1,024 bytes (Note: big K)
    1 MiB = 1,024 KiB = 1,048,576 bytes

    Using SI standard:
    1 kB = 1,000 bytes (Note: small k)
    1 MB = 1,000 kB = 1,000,000 bytes

    Source: ubunty units policy: https://wiki.ubuntu.com/UnitsPolicy

提交回复
热议问题