# Oh, Those Terrible Units

Published at: 2010-05-06
Categories:
Tags:

﻿There are some numbers and units. Numbers are numbers. Units are units. Numbers informs how many. Units inform about two things:

• how many
• of what

## The SI Base Units

Name Unit Symbol Quantity
metre m length
kilogram kg mass
second s time
ampere A electric current
kelvin K thermodynamic temperature
candela cd luminous intensity
mole mol amount of substance

## IT Base Units

Name Unit Symbol Quantity
bit b number of bits
byte B number of bytes
bits per second bps number of bits per second

Have you seen the difference? BYTES and BITS?

## The Word Of Truth

• 1 BYTE = 8 BITS
• 1 B = 8 b
• bit represents logical value (True or False), (0 or 1)
• there is nothing smaller than 1b
• you cannot have half of a bit - what is the half of False?

## SI Prefixes

name sumbol factor
kilo k 10^3
mega M 10^6
giga G 10^9
tera T 10^12
peta P 10^15
exa E 10^16

These symbols are used for avoiding too many zeros. So instead of `1000m` you can write `1km` and instead of `1000000B` you can write `1GB`. This is another problem. Normally `1 kilobyte` = `1024 bytes`. Yea, the IT world is wierd. For distinguishing between `10^3 = 1000` and `2^10 = 1024` someone created some binary system:

name sumbol factor
kibi Ki 1024^1
mebi Mi 1024^2
gibi Gi 1024^3
tebi Ti 1024^4
pebi Pi 1024^5
exbi Ei 1024^6

Now we’ve got 1024B = 1KiB and so on.

## The Problem

Why am I writing all that? Because I don’t understand why many people in the IT world, including many programmers, still don’t know that this is important to write according to some standards. This is like a language: you have to use the correct grammar so others have the chance to understand correctly what you say.

## Some Examples From Web

• `1KB` – this means `1 Kelvin Byte` – I have no idea what it means. Author could think about: `1kB = 1000B` or `1KiB = 1024B`.
• `1mb` – funny… `1 milibit`, this is `0.001 of bit`. Bit is a logical value, basically it means `True` or `False`, `0` or `1`. How can you have `0.001 of True or False`? Maybe someone wants to write `1MB = 1,000,000B`?
• `1mB` – another funny, not found so often. This means ```1 milibyte = 0.001B```. But `1 byte` is `8 bits`. So this is `0.008 of True or False`.
• `1gb` – sorry, I have no idea what the `g` is.
• `1gB` – the same as above.
• `1kb` – often author wants to write `1kB` because `1kb = 125B` – quite unusual number of bytes.
The comments are disabled. If you want to write something to me, you can use e.g. Twitter.