Uploaded by Jenny redsnow

1-二进制

advertisement
Exploring the
the World
World of
"0" and "1"
An Introduction to Binary
Teacher: Tan Li
Learning Objectives
01
02
Understanding Binary
The most common bits of the progression we use in our lives:
Long, long ago, our ancestors had a unique way of counting their hunted prey. They used
their fingers as counting devices. Each beast they encountered represented a finger. But
what happened when they ran out of fingers? They would set aside the counted prey and
tie a knot on a rope to represent the animal. Then, they would continue counting on their
fingers. This clever method laid the foundation for the decimal system we use today.
Understanding Binary
Usually we use decimal to calculate, so what is the system that computers use
to calculate?
Computers, as electronic devices, utilize a multitude of electronic components internally to enable rapid
storage, processing, and transmission of information. Among these components, circuit states of "on"
and "off" or high and low voltages are the easiest to achieve, most stable, and simplest to control. By
representing these states with "0" and "1," computers can perform all operations and functions internally
using binary numbers. Binary operations are straightforward and easily implemented by computers,
making binary coding the preferred method for data transmission and computation within computer
systems.
What is Binary? Let's start by looking at the
structure of the Decimal System.
Structure of the Decimal System:
1.It has ten basic digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9.
2.It follows the "carry-over" rule, where when counting
reaches ten, it carries over to the next place value.
By analogical reasoning, we can deduce the
structure of the binary system.
Structure of Binary:
1.It has two basic digits: 0, 1.
2.It follows the "carry-over" rule, where when counting
reaches two, it carries over to the next place value.
Converting between Binary and Decimal
Comparison table of binary and decimal numbers:
Binary
1
Decimal 1
2
3
4
5
6
7
8
9
10
10
11
100
101
110
111
1000 1001 1010
Converting between Binary and Decimal
Counting Units of Decimal Integers:
……(10,000) (1,000) (100)
Counting Units of Binary Integers:
……(16)
(8)
(4)
(2)
(1)
(10)
(1)
Converting between Binary and Decimal
1.Write down the binary number.
2.Assign a weight to each digit of the binary number, starting from the rightmost digit. The rightmost digit
has a weight of 2^0, the next digit has a weight of 2^1, the next digit has a weight of 2^2, and so on.
3.Multiply each digit of the binary number by its corresponding weight.
4.Sum up the results of the multiplication to get the decimal equivalent.
(1011)2=(?)10
The symbol "^" means "to
the power of" and shows
how many times a number
is multiplied by itself. For
example, 2^3 means 2
multiplied by itself three
times: 2 x 2 x 2 = 8.
1 * 2^3 = 8
0 * 2^2 = 0
1 * 2^1 = 2
1 * 2^0 = 1
Adding up the results: 8 + 0 + 2 + 1 = 11
(1011)2=(11)10
Converting between Binary and Decimal
1.Start with the decimal number you want to convert.
2.Divide the decimal number by 2 and write down the remainder (either 0 or 1).
3.Divide the quotient from the previous step by 2, again writing down the remainder.
4.Repeat this process of division and writing down remainders until the quotient becomes 0.
5.Write the remainders in reverse order, from the last remainder obtained to the first remainder.
6.The resulting sequence of remainders is the binary representation of the decimal number.
(13)10=(?)2
13 ÷ 2 = 6 remainder 1
6 ÷ 2 = 3 remainder 0
3 ÷ 2 = 1 remainder 1
1 ÷ 2 = 0 remainder 1
(13)10=(1101)2
Converting between Binary and Decimal
Convert the following binary to decimal.
(1110)2=(14 )10
(10101)2=(21 )10
(10110)2=(22)10
Converting between Binary and Decimal
Convert the following decimal to binary.
(9)10=( 1001 )2
(15)10=(1111 )2
(26)10=(11010)2
Summar
y
1Learned the characteristics of binary.
Learned the conversion between
2binary and decimal.
Thanks for listening.
Have a nice day!
Teacher: Tan Li
Download