21
The Binary Number The Binary Number System System Emily Beck and Susan Emily Beck and Susan Cantrell Cantrell

The Binary Number System Emily Beck and Susan Cantrell

Embed Size (px)

Citation preview

Page 1: The Binary Number System Emily Beck and Susan Cantrell

The Binary Number The Binary Number SystemSystem

Emily Beck and Susan CantrellEmily Beck and Susan Cantrell

Page 2: The Binary Number System Emily Beck and Susan Cantrell

PurposePurpose

Through this instruction you will Through this instruction you will become familiar with the binary become familiar with the binary number system, how to make number system, how to make conversions, and how we are using conversions, and how we are using binary today.binary today.

Page 3: The Binary Number System Emily Beck and Susan Cantrell

ObjectivesObjectives

• By the end of this presentation the By the end of this presentation the student will be able to:student will be able to:– Define a binary number systemDefine a binary number system– Convert a decimal number to binaryConvert a decimal number to binary– Convert a binary number to decimalConvert a binary number to decimal

Page 4: The Binary Number System Emily Beck and Susan Cantrell

How do we count?How do we count?

• When you were young you were taught to When you were young you were taught to count using the decimal number system.count using the decimal number system.

• The word decimal means ten. The word decimal means ten.

• How many ways can you symbolize the How many ways can you symbolize the number 10?number 10?

Page 5: The Binary Number System Emily Beck and Susan Cantrell

Decimal SystemDecimal System

• There are 9 numerals in the decimal There are 9 numerals in the decimal system: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9system: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9

• How many numbers can we make from How many numbers can we make from these numerals? these numerals?

• An infinite amount!An infinite amount!

Page 6: The Binary Number System Emily Beck and Susan Cantrell

How Do We Write Numbers in the How Do We Write Numbers in the Decimal System?Decimal System?

• The numerals are in the one’s column. When we run The numerals are in the one’s column. When we run out of numerals for this column, what do we do?out of numerals for this column, what do we do?

• We make a new column to write 10. The 1 is in the 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.ten’s column, and the 0 is in the one’s column.

• We then continue with 11, 12, 13,…,17, 18, 19 until we We then continue with 11, 12, 13,…,17, 18, 19 until we run out of numerals in the one’s column again.run out of numerals in the one’s column again.

• Now we must move to the next numeral in the ten’s Now we must move to the next numeral in the ten’s column to make the number 20.column to make the number 20.

• This process continues foreverThis process continues forever!

Page 7: The Binary Number System Emily Beck and Susan Cantrell

What if you only had two What if you only had two numerals?numerals?

• The word The word binarybinary means two. means two.

• The binary number system has two The binary number system has two symbols: 0 and 1. symbols: 0 and 1.

• With just these two symbols you can also With just these two symbols you can also count forevercount forever..

Page 8: The Binary Number System Emily Beck and Susan Cantrell

Binary SystemBinary System

• Now let’s imagine that we only have two numerals: Now let’s imagine that we only have two numerals: 0 and 10 and 1

• Our first two numbers are 0, 1 but then we run out of Our first two numbers are 0, 1 but then we run out of numbers in our one’s column.numbers in our one’s column.

• Like in the decimal system we need to make a new Like in the decimal system we need to make a new column, this time a two’s column. column, this time a two’s column.

• Now we have 10 and 11 but again we run out of Now we have 10 and 11 but again we run out of numerals in the one’s column.numerals in the one’s column.

• Our new column is the four’s column. We have 100, Our new column is the four’s column. We have 100, 101, 110 and 111. 101, 110 and 111.

• This process continues forever too!This process continues forever too!

Page 9: The Binary Number System Emily Beck and Susan Cantrell

What do these What do these numbers mean to numbers mean to

us?us?

Page 10: The Binary Number System Emily Beck and Susan Cantrell

Each number in the binary Each number in the binary system corresponds to a system corresponds to a number in our traditional number in our traditional decimal system.decimal system.

Page 11: The Binary Number System Emily Beck and Susan Cantrell

• Decimal numbers 1-Decimal numbers 1-15 with their 15 with their corresponding corresponding binary number binary number conversion.conversion.

Number in Number in DecimalDecimal

Number in BinaryNumber in Binary

00 00

11 11

22 1010

33 1111

44 100100

55 101101

66 110110

77 111111

88 10001000

99 10011001

1010 10101010

1111 101101

1212 110110

1313 11011101

1414 11101110

1515 11111111

Page 12: The Binary Number System Emily Beck and Susan Cantrell

Decimal to BinaryDecimal to Binary

• In decimal notation, each position to the In decimal notation, each position to the left of the decimal point indicates an left of the decimal point indicates an increased power of 10. increased power of 10. 

• In binary, or In binary, or base 2base 2, each place to the left , each place to the left signifies an increased power of two: 2signifies an increased power of two: 200 is is one, 2one, 211 is two 2 is two 222 is four, and so on is four, and so on..

Page 13: The Binary Number System Emily Beck and Susan Cantrell

Converting a Binary Number into a Converting a Binary Number into a Decimal NumberDecimal Number

• Each column in the binary number system has Each column in the binary number system has a name:a name:– one’s, two’s four’s, eight’s, thirty-two’sone’s, two’s four’s, eight’s, thirty-two’s

• Notice anything special about these numbers?Notice anything special about these numbers?

• That’s right, they represent:That’s right, they represent:– 2200, 2, 211, 2, 222, 2, 233, 2, 244, 2, 255

Page 14: The Binary Number System Emily Beck and Susan Cantrell

Reading Binary NumbersReading Binary Numbers

• In the binary number system, as in the decimal In the binary number system, as in the decimal system, the value of a digit is determined by system, the value of a digit is determined by where it stands in relation to the other digits in where it stands in relation to the other digits in a number.  a number.  – In the decimal system, the number 1 by itself is In the decimal system, the number 1 by itself is

worth 1; putting it to the left of two zeros makes the worth 1; putting it to the left of two zeros makes the number worth 100.  number worth 100. 

– This simple rule is the backbone of arithmetic. This simple rule is the backbone of arithmetic. – Numbers to be added or subtracted are first Numbers to be added or subtracted are first

arranged so that their place columns line uparranged so that their place columns line up..

Page 15: The Binary Number System Emily Beck and Susan Cantrell
Page 16: The Binary Number System Emily Beck and Susan Cantrell

IntegerInteger QuotientQuotient RemainderRemainder

41/241/2 2020 11

20/220/2 1010 00

10/210/2 55 00

5/25/2 22 11

2/22/2 11 00

1/01/0 00 11

Read up!Read up!

• When the quotient goes to zero you are done.When the quotient goes to zero you are done.

• Read the numbers in the remainder column starting Read the numbers in the remainder column starting from the bottom and going up.from the bottom and going up.

• Thus 41 is 101001 in the binary system.Thus 41 is 101001 in the binary system.

Page 17: The Binary Number System Emily Beck and Susan Cantrell

Converting a Decimal Number into a Converting a Decimal Number into a Binary NumberBinary Number

• Convert a decimal number to binary by Convert a decimal number to binary by finding the remainders during successive finding the remainders during successive division by 2division by 2

• Example: Convert the decimal number 41 Example: Convert the decimal number 41 to binaryto binary

Page 18: The Binary Number System Emily Beck and Susan Cantrell

• We must multiply each numeral in the We must multiply each numeral in the binary number by whatever value its binary number by whatever value its column has.column has.

• Example: Convert the binary number Example: Convert the binary number 1101 to decimal form:1101 to decimal form:

1 x 21 x 23 3 + 1 x 2+ 1 x 22 2 + 0 x 2+ 0 x 21 1 + 1 x 2+ 1 x 200 =8+4+0+1=8+4+0+1=13=13

Binary to DecimalBinary to Decimal

Page 19: The Binary Number System Emily Beck and Susan Cantrell

Binary UsesBinary Uses

• Binary numbers are used to represent all Binary numbers are used to represent all information in the digital worldinformation in the digital world

• A "bit" (short for "binary digit") is the smallest A "bit" (short for "binary digit") is the smallest piece of data that a computer knowspiece of data that a computer knows

• By combining groups of bits and manipulating By combining groups of bits and manipulating them, a computer can accomplish all the them, a computer can accomplish all the remarkable things for which it has its reputation remarkable things for which it has its reputation

Page 20: The Binary Number System Emily Beck and Susan Cantrell

So HandySo Handy

• Binary is handy because now we can easily Binary is handy because now we can easily use something physical to represent numbers use something physical to represent numbers

• 1’s and 0’s tell the computer “on” or “off” in 1’s and 0’s tell the computer “on” or “off” in coding datacoding data

• For instance we could use a laser - For instance we could use a laser - – When it's on you know it means '1' and when it's off When it's on you know it means '1' and when it's off

you know it means '0'you know it means '0'

Page 21: The Binary Number System Emily Beck and Susan Cantrell

Questions?Questions?