COMPUTER FUNDAMENTALS
SUMBITTED BY: ARIOLA, ARIANE BIBIANE C.
In mathematics and digital electronics, a binary number is a number expressed in
the binary numeral system, or base-2 numeral system, which represents numeric
values using two different symbols: typically 0 and 1. More specifically, the usual
base-2 system is a positional notation with a radix of 2. Because of its straightforward
implementation in digital electronic circuitry using logic gates, the binary system is used
internally by almost all modern computers and computer-based devices such as mobile
phones. Each digit is referred to as a bit.
As you know, the decimal system uses the digits 0-9 to represent numbers. If we wanted to put a
larger number in column 10^n (e.g., 10), we would have to multiply 10*10^n, which would give
10^(n+1), and be carried a column to the left. For example, putting ten in the 10^0 column is
impossible, so we put a 1 in the 10^1 column, and a 0 in the 10^0 column, thus using two columns.
Twelve would be 12*10^0, or 10^0(10+2), or 10^1+2*10^0, which also uses an additional column to
the left (12).
The binary system works under the exact same principles as the decimal system, only it operates in
base 2 rather than base 10. In other words, instead of columns being
10^2|10^1|10^0
they are
2^2|2^1|2^0
Instead of using the digits 0-9, we only use 0-1 (again, if we used anything larger it would be like
multiplying 2*2^n and getting 2^n+1, which would not fit in the 2^n column. Therefore, it would shift
you one column to the left. For example, "3" in binary cannot be put into one column. The first
column we fill is the right-most column, which is 2^0, or 1. Since 3>1, we need to use an extra
column to the left, and indicate it as "11" in binary (1*2^1) + (1*2^0).
Representation
Binary numbers and arithmetic let you represent any amount you want using just
two digits: 0 and 1. Here are some examples:
Decimal 1 is binary 0001
Decimal 3 is binary 0011
Decimal 6 is binary 0110
Decimal 9 is binary 1001
Each digit "1" in a binary number represents a power of two, and each "0"
represents zero:
0001 is 2 to the zero power, or 1
0010 is 2 to the 1st power, or 2
0100 is 2 to the 2nd power, or 4
1000 is 2 to the 3rd power, or 8.
When you see a number like "0101" you can figure out what it means by adding
the powers of 2:
0101 = 0 + 4 + 0 + 1 = 5
1010 = 8 + 0 + 2 + 0 = 10
0111 = 0 + 4 + 2 + 1 = 7
Addition
Adding two binary numbers together is like adding decimal numbers, except 1 +
1 = 10 (in binary, that is), so you have to carry the one to the next column:
0001
+ 0100
0101 (no carries to get this)
0001
+ 0001
0010 (1 plus 1 is 10, carry the 1 to the next column)
0011
+ 0011
0110 (1 + 1 = 10, so carry; then 1 + 1 + 1 = 11, so carry again)
0011
+ 0101
1000 (carry in every column here)
Larger Numbers
Here are the numbers from 0 to 15, in binary:
0000 = 0
0001 = 1
0010 = 2
0011 = 3
0100 = 4
0101 = 5
0110 = 6
0111 = 7
1000 = 8
1001 = 9
1010 = 10
1011 = 11
1100 = 12
1101 = 13
1110 = 14
1111 = 15
How do we Count using Binary?
Binary
0
We start at 0
Then 1
???
But then there is no symbol for 2 ..
Well how do we count
in Decimal?
Decimal
0
...
9
Start at 0
Count 1,2,3,4,5,6,7,8, and then...
This is the last digit in Decimal
10
So we start back at 0 again, but add 1 on the left
The same thing is done in binary ...
Binary
0
Start at 0
Then 1
10
Now start back at 0 again, but add 1 on the left
11
1 more
???
But NOW what ... ?
What happens in Decimal ... ?
Decimal
99
When we run out of digits, we ...
100
... start back at 0 again, but add 1 on the left
And that is what we do in binary ...
Binary
0
Start at 0
Then 1
10
Start back at 0 again, but add 1 on the left
11
1 00
101
110
111
1 000
Start back at 0 again (for all 3 digits),
add 1 on the left
1001
And so on!
start back at 0 again, and add one to the number on the left...
... but that number is already at 1 so it also goes back to 0 ...
... and 1 is added to the next position on the left