Arch Linux. Not as scary as you think.

Image
Yes I'm a nerd. Yes I use Arch Linux. There is a somewhat unfair view that you have to be a programmer to use Linux, and that Arch Linux in particular is very difficult. Yes I happen to be a programmer, and it might be true that Linux may be particularly useful for programmers considering most distros come with a lot of editors and compilers and such. But it really is a really stable and powerful OS for anyone (that's not computer illiterate). If you want to just use your computer without having to thinking about it, you will probably use whatever Windows version your computer came shipped with, and not bother to install anything else. However if you actually want to Learn how to use Linux, Arch is a good choice, because it assumes you know how to use the command line during the install process. In other words the process of installing it forces you learn som basics of Linux (if you don't already know). Still it is not very difficult. You don't have to compile

Binary Numeral System

"There are 10 types of people, those who understand binary numbers, and those who does not."

Just as the most commonly used decimal number system is based on the number 10, the binary number system is based on the number 2.
As the decimal numbers are represented by the 10 numbers 0-9, the binary numbers are represented by the numbers 0-1.
Just as the decimal system, the binary system is also a positional system where the number to the right is the least significant.
Compare the decimal number 1035
1*10+ 0*10+ 3*10<+ 5*100 = 1000 + 0 + 30 + 5
To the binary number 101101
1*25 + 0*24 + 1*23 + 1*22 + 0*21 + 1*20 = 1*32 + 0*16 + 1*8 + 1*4 + 0*2 + 1 = 44 (in decimal)

In other words the value of each position in binary is doubled;

Binary Decimal
1
1
10
2
100
4
1000
8
10000
16
100000
32
1000000
64
10000000
128

Try to figure out the decimal values of the following binary numbers on your own:

101

111

10111

101010

1100001001

You might now that computers use binary.
In the old days this essentially meant whether or not a current passed through a relay 1 = on, 0 = off.
Later punched cards where used to make automatic programs for computers. A grossly simplified explanation is that the sequence of holes in the cards represented binaries, then interpreted by the computer.

A computer program on a deck of punched cards
Even in modern computers the computers only use binary information. When you write a program in a programming language, the code is converted to machine code consisting of binary, so that the computers understands what to do.

There are different encodings used by computers, one is ASCII (American Standard Code for Information Interchange), that makes numbers represent different characters. ASCII is as the name implies an american standard, and is thus rather limited in that it does not include a lot of international scripts, such as Chinese characters or ü, ö, etc.

In ASCII the letter a is represented by the number 97, or in binary: 01100001
Notice that there's an extra 0, of course you could write the number 97 in binary as 1100001, but computers organize bits (a single 1 or 0) in sequences of 8 called a byte (this is not entirely true as a byte technically doesn't have to be 8 bits, but in modern computing it almost exclusively is. The sequence of 8 bits are actually called an octet).
Oddly enough 1 KB (Kilobyte) is not 1000 byte as one would think, but 1024 bytes. 1 MB is 1024 KB, 1 GB is 1024 MB.
So when speaking about file-sizes it is actually a description of how many 1s and 0s it contains.
For instance a file that is 735 KB consists of 6021120 bits (1s and 0s).
A game might be 10 GB, or consist of 85899345920 1s and 0s.

Comments

Popular posts from this blog

Carolus Rex

BASIC