Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
The Binary Number System Emily Beck and Susan Cantrell Purpose Through this instruction you will become familiar with the binary number system, how to make conversions, and how we are using binary today. Objectives • By the end of this presentation the student will be able to: – Define a binary number system – Convert a decimal number to binary – Convert a binary number to decimal How do we count? • When you were young you were taught to count using the decimal number system. • The word decimal means ten. • How many ways can you symbolize the number 10? Decimal System • There are 9 numerals in the decimal system: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 • How many numbers can we make from these numerals? • An infinite amount! How Do We Write Numbers in the Decimal System? • The numerals are in the one’s column. When we run out of numerals for this column, what do we do? • We make a new column to write 10. The 1 is in the ten’s column, and the 0 is in the one’s column. • We then continue with 11, 12, 13,…,17, 18, 19 until we run out of numerals in the one’s column again. • Now we must move to the next numeral in the ten’s column to make the number 20. • This process continues forever! What if you only had two numerals? • The word binary means two. • The binary number system has two symbols: 0 and 1. • With just these two symbols you can also count forever. Binary System • Now let’s imagine that we only have two numerals: 0 and 1 • Our first two numbers are 0, 1 but then we run out of numbers in our one’s column. • Like in the decimal system we need to make a new column, this time a two’s column. • Now we have 10 and 11 but again we run out of numerals in the one’s column. • Our new column is the four’s column. We have 100, 101, 110 and 111. • This process continues forever too! What do these numbers mean to us? Each number in the binary system corresponds to a number in our traditional decimal system. • Decimal numbers 1-15 with their corresponding binary number conversion. Number in Decimal Number in Binary 0 0 1 1 2 10 3 11 4 100 5 101 6 110 7 111 8 1000 9 1001 10 1010 11 101 12 110 13 1101 14 1110 15 1111 Decimal to Binary • In decimal notation, each position to the left of the decimal point indicates an increased power of 10. • In binary, or base 2, each place to the left signifies an increased power of two: 20 is one, 21 is two 22 is four, and so on. Converting a Binary Number into a Decimal Number • Each column in the binary number system has a name: – one’s, two’s four’s, eight’s, thirty-two’s • Notice anything special about these numbers? • That’s right, they represent: – 20, 21, 22, 23, 24, 25 Reading Binary Numbers • In the binary number system, as in the decimal system, the value of a digit is determined by where it stands in relation to the other digits in a number. – In the decimal system, the number 1 by itself is worth 1; putting it to the left of two zeros makes the number worth 100. – This simple rule is the backbone of arithmetic. – Numbers to be added or subtracted are first arranged so that their place columns line up. Integer 41/2 20/2 10/2 5/2 2/2 1/0 Quotient 20 10 5 2 1 0 Remainder 1 0 0 1 0 1 Read up! • When the quotient goes to zero you are done. • Read the numbers in the remainder column starting from the bottom and going up. • Thus 41 is 101001 in the binary system. Converting a Decimal Number into a Binary Number • Convert a decimal number to binary by finding the remainders during successive division by 2 • Example: Convert the decimal number 41 to binary Binary to Decimal • We must multiply each numeral in the binary number by whatever value its column has. • Example: Convert the binary number 1101 to decimal form: 1 x 2 3 + 1 x 2 2 + 0 x 21 + 1 x 2 0 =8+4+0+1 =13 Binary Uses • Binary numbers are used to represent all information in the digital world • A "bit" (short for "binary digit") is the smallest piece of data that a computer knows • By combining groups of bits and manipulating them, a computer can accomplish all the remarkable things for which it has its reputation So Handy • Binary is handy because now we can easily use something physical to represent numbers • 1’s and 0’s tell the computer “on” or “off” in coding data • For instance we could use a laser – When it's on you know it means '1' and when it's off you know it means '0' Questions?