Data Measurements

This topic was published by and viewed 980 times since "". The last page revision was "".

Viewing 1 post (of 1 total)
  • Author
    Posts
  • DevynCJohnson
    DevynCJohnson
    Keymaster
    • Topics - 444
    • @devyncjohnson

    In the study of computers, data can be measured. Data is composed of quantitative components. The smallest undividable unit of data is the bit. Computers use and understand binary (zeros and ones). One binary symbol/character ("0" or "1") is a bit. However, other units of data measurement exist.
    Metric prefixes can be used with the bit unit. Examples include decabit (10 bits), kilobit (1000 bits), megabit (1000000 bits), etc. These extended bit measurement units do have uses. For instance, the size of a single IPv6 address is one hectobit (100 bits).
    A crumb is two bits long, and a nibble ("nybble" or "semioctet") is four bits long. One nibble is enough to represent a single hexadecimal digit. A hextet is four nibbles, two bytes, or sixteen bits.
    The size of a word various between differing architectures. A 64-bit AMD system uses words that are 64 bits long. The Amiga Commodore, Sega Genesis, Mattel Intellivision, and others used 16-bit words. "Word size" is also called "instruction length". Words are important since many computers need a fixed data size for certain needs. For instance, memory addresses are restricted to the word length (exceptions apply). That is why many 32-bit systems are limited to four gigabytes of memory. In addition, machine instructions are limited to the word size.
    A quadword ("paragraph" or "qword") is a unit of data consisting of four words. On a 64-bit AMD system, this would be 256 bits. Similarly, a double-word is two words.
    Eight bits is a byte or octet. A byte is the commonly used unit of data measurement. In fact, it is commonly used with SI/metric prefixes (kilo, mega, giga, etc.). A metric kilobyte (KB) is 1000 bytes (or 8000 bits) long. This definition is recommended by the International Electrotechnical Commission (IEC). However, many software developers use the binary kilobyte (still KB, but sometimes "K") which is 1024 bits long (2^10 bits). This difference is due to computers using binary (base-2) rather than decimal (base-10). The binary kilobyte and larger binary forms of metric measurements were needed since memory and other low-level tasks used binary. The binary data units are also called JEDEC bytes.
    FUN FACT: Most operating system utilities report data-usage using binary bytes rather than the metric counterparts. So, if two programs indicate a differing file size, then this may be the case.
    In 1998, the International Electrotechnical Commission (IEC) and others created "binary prefixes" in hopes of reforming the JEDEC system to stop and prevent name conflicts/confusion. The binary prefixes are just like metric prefixes. However, binary prefixes use a power of two (2^10) rather than a power of ten (10^10). Therefore, one kibibyte (KiB) is 1024 (2^10) bytes or one JEDEC/binary kilobyte.
    Notice that the kibibyte and the JEDEC/binary kilobyte are the same. However, all three systems are currently used. This explains why storage devices (like flash drives) may be advertised as "20GB" (metric/decimal), but the operating system finds less than that amount (IEC/binary). Although, the JEDEC bytes (or binary-based measurement units) are exactly the same (value wise) as the IEC standard. The only difference between the JEDEC and IEC standards are the prefixes and abbreviations. That provides a programmer a fast and easy way to migrate from JEDEC to IEC. To do so, replace "kilo" with "kibi" and other metric prefixes with their binary counterpart, then replace the abbreviations such as "KB" with "KiB".
    FUN FACT: The IEEE/ASTM SI 10-1997 deprecates the JEDEC system, but some developers still use the JEDEC system.

    Binary (IEC) and Decimal (metric) Equivalents

    Data Measurements (Free PDF Cheatsheet Chart)http://dcjtech.info/wp-content/uploads/2015/06/Data-Measurements-IEC-and-Metric.pdf
    To convert metric/decimal kilobytes to JEDEC/binary kilobytes or kibibytes, divide metric kilobytes by 1.024. The same principle applies when converting metric/decimal kilobits to JEDEC/binary kilobits or kibibits.
    To convert kilobits to decimal/metric kilobytes, divide kilobits by eight (same for Mbits to MB and so on). Alternatively, to convert kilobytes to kilobits, multiply by eight (same for MB to Mbits and so on).
    The easiest and fastest way (without having additional equations for each particular conversion) to convert to and from megabits, gigabytes, mebibytes, etc. is to convert the original unit to bits and then convert to the desired/final unit. The first two conversions are to convert from bytes to bits (if not already bits) and convert the metric or IEC prefix to the base (i.e. kibibits would become bits). Next, convert to the needed prefix (metric or IEC). Then, convert to bytes (if needed) by dividing by 8.
    For illustration, to convert metric gigabits to mebibytes, perform the following

    1. convert gigabits to bits - Gbits * 10^9 (the value of Giga)
    2. convert bits to mebibits (to get the mebi prefix) - bits / 1048576 (the value of mebi)
    3. convert mebibits to mebibytes - mebibits / 8 (eight bits per byte)

    Obviously, when going from some form of bytes to another, converting to bits is not necessary since bits and bytes (collection of eight bits) are the same in metric (decimal), IEC (binary), and JEDEC (binary).
    FUN FACT: A Compact Disc-Recordable (CD-R) can hold about 700 mebibytes (700MiB) of data. The "700MB" text on the disc label is in JEDEC megabytes. The DVDs (such as the DVD-R and DVD+R) have the metric value on the label. Therefore, DVD-R really does store about 4.7GB (4.38GiB).

    Examples and Comparisons of the Kibi/Kilo Byte/Bit

    • 1 binary/JEDEC kilobyte = 1 kibibyte = 1024 (2^10) bytes = 1.024 metric/decimal kilobytes = 8192 bits = 8 kibibits = 8.192 kilobits
    • 1024 bits = 1.024 kbit = 1 Kibit
    • 1024 bytes = 1.024 KB = 1 KiB
    • 128 kbit/s = 128000 bits = 16 KB/s = 15.6KiB/s
    • 1 metric_KB / 1.024 = 0.9766 KiB
    • 1.024 metric_KB / 1.024 = 1 KiB
    • 1 kbit / 8 = 0.125 metric_KB
    • 1 metric_KB * 8 = 8 kbit
    • 1 KiB > 1 KB

    FUN FACT: Windows 7 represents a 65536-byte file as 64KB (dividing by 1024 and displaying JEDEC kilobytes) while Snow Leopard (OSX v10.6) rounds to the nearest 1000 bytes and then uses metric (converting 66000 bytes to 66 metric kilobytes) to display 66KB. In addition, Ubuntu v15.04 (Vivid Vervet) using Nautilus would report the file size as 66KB. That may explain file size differences between operating systems when comparing the same file. However, various Linux programs and utilities may use a different scheme.


    Other types of data measurement exist, but they are rarely used or are difficult to understand. For instance, the "nat" (also called "nit" or "nepit") is about the size of 1.4 bits (specifically, the value is "log2 e"). Other odd data measurements include the trit (single trinary digit), tryte (6 trits), qubit (quantum bit), qutrit (quantum trit), etc.

    Abbreviation Reference

    • KB - kilobyte (either JEDEC/binary or metric/decimal)
    • Kb - kilobit (either JEDEC/binary or metric/decimal)
    • kbit - kilobit (either JEDEC/binary or metric/decimal)
    • KiB - kibibyte (IEC/binary)
    • Kib - kibibit (IEC/binary)
    • Kibit - kibibit (IEC/binary)
    • Kbps - kilobits per second (either JEDEC/binary or metric/decimal)
    • KBps - kilobytes per second (either JEDEC/binary or metric/decimal)
    • Kibps - kibibits per second (IEC/binary)
    • KiBps - kibibytes per second (IEC/binary)
Viewing 1 post (of 1 total)