Decimal Review n Decimal Base 10 number system
Decimal Review n Decimal ~ Base 10 number system 10 different numbers: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 n Based on the powers of 10 (see handout) 1, 100, 10000, 100000, … 105 104 103 102 101 100, 000 10, 000 100 10 1
Decimal Example 2657= 2000 + 600 + 50 + 7 = 2*1000 + 6*100 + 5*10 + 7*1 = 2*103 + 6*102 + 5*101 + 7*100 Place the corresponding digits in the decimal chart for the number: 830157
Binary! Counting with 1 s and 0 s
Binary n Base 2 number system 2 different numbers: 0, 1 n Based on the powers of 2 (see handout) 1, 2, 4, 8, 16, 32, … 25 24 23 22 21 20 32 16 8 4 2 1
Example 10112 = 1*23 + 0*22 + 1*21 + 1*20 = 1*8 + 0*4 + 1*2 + 1*1 = 8 + 2 + 1 = 1110 Place the corresponding digits in the binary chart for the number: 001101 What is it in decimal (base 10)?
Examples 1) 2) 3) Draw the powers of 2 table Place the following numbers in the table Determine the decimal version! 000112 = ? 011112 = ? 1010112 = ?
ON-OFF-ON-ON 1 0 1 1
Haha! n "There are only 10 types of people in the world: Those who understand binary, and those who don't"
Decimal Binary
Review n Each binary digit (bit) is a power of 2 . . . 27 26 25 24 23 22 21 20 . . . 128 64 32 16 8 4 2 1 . . .
Decimal Binary 1. 2. 3. 4. 5. 6. Write out the powers of 2 Subtract the largest power of 2 that is less than your number Make note of which power of 2 you subtracted with a 1 (unused powers of 2 will be 0) Subtract the next largest power of 2 from the result that you have Repeat until you reach 0 Build your binary number from the 1 s and 0 s that you have placed
Examples 1510 = ? 4910 = ? . . . 27 26 25 24 23 22 21 20 . . . 128 64 32 16 8 4 2 1 . . .
Convert the following from decimal to binary 810 = ? 2510 = ? 8310 = ?
- Slides: 13