Binary - PowerPoint PPT Presentation

1 / 9
About This Presentation
Title:

Binary

Description:

Binary to Decimal & Back Again Mr. Akuna 2004 Introduction to Binary Numbers Binary numbers are made up of binary digits, each digit is called a BIT, taken from the ... – PowerPoint PPT presentation

Number of Views:36
Avg rating:3.0/5.0
Slides: 10
Provided by: pak54
Category:
Tags: binary

less

Transcript and Presenter's Notes

Title: Binary


1
Binary Decimal Conversions
  • Binary to Decimal Back Again
  • Mr. Akuna 2004

2
Introduction to Binary Numbers
  • Binary numbers are made up of binary digits, each
    digit is called a BIT, taken from the words
    BI-nary digi-T. Binary digits are either 0 or 1.
  • Eight bits are grouped together to form a BYTE.
  • Binary numbers are numbers just like decimal
    numbers but are in base 2 instead of base 10. The
    base tells you how many digits can be used.
  • In base 10 (decimal) there are 10 0, 1, 2, 3,
    4, 5, 6, 7, 8, 9
  • In base 2 (binary) there are 2 0, 1
  •  

3
Binary to Decimal Conversion
Remember 8 bits a BYTE and each bit has a positional value so the first position is 20 1, the second position is 21 2, the third position is 22 4, and so on Take the binary number 11101 place each in position. Remember 8 bits a BYTE and each bit has a positional value so the first position is 20 1, the second position is 21 2, the third position is 22 4, and so on Take the binary number 11101 place each in position. Remember 8 bits a BYTE and each bit has a positional value so the first position is 20 1, the second position is 21 2, the third position is 22 4, and so on Take the binary number 11101 place each in position. Remember 8 bits a BYTE and each bit has a positional value so the first position is 20 1, the second position is 21 2, the third position is 22 4, and so on Take the binary number 11101 place each in position. Remember 8 bits a BYTE and each bit has a positional value so the first position is 20 1, the second position is 21 2, the third position is 22 4, and so on Take the binary number 11101 place each in position. Remember 8 bits a BYTE and each bit has a positional value so the first position is 20 1, the second position is 21 2, the third position is 22 4, and so on Take the binary number 11101 place each in position. Remember 8 bits a BYTE and each bit has a positional value so the first position is 20 1, the second position is 21 2, the third position is 22 4, and so on Take the binary number 11101 place each in position. Remember 8 bits a BYTE and each bit has a positional value so the first position is 20 1, the second position is 21 2, the third position is 22 4, and so on Take the binary number 11101 place each in position.
27 26 25 24 23 22 21 20
128 64 32 16 8 4 2 1
1 1 1 0 1
Next take the value for that position. Add 1684129notice 2 is not added in since its position has a 0, so binary 11101 is equal to decimal 29 Next take the value for that position. Add 1684129notice 2 is not added in since its position has a 0, so binary 11101 is equal to decimal 29 Next take the value for that position. Add 1684129notice 2 is not added in since its position has a 0, so binary 11101 is equal to decimal 29 Next take the value for that position. Add 1684129notice 2 is not added in since its position has a 0, so binary 11101 is equal to decimal 29 Next take the value for that position. Add 1684129notice 2 is not added in since its position has a 0, so binary 11101 is equal to decimal 29 Next take the value for that position. Add 1684129notice 2 is not added in since its position has a 0, so binary 11101 is equal to decimal 29 Next take the value for that position. Add 1684129notice 2 is not added in since its position has a 0, so binary 11101 is equal to decimal 29 Next take the value for that position. Add 1684129notice 2 is not added in since its position has a 0, so binary 11101 is equal to decimal 29
4
Check for Understanding
  • What is the value of 00100101 ?
  • What is the value of 11111110 ?
  • What is the value of 10000001 ?

27 26 25 24 23 22 21 20
128 64 32 16 8 4 2 1



37
254
129
5
Decimal to Binary Conversion
Take the decimal number 75, look at each number starting with 128, if it can be subtracted place a 1 otherwise place a 0. The first number that can be subtracted is 64 so place a 0 below 128 a 1 below 64. Subtract 64 from 75, the remainder is 11. The next number that can be subtracted is 8 so place a 0 below 32, a 0 below 16, a 1 below 8. Subtract 8 from 11, the remainder is 3. The next number that can be subtracted is 2 so place a 0 below 4 a 1 below the 2. Subtract 2 from 3, the remainder is 1. Place a 1 below the 1 subtract 1, the remainder is 0 and you have the binary number 01001011 Take the decimal number 75, look at each number starting with 128, if it can be subtracted place a 1 otherwise place a 0. The first number that can be subtracted is 64 so place a 0 below 128 a 1 below 64. Subtract 64 from 75, the remainder is 11. The next number that can be subtracted is 8 so place a 0 below 32, a 0 below 16, a 1 below 8. Subtract 8 from 11, the remainder is 3. The next number that can be subtracted is 2 so place a 0 below 4 a 1 below the 2. Subtract 2 from 3, the remainder is 1. Place a 1 below the 1 subtract 1, the remainder is 0 and you have the binary number 01001011 Take the decimal number 75, look at each number starting with 128, if it can be subtracted place a 1 otherwise place a 0. The first number that can be subtracted is 64 so place a 0 below 128 a 1 below 64. Subtract 64 from 75, the remainder is 11. The next number that can be subtracted is 8 so place a 0 below 32, a 0 below 16, a 1 below 8. Subtract 8 from 11, the remainder is 3. The next number that can be subtracted is 2 so place a 0 below 4 a 1 below the 2. Subtract 2 from 3, the remainder is 1. Place a 1 below the 1 subtract 1, the remainder is 0 and you have the binary number 01001011 Take the decimal number 75, look at each number starting with 128, if it can be subtracted place a 1 otherwise place a 0. The first number that can be subtracted is 64 so place a 0 below 128 a 1 below 64. Subtract 64 from 75, the remainder is 11. The next number that can be subtracted is 8 so place a 0 below 32, a 0 below 16, a 1 below 8. Subtract 8 from 11, the remainder is 3. The next number that can be subtracted is 2 so place a 0 below 4 a 1 below the 2. Subtract 2 from 3, the remainder is 1. Place a 1 below the 1 subtract 1, the remainder is 0 and you have the binary number 01001011 Take the decimal number 75, look at each number starting with 128, if it can be subtracted place a 1 otherwise place a 0. The first number that can be subtracted is 64 so place a 0 below 128 a 1 below 64. Subtract 64 from 75, the remainder is 11. The next number that can be subtracted is 8 so place a 0 below 32, a 0 below 16, a 1 below 8. Subtract 8 from 11, the remainder is 3. The next number that can be subtracted is 2 so place a 0 below 4 a 1 below the 2. Subtract 2 from 3, the remainder is 1. Place a 1 below the 1 subtract 1, the remainder is 0 and you have the binary number 01001011 Take the decimal number 75, look at each number starting with 128, if it can be subtracted place a 1 otherwise place a 0. The first number that can be subtracted is 64 so place a 0 below 128 a 1 below 64. Subtract 64 from 75, the remainder is 11. The next number that can be subtracted is 8 so place a 0 below 32, a 0 below 16, a 1 below 8. Subtract 8 from 11, the remainder is 3. The next number that can be subtracted is 2 so place a 0 below 4 a 1 below the 2. Subtract 2 from 3, the remainder is 1. Place a 1 below the 1 subtract 1, the remainder is 0 and you have the binary number 01001011 Take the decimal number 75, look at each number starting with 128, if it can be subtracted place a 1 otherwise place a 0. The first number that can be subtracted is 64 so place a 0 below 128 a 1 below 64. Subtract 64 from 75, the remainder is 11. The next number that can be subtracted is 8 so place a 0 below 32, a 0 below 16, a 1 below 8. Subtract 8 from 11, the remainder is 3. The next number that can be subtracted is 2 so place a 0 below 4 a 1 below the 2. Subtract 2 from 3, the remainder is 1. Place a 1 below the 1 subtract 1, the remainder is 0 and you have the binary number 01001011 Take the decimal number 75, look at each number starting with 128, if it can be subtracted place a 1 otherwise place a 0. The first number that can be subtracted is 64 so place a 0 below 128 a 1 below 64. Subtract 64 from 75, the remainder is 11. The next number that can be subtracted is 8 so place a 0 below 32, a 0 below 16, a 1 below 8. Subtract 8 from 11, the remainder is 3. The next number that can be subtracted is 2 so place a 0 below 4 a 1 below the 2. Subtract 2 from 3, the remainder is 1. Place a 1 below the 1 subtract 1, the remainder is 0 and you have the binary number 01001011
27 26 25 24 23 22 21 20
128 64 32 16 8 4 2 1
0 1 0 0 1 0 1 1
75
-64
11
-8
3
-2
1
-1
0
6
Check for Understanding
  • What is decimal 83 in binary?
  • What is decimal 54 in binary?
  • What is decimal 255 in binary?

27 26 25 24 23 22 21 20
128 64 32 16 8 4 2 1



83
54
255
7
Least Significant Bit (LSB)
  • Lets take another look at the binary number
    01001011
  • Notice we can drop the leading 0 and express the
    binary number as 1001011
  • This is because the least significant bit is the
    leftmost 1 which is necessary to maintain the
    accuracy of the binary number
  • Another way of expressing this is to ask what is
    the least number of bits needed to express the
    binary number 01001011 ? The answer is 7
    (1001011)
  • Or we can ask what is the least number of bits
    needed to express 75? Again the answer is 7
    (Notice this is a trick question since we are
    asking about the number of bits.)

8
Check for Understanding
  • What is the least number of bits needed to
    express 3? 
  • What is the least number of bits needed to
    express the binary number 00011010?
  • What is the least number of bits needed to
    express 67?
  • BONUS Question
  • How can you tell quickly if a binary number is
    odd or even?

2 (binary number 11)
5 (binary number 11010)
7 (binary number 1000011)
If the last bit is 0 the decimal number will be
even. If the last bit is 1 the decimal number
will be odd.
9
Final Check for Understanding
  • Click on this link to bring up the Binary-Decimal
    Worksheet.
  • Print complete the worksheet
  • Turn in this worksheet with your other
    assignments.
Write a Comment
User Comments (0)
About PowerShow.com