Presentation is loading. Please wait.

Presentation is loading. Please wait.

Binary Logic Lets think about the Binary!. What is Binary? Computers use binary as it’s a lot simpler! Each CPU is made up of millions of transistors.

Similar presentations


Presentation on theme: "Binary Logic Lets think about the Binary!. What is Binary? Computers use binary as it’s a lot simpler! Each CPU is made up of millions of transistors."— Presentation transcript:

1 Binary Logic Lets think about the Binary!

2 What is Binary? Computers use binary as it’s a lot simpler! Each CPU is made up of millions of transistors which can only have TWO states (ON/OFF). We will be thinking of it as either 1 or 0. Anything can be converted into a binary number so a computer can understand, process and store it.

3 How binary is calculated? 1 2 4 8 We have FOUR shapes worth a different amount but ONLY ONE of each. How do we get 1? 1 All we need is ONE GREEN TRIANGLE!

4 How binary is calculated? 1 2 4 8 We have FOUR shapes worth a different amount but ONLY ONE of each. How do we get 2? All we need is ONE BLUE CIRCLE! 2

5 How binary is calculated? 1 2 4 8 We have FOUR shapes worth a different amount but ONLY ONE of each. How do we get 3? All we need is ONE GREEN TRIANGLE and ONE BLUE CIRCLE! 2 1

6 How binary is calculated? 1 2 4 8 We have FOUR shapes worth a different amount but ONLY ONE of each. How do we get 5? All we need is ONE GREEN TRIANGLE and ONE ORANGE SQUARE! 1 4

7 How binary is calculated? 1 2 4 8 We have FOUR shapes worth a different amount but ONLY ONE of each. How do we get 7? All we need is ONE GREEN TRIANGLE and ONE ORANGE SQUARE! 1 2 4

8 How binary is calculated? 1 2 4 8 We have FOUR shapes worth a different amount but ONLY ONE of each. What’s the highest number we can make? 1 + 2 + 4 + 8 = 15 1 2 4 8

9 Binary Numbers 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 0 1 1 0 If we use a shape we mark it as ‘1’ otherwise it’s a ‘0’ 1 2 4 8 TOTAL 1 2 3 4 5 6

10 How many 8’s can fit into 5? The answer can be 1 or 0. Click to continue… How many 8’s can fit into 5? The answer can be 1 or 0. Click to continue… 8 fits into 5 zero times… So we put a 0 in the 8 column. Click to continue… 8 fits into 5 zero times… So we put a 0 in the 8 column. Click to continue… 8421 Let’s take the number 5 and work out the binary representation… 5 0 Does 4 fit into 5? 1 or 0 times? Click to continue… Does 4 fit into 5? 1 or 0 times? Click to continue… 4 fits into 5! So we put a 1 in the 4 column. Click to continue… 4 fits into 5! So we put a 1 in the 4 column. Click to continue… 1 We then have to take the 4 we have noted away from the original number… Click to continue… We then have to take the 4 we have noted away from the original number… Click to continue… 1 This leaves 1 left over – we will now test our numbers against 1 instead. Click to continue… This leaves 1 left over – we will now test our numbers against 1 instead. Click to continue… How many 2’s fit into 1? Click to continue… How many 2’s fit into 1? Click to continue… 2 is larger than 1, so we put a zero in the 2 column. Click to continue… 2 is larger than 1, so we put a zero in the 2 column. Click to continue… 0 Does 1 fit into 1? The answer can be 1 or 0. Click to continue… Does 1 fit into 1? The answer can be 1 or 0. Click to continue… 1 1 fits into 1 exactly So, one last time, a 1 goes in the final column. Click to continue… 1 fits into 1 exactly So, one last time, a 1 goes in the final column. Click to continue… So 5 = 0101 in 4-bit binary. We can check we have the answer right by adding the columns that hold a 1. 4 + 1 = 5, so 0101 is correct. So 5 = 0101 in 4-bit binary. We can check we have the answer right by adding the columns that hold a 1. 4 + 1 = 5, so 0101 is correct.

11 Practice! Complete Binary Worksheet 1

12 What are binary numbers used for? Anything the computer needs! We have been calculating Nibbles (4 bits) but computers usually work in Bytes (8 bits). 8421 We know what the FIRST FOUR bits stand for, what do you think the NEXT FOUR stand for? 163264 128

13 8421 What is the binary number for 129? 163264 128 1 2 4 8 64 32 16 128 OR 1 0 0 0 0 0 0 1

14 8421 What is the binary number for 71? 163264 128 1 2 4 8 64 32 16 128 0 1 0 0 0 0 1 1

15 Practice! Complete Binary Worksheet 2

16 Gates We know that BITS are either 1 or 0 but there are “gates” which can change the value. Do you like to play football? 1 = Yes 0 = No NOT 5 say “Yes” & 3 say “No” Do you not like to play football? 1 = Yes 0 = No 5 say “No” & 3 say “Yes” 1 becomes 0 & 0 becomes 1

17 Gates

18 Do you like to play playstation? 1 = Yes 0 = No AND 5 say “Yes” & 3 say “No” Do you like to play playstation AND sing? 1 = Yes 0 = No 1 says “Yes” & 7 say “No” Both questions must be ‘1’ to output ‘1’ Do you like to sing? 1 = Yes 0 = No 2 say “Yes” & 6 say “No”

19 Gates

20 Do you like to play playstation? 1 = Yes 0 = No OR 5 say “Yes” & 3 say “No” Do you like to play playstation OR sing? 1 = Yes 0 = No 1 says “Yes” & 7 say “No” One or more questions must be ‘1’ to output ‘1’ Do you like to sing? 1 = Yes 0 = No 2 say “Yes” & 6 say “No”

21 Gates

22 Truth Tables We sometimes represent these gates on a Truth Table, e.g.: Copy the truth table into your notes and also create the truth tables for the NOT and OR gates

23 Practice! Go onto http://logic.ly/demo and complete the following tasks on one sheet:http://logic.ly/demo a)Create an A OR B circuit b)Create (A OR B) and C c)Create (Not A) AND B d)Create (Not (A AND B)) OR C Print out this one page by taking a screen shot and create the truth tables for these tasks A, B & C are light switches


Download ppt "Binary Logic Lets think about the Binary!. What is Binary? Computers use binary as it’s a lot simpler! Each CPU is made up of millions of transistors."

Similar presentations


Ads by Google