Units concept

Ryan$

Full Member
Joined
Jan 25, 2019
Messages
353
Hi guys; I'm really so sorry for posting this but I don't think that I'm so stupid that I don't know what unit is; but I fear that I miss the concept/definition of unit.

I've already discuss with the subject "units" but right now I've read about GB KB 1B 1b in computer science and there's a ultimate unit called bit; so what I don't understand that if I have 10K it's the same 10*(2^20) bit ; but once again is bit a number ?! I mean bit is considered as an offset(like initialization of a specific place that's defined as bit) that can't be substitute more?!
 
When a number is written in "binary" everything is a power of two. The binary number 101101 means \(\displaystyle 1\times 2^5+ 0\times 2^4+ 1\times 2^3+ 1 \times 2^2+ 0\times 2^1+ 1\times 2^0= 1\times 32+ 0\times 16+ 1\times 8+ 1\times 4+ 0\times 2+ 1\times 1= 32+ 8+ 4+ 1= 45 base 10.

Each of the "bits", one binary unit, is either "0" or "1". It is easier for a computer to store numbers in "binary" because we can each "bit" can be stored as a switch "on" for 1 or "off" for 0. We could store numbers in base 10 but then we would need to distinguish between 10 different levels of current in a switch- and that leads to difficulties distinguishing between slightly different levels.

As I said, a single "bit" is either 0 or 1. Because it is easier for a computer to work in "binary" it is also easier to have registers with a power or two number of bits. 8 bits is called a "byte" and can store \(\displaystyle 2^9= 256\) distinct numbers. Most registers in modern computers are either a "byte" or a "word"- two bytes so 16 bit which can store \(\displaystyle 2^{16}= 65536\) distinct numbers.

While for "normal people", "K" represents 1000 (kilo as in kilogram, 1000 grams, or kilometer, 1000 meters) for computer folk, who just love to work with powers of 2, "K" is \(\displaystyle 2^{10}= 1024\) (the power of 2 closest to 1000). "Giga" is the prefix for \(\displaystyle 10^9\) which is 1 million "K". \(\displaystyle 2^{30}= 1073741824\) is the power of 2 closest to that.\)
 
Top