I'm reading a book called "The Elements of Computing Systems" by Noam Nisan/Shimon Schoken.
There's an excerpt which includes some math that I'm struggling to understand (limited math background; I was hoping someone might be able to "hold my hand" through it.
My main questions:
What exactly does this mean? $
(\mathit{x_{n},x_{n-1}}…x_{0})_{b}= \sum_{\mathit{i=0}}^{n}x_i\cdot b^{i}
$
It says (full excerpt for context):
"Unlike the decimal system, which is founded on base 10, the binary system is founded on base 2. When we are given a certain binary pattern, say "10011," and we are told that this pattern is supposed to represent an integer number, the equivalent decimal value of this number is computed by convention as follows:
$$
(10011)\mathit{_2}=1\cdot2^4+0\cdot2^3+0\cdot2^2+1\cdot2^1+1\cdot2^0=19
$$
In general, let $\mathit{x=x_{n}x_{n-1}}…\mathit{x_{0}}$ be a string of digits. The value of x in base b, denoted $(\mathit{x})_{b}$, is defined as follows:
$$
(\mathit{x_{n},x_{n-1}}…x_{0})_{b}= \sum_{\mathit{i=0}}^{n}x_i\cdot b^{i}
$$The reader can verify that in the case of (10011)$_{two}$, rule (2) reduces to calculation (1).
The result of calculation (1) happens to be 19. Thus, when we press the keyboard keys labeled '1', '9' and 'ENTER' while running, say, a spreadsheet program, what ends up in some register in the computer's memory is the binary code 10011. More precisely, if the computer happens to be a 32-bit machine, what gets stored in the register is the bit pattern (00000000000000000000000000010011).
Best Answer
Base Conversion $$ (x_n\dots x_1 x_0)_b=\sum_{i=0}^n x_i\cdot b^i $$ This is how we can convert a number from base $b$ to base $10$. Each $x$ represents a digit at position $i$ in base $b$.
So for binary numbers, we have $b=2$ because there are only $2$ unique digits in the binary numeral system. So we have $$ (x_n\dots x_1 x_0)_2=\sum_{i=0}^n x_i\cdot 2^i $$ Summation
The symbol $\sum$, denotes a summation. If we want to add the integers $1$ through $5$, we would write $$ \sum_{k=1}^5 k=1+2+3+4+5=15 $$ Binary to Decimal Conversion
Let's try to convert $(1011)_2$ to its base $10$ equivalent $$ x_3=1,\quad x_2=0,\quad x_1=1,\quad x_0=1 $$ And $$ \sum_{i=0}^3 x_i\cdot 2^i =1\cdot 2^3+ 0\cdot 2^2+ 1\cdot 2^1+ 1\cdot 2^0 $$ $$ = 2^3+ 2^1+ 2^0 =8+2+1=11 $$