Presentation is loading. Please wait.

Presentation is loading. Please wait.

Computer Programming 12 Mr. Jean February 5 th, 2014.

Similar presentations


Presentation on theme: "Computer Programming 12 Mr. Jean February 5 th, 2014."— Presentation transcript:

1 Computer Programming 12 Mr. Jean February 5 th, 2014

2 The plan: Video clip of the day –http://www.youtube.com/watch?v=JjZNmhJ8X u4http://www.youtube.com/watch?v=JjZNmhJ8X u4 Intro to Binary Intro to number systems

3 Introduction to Binary:

4 842 1 Base 2 x2 1 or 01 or 01 or 0 1 or 0 Binary

5 842 1 Base 2 x2 1 2 4 10 Binary

6 842 1 Base 2 x2 1 2 4 10 Binary 0 001 0 010 0 100 1 010

7 Base 2 1 2 4 10 Binary 0001 0010 0100 1010

8 842 1 Base 2 x2 Binary Bit 842 1 x2 Binary Digit =

9 128 64 32 16 8 4 2 1 Base 2 x2 Binary Byte x2

10 Introduction to Binary: Marble Counting Machine: http://www.youtube.com/watch?v=GcDsh WmhF4Ahttp://www.youtube.com/watch?v=GcDsh WmhF4A http://www.youtube.com/watch?v=md0TlSj Iagshttp://www.youtube.com/watch?v=md0TlSj Iags

11 KiloByte Megabyte Gigabyte TeraByte 1024 Bytes 1024 KiloBytes 1024 MegaBytes 51225612864321684 2 1 1024 GigaBytes 1111111111 1,048,576 Bytes 1,073,741,824 Bytes 1,099,511,627,776 Bytes

12 Binary Video: https://www.youtube.com/watch?v=ry1hp m1GXVIhttps://www.youtube.com/watch?v=ry1hp m1GXVI

13 Practice for Adding in Binary: Convert 20 to Binary Convert 12 to Binary Add the Two Binary Numbers together Convert 23 to Binary Convert 31 to Binary Add the Two Binary Numbers together Find the Binary and decimal answer 1. 2.

14 How to find 59? My first step is to find the largest power of 2 that is less than 59. 1, 2, 4, 8, 16, 32, 64. Ok, 64 is larger than 59 so we take one step back and get 32. 32 is the largest power of 2 that is still smaller than 59. It can go in only once because 2 x 32 = 64 which is larger than 59. So, we write down a 1.

15 Now, we subtract 32 from 59: 59 – (1)(32) = 27. And we move to the next lower power of 2. In this case, that would be 16. How many full times can 16 go into 27? Once. So we write down another 1 and repeat the process. 1 1

16 27 – (1)(16) = 11. The next lowest power of 2 is 8. How many full times can 8 go into 11? Once. So we write down another 1. 111 11 11 – (1)(8) = 3. The next lowest power of 2 is 4. How many full times can 4 go into 3? Zero. So, we write down a 0. 1110

17 3 – (0)(4) = 3. The next lowest power of 2 is 2. –How many full times can 2 go into 3? –Once. So, we write down a 1. 11101 3 – (1)(2) = 1. And finally, the next lowest power of 2 is 1. How many full times can 1 go into 1? Once. So, we write down a 1. 111011

18 To do: Complete the first side of the binary sheet – Complete Questions 1 and 2 Complete the “About Me” powerpoint Upcoming items: –Correcting Binary sheet –Adding and subtracting in binary


Download ppt "Computer Programming 12 Mr. Jean February 5 th, 2014."

Similar presentations


Ads by Google