|
The
binary
number system
is a positionally-weighted numerical system whose base is 2.
The binary or base-2 system employs only two digits to represent
numbers - 0 and 1. A binary digit is more commonly known as a 'bit.'
The
decimal system equivalent of any binary number may be obtained by
polynomial expansion, which is done by multiplying each bit by its
corresponding weight in the binary system. The weight of a bit
in a binary number is equal to 2 raised to the n-1, where n is its
position in the number (from right to left), i.e.,
weight = 2n-1.
Thus, the
24th bit from the right of a binary number has a weight equal to 2
raised to the 23rd power or 8388608.
Table 1
shows the equivalent weight of each bit position of a 20-digit
binary number.
Table
1. Weights of the Digits of a 20-bit Binary Number
|
Position (from right to left) |
Weight |
Position (from right to left) |
Weight |
|
first
|
1 |
11th
|
1024 |
|
2nd
|
2 |
12th
|
2048 |
|
3rd
|
4 |
13th
|
4096 |
|
4th
|
8 |
14th
|
8192 |
|
5th
|
16 |
15th
|
16384 |
|
6th
|
32 |
16th
|
32768 |
|
7th
|
64 |
17th
|
65536 |
|
8th
|
128 |
18th
|
131072 |
|
9th
|
256 |
19th
|
262144 |
|
10th
|
512 |
20th
|
524288 |
As an
example, the binary number 10110001 is equal to 1x1 + 0x2 + 0x4 +
0x8 + 1x16 + 1x32 + 0x64 + 1x128 = 177 in the decimal system.
Table
2. Binary Addition and Multiplication
|
Binary Addition
|
Binary Multiplication
|
|
0 + 0
= 0 |
0 x 0
= 0 |
|
0 + 1
= 1 |
0 x 1
= 0 |
|
1 + 0
= 1 |
1 x 0
= 0 |
|
1 + 1
= 10 (zero, with '1' carried to the next bit) |
1 x 1
= 1 |
See Also:
Hexadecimal System;
Math Used
in ECE
|