Presentation is loading. Please wait.

Presentation is loading. Please wait.

Binary, Denary, Hexadecimal Conversion Binary Addition

Similar presentations


Presentation on theme: "Binary, Denary, Hexadecimal Conversion Binary Addition"— Presentation transcript:

1 Binary, Denary, Hexadecimal Conversion Binary Addition
Component 1.4 Binary, Denary, Hexadecimal Conversion Binary Addition

2 Starter: Pre-Reading Recap
What is Binary? What does Base 16 mean? What is Hexadecimal? Why do computers use Binary? What is a: Convert the number 160 into Binary Bit Convert the number 160 into Hexadecimal Nibble Byte How do you add two binary bits together? Kilobyte Explain what an overflow is What does Base 10 mean? How can an overflow be avoided? What does Base 2 mean?

3 Learning Intentions To develop an understanding of data representation in computing

4 Learning Outcomes Use and convert between denary, binary (up to 16 bits) and hexadecimal counting systems. Explain the use of hexadecimal notation as shorthand for binary numbers. Apply binary addition techniques. Explain the concept of overflow.

5 Binary Bits Each 1 or 0 is called a bit - 1
8 bits is called a byte – e.g 4 bits is called a nibble – e.g. 1010 In the same way as a kilometre is 1000 meters, we can group together 1024 bytes and call it a kilobyte 8 bits = 1 byte 1024 bytes = 1 kilobyte 1024 kilobytes = 1 megabyte 1024 megabyte = 1 gigabyte 1024 gigabytes = 1 terabyte

6 Graded Exercises – Grade 4
Complete the Q15 and Q16 sheet You can use the R15 Sheet to help you – this can be found in the help folder for this lesson! Remember to be smart when using the Internet: Wikipedia is often complicated – sometimes even I don’t understand! BBC Bitesize, Teach ICT, and Revision World are better places to find your information!

7 Binary and Denary (Base 2 and Base 10)
Notice how we organise the number 2564 Converting to Binary 1000 100 10 1  2  5  6  4 There are: 2 x = 2000 5 x 100 = 500 6 x 10 = 4 x 1 = 2564 In binary we don’t use 1, 10, 100, 1000 because that’s base 10. Each column is multiplied by 10! Instead we use 1, 2, 4, 8, 16, 32.. This is called Base 2 – because each column is multiplied by 2! 8 4 2 1 +

8 Base 10 and Base 2 Base 10 Base 2 1000 100 10 1 2 5 6 4 8 4 2 1 X 10
 2  5  6  4 8 4 2 1

9 Writing down numbers Decimal (Denary) Binary
The number 4567 is made up of: 7 x 1 6 x 10 5 x x 1000 When you add these you get 4,567 The number 1011 is made up of: 1 x 1 2 x 2 0 x 4 1 x 8 When you add these you get 11 X 2 X 2 X 2 1000 100 10 1 4 6 5 7 8 4 2 1

10 Converting Base 2 to Base 10
To convert from Binary to Denary (Base 2 to Base 10): Draw the table over the top (1, 2, 4, 8, 16, etc..) from right to left Add up all of the 1s! Example: 1011 would become  Add = 11! 8 4 2 1

11 Converting Base 10 to Base 2
Write down the 8 bit Binary table Take away the biggest number you can e.g Converting 84. The biggest number you can take away is 64 Take away the next biggest number You are left with 20. The next biggest number is 16 Repeat until you get 0! Fill in the gaps with 0s! 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 = 84!

12 Converting Binary into Decimal
Method 1 Divide the decimal number by 2. If it divides equally write a 0. If it doesn’t divide equally and there is a remainder write 1. Divide the result by 2. If it divides equally write a 0. If it doesn’t divide equally and there is a remainder write 1. Continue until the result is 0.

13 Converting Binary into Decimal
Method 2 Find the largest possible binary bit value that can be subtracted from the decimal value without creating a negative value. Write a 1 in that column. Subtract the next largest binary bit value from the decimal without creating a negative value. Write a 1 in that column. If you do create a negative value put a 0. Keep going until the decimal value is 0. For example the number 13:

14 Graded Exercises – Grade 4
Complete the Q18 sheet You can use the R18 Sheet to help you – this can be found in the help folder for this lesson! Remember to be smart when using the Internet: Wikipedia is often complicated – sometimes even I don’t understand! BBC Bitesize, Teach ICT, and Revision World are better places to find your information!

15 Binary Addition – Grab a whiteboard come to the front!

16 Learning how to add (denary)
Let think about how you add numbers together On your whiteboards layout the sum Think about how you find the answer

17 Learning how to add (denary)
Lets try a harder sum. What happens when we need to “carry” a number On your whiteboards think layout the sum Think about how you get to the answer

18 Why do we carry numbers? Think about base 10 (denary). We carry numbers when a number gets too large for the column

19 Whiteboard exercise Add the following denary numbers using ‘long addition’ show your working!

20 Learning to add - Binary
Addition in binary works in exactly the same way except that we can only use 1 and 0

21 Activity – Simple Binary Addition
Complete the start of activity 2

22 Learning to add - Binary
In fact, Binary addition is much simpler as we can only ever have 1 to carry. Before you start these can you (on your whiteboards)… add 1+1 in Binary? Add 10+ 1in Binary?

23 Help - Adding Binary Bits
When adding in Binary 1 + 1 becomes 10 1 + 0 becomes 1 0 + 0 stays as 0

24 What do you do with an extra bit?
Computers store things in fixed 8-bit strings. This means that the number 2 (10 in Binary) is stored as by a Computer. If you are adding two 4 bit binary numbers together you will sometimes need a 5th bit to store the answer: = This is fine because the computer will convert this to But what happens if you are adding 2 8 bit binary numbers together and you need a 9th bit?

25 Overflow Error: The 9th Bit
The 9th bit is called an ‘Overflow’ and it can’t be stored by the computer in a 8 bit string. In Computer Science we call this the Overflow Error: Overflow happens when the result of a calculation is too large to be stored in the available memory.

26 Graded Exercises – Grade 4
Complete the Q19 sheet You can use the R19 Sheet to help you – this can be found in the help folder for this lesson! Remember to be smart when using the Internet: Wikipedia is often complicated – sometimes even I don’t understand! BBC Bitesize, Teach ICT, and Revision World are better places to find your information!

27 Hexadecimal Hexadecimal is a base 16 numbering system.
Why do you think 16 is a significant number in Computing? Convert the binary nibble below. 1111

28 Denary and Hexadecimal (Base 10 and Base 16)
Each hex digit reflects a 4-bit binary sequence. This means an 8-bit binary number can be written using only two different hex digits - one hex digit for each nibble (or group of 4-bits). It is much easier to write numbers as hex than to write them as binary numbers. For example:  in binary would be D4 in hex FFFF3 in hex would be   in binary

29 Converting Base 16 to Base 10
Method 1: Converting from hex to denary via binary Separate the hex digits to find each equivalent in binary, and then piece them back together. Worked example - What is the denary value of hex value 2D? Separate the hex digits into 2 and D and find the equivalent binary numbers (2 = 0010; D = 1101). Piece them together to get   (0x x64 + 1x32 + 0x x8 + 1x4 + 0x2 + 1x1 = 45 in denary).

30 Converting Base 16 to Base 10
Method 2: Using base 16 place-value columns Another method is to create base 16 place-value columns, and add the hex value to the appropriate columns. You would then need to work out what the hex digits represent in denary, and multiply this figure with the place-value. Finally, add all the values together. The base 16 columns would be (161=16), (162=256), (163=4096), etc. Worked example - What is the denary value of hex value 2D? Add the hex value to the appropriate base 16 place-value column: 2 in the 16 column; D in the 1 column. Work out what the hex digits represent in denary: 2 = 2 in denary; D = 13 in denary. Multiply this figure with the place value: 2 x 16 = 32; 13 x 1 = 13. Add the values together: = 45 in denary.

31 Graded Exercises – Grade 4
Complete the Q21 sheet You can use the Q19 Sheet to help you – this can be found in the help folder for this lesson! Remember to be smart when using the Internet: Wikipedia is often complicated – sometimes even I don’t understand! BBC Bitesize, Teach ICT, and Revision World are better places to find your information!

32 Exam Questions – Grades 5-8
Complete the Grade 5-8 Exam Questions You must complete as far as your Year 11 target grade. If you can’t do this  come to the front and I will help you!

33 Crib Sheet – What I must remember about _______
Starting Point: Read the learning outcomes from the exam board Record the key facts that you need to remember about Binary, Denary, and Hexadecimal. Think about what you have learnt today, what questions you have been asked, definitions of words, or anything else you think is important!

34 Homework Question Sheets: Q17 – Binary to Denary Conversions
Q20 – Hexadecimal to Denary Conversions Q22 – Hexadecimal and Binary Conversions Exam Questions: Complete your Year 11 target grade Pre-Reading: 44-47 Notes on Arithmetic Shifts and Representing Characters using Binary


Download ppt "Binary, Denary, Hexadecimal Conversion Binary Addition"

Similar presentations


Ads by Google