Presentation is loading. Please wait.

Presentation is loading. Please wait.

Binary  Decimal. Review Each binary digit (bit) is a power of 2 Place the bits, multiply, and add Example: 11010110 2... 2727 2626 2525 2424 23232 2121.

Similar presentations


Presentation on theme: "Binary  Decimal. Review Each binary digit (bit) is a power of 2 Place the bits, multiply, and add Example: 11010110 2... 2727 2626 2525 2424 23232 2121."— Presentation transcript:

1 Binary  Decimal

2 Review Each binary digit (bit) is a power of 2 Place the bits, multiply, and add Example: 11010110 2... 2727 2626 2525 2424 23232 2121 2020 1286432 168421...

3 Convert the following from binary to decimal 1101 2 = ? 001101 2 = ? 10111010 2 = ?

4 Decimal  Binary

5 1. Write out the powers of 2 2. Subtract the largest power of 2 that is less than your number 3. Make note of which power of 2 you subtracted with a 1 (unused powers of 2 will be 0) 4. Subtract the next largest power of 2 from the result that you have 5. Repeat until you reach 0 6. Build your binary number from the 1s and 0s that you have placed

6 Examples 15 10 = ? 49 10 = ?... 2727 2626 2525 2424 23232 2121 2020 1286432 168421...

7 Convert the following from decimal to binary 8 10 = ? 25 10 = ? 83 10 = ?

8 Data Representation Representing numbers is great, but what else is binary good for?  Umm…anything/everything ASCII Example:  ASCII Table ASCII Table  ASCII  Binary Converter ASCII  Binary Converter

9 Data Representation If we have 2 bits, how many different binary numbers can we make?  00  01  10  11 And if we had 3? How about 4? Umm...32?

10 How many combinations? Each bit can only be a 0 or 1 (2 choices) The number of distinct combinations of n-bits is given by 2 n

11 Pixel and Color Depth Pixel ~ Picture element What does an image look like when we zoom in? What does an image look like when we zoom in? An image is a matrix of numbers  Numbers ~ Colors Number of bits restricts the number colors we can use (pixel/color depth)pixel/color depth Example: Lower your display setting’s color quality

12 What is the maximum value? If you had 2 bits?  3 bits?  4 bits? What’s the pattern?


Download ppt "Binary  Decimal. Review Each binary digit (bit) is a power of 2 Place the bits, multiply, and add Example: 11010110 2... 2727 2626 2525 2424 23232 2121."

Similar presentations


Ads by Google