Presentation is loading. Please wait.

Presentation is loading. Please wait.

GCSE Computing: A451 Computer Systems & Programming www.computerscienceuk.com Numbers Representation of Data in Computer Systems.

Similar presentations


Presentation on theme: "GCSE Computing: A451 Computer Systems & Programming www.computerscienceuk.com Numbers Representation of Data in Computer Systems."— Presentation transcript:

1 GCSE Computing: A451 Computer Systems & Programming www.computerscienceuk.com Numbers Representation of Data in Computer Systems

2 GCSE Computing: A451 Computer Systems & Programming www.computerscienceuk.com Activity 1 5 minutes to complete the following: Convert the following binary numbers into denary 10110011 00110101 01001010

3 GCSE Computing: A451 Computer Systems & Programming www.computerscienceuk.com Representation of Data in Computer Systems Introduction Last lesson we looked at the binary number system and the need for data to be converted into binary so that it can be processed by the CPU. Today we will look at how NUMBERS are represented in binary… Learning Objectives: Numbers: a)Convert positive denary numbers (0-255) into 8- bit binary numbers and vice versa. b)Add two 8-bit binary integers and explain overflow errors which may occur c)Convert positive denary whole numbers (0-255) into 2-digit hexadecimal number and vice versa d)Convert between denary and hexadecimal equivalents of the same number e)Explain the use of hexadecimal to represent binary numbers.

4 GCSE Computing: A451 Computer Systems & Programming www.computerscienceuk.com Representing Numbers

5 GCSE Computing: A451 Computer Systems & Programming www.computerscienceuk.com Representation of Data in Computer Systems Converting Binary Numbers In your exam you will be expected to be able to convert a denary number (the numbers humans work with (base 10) into binary… …and back again. 1286432168421 10011101 157 Learning Objectives: Numbers: a)Convert positive denary numbers (0-255) into 8- bit binary numbers and vice versa. b)Add two 8-bit binary integers and explain overflow errors which may occur c)Convert positive denary whole numbers (0-255) into 2-digit hexadecimal number and vice versa d)Convert between denary and hexadecimal equivalents of the same number e)Explain the use of hexadecimal to represent binary numbers.

6 GCSE Computing: A451 Computer Systems & Programming www.computerscienceuk.com Representation of Data in Computer Systems Converting from Binary to Denary (easy) If you are given a binary number which is to be converted into denary do the following: 1.Above each bit, write the value of that bit. 2.Then simply add the values where there is a 1 underneath, together. 1286432168421 10000101 128 4 1 133 1 Learning Objectives: Numbers: a)Convert positive denary numbers (0-255) into 8- bit binary numbers and vice versa. b)Add two 8-bit binary integers and explain overflow errors which may occur c)Convert positive denary whole numbers (0-255) into 2-digit hexadecimal number and vice versa d)Convert between denary and hexadecimal equivalents of the same number e)Explain the use of hexadecimal to represent binary numbers.

7 GCSE Computing: A451 Computer Systems & Programming www.computerscienceuk.com Representation of Data in Computer Systems Converting from Binary to Denary (easy) 1286432168421 10110011 10001111 00111100 10111100 Learning Objectives: Numbers: a)Convert positive denary numbers (0-255) into 8- bit binary numbers and vice versa. b)Add two 8-bit binary integers and explain overflow errors which may occur c)Convert positive denary whole numbers (0-255) into 2-digit hexadecimal number and vice versa d)Convert between denary and hexadecimal equivalents of the same number e)Explain the use of hexadecimal to represent binary numbers.

8 GCSE Computing: A451 Computer Systems & Programming www.computerscienceuk.com Representation of Data in Computer Systems Converting from Denary to Binary Converting from denary to binary is also quite straight forward. If we wanted to convert 202 into binary we would do the following: 1286432168421 Learning Objectives: Numbers: a)Convert positive denary numbers (0-255) into 8- bit binary numbers and vice versa. b)Add two 8-bit binary integers and explain overflow errors which may occur c)Convert positive denary whole numbers (0-255) into 2-digit hexadecimal number and vice versa d)Convert between denary and hexadecimal equivalents of the same number e)Explain the use of hexadecimal to represent binary numbers. Does 128 fit into 202? YES! So we add a 1 into the column and subtract 128 from 202 (leaving 74) 1

9 GCSE Computing: A451 Computer Systems & Programming www.computerscienceuk.com Representation of Data in Computer Systems Converting from Denary to Binary Converting from denary to binary is also quite straight forward. If we wanted to convert 202 into binary we would do the following: 1286432168421 Learning Objectives: Numbers: a)Convert positive denary numbers (0-255) into 8- bit binary numbers and vice versa. b)Add two 8-bit binary integers and explain overflow errors which may occur c)Convert positive denary whole numbers (0-255) into 2-digit hexadecimal number and vice versa d)Convert between denary and hexadecimal equivalents of the same number e)Explain the use of hexadecimal to represent binary numbers. Does 64 fit into 74? YES! So we add a 1 into the column and subtract 64 from 74 (leaving 10) 1 1

10 GCSE Computing: A451 Computer Systems & Programming www.computerscienceuk.com Representation of Data in Computer Systems Converting from Denary to Binary Converting from denary to binary is also quite straight forward. If we wanted to convert 202 into binary we would do the following: 1286432168421 Learning Objectives: Numbers: a)Convert positive denary numbers (0-255) into 8- bit binary numbers and vice versa. b)Add two 8-bit binary integers and explain overflow errors which may occur c)Convert positive denary whole numbers (0-255) into 2-digit hexadecimal number and vice versa d)Convert between denary and hexadecimal equivalents of the same number e)Explain the use of hexadecimal to represent binary numbers. Does 32 fit into 10? NO! So we add a 0 into the column and move on… 1 1 0

11 GCSE Computing: A451 Computer Systems & Programming www.computerscienceuk.com Representation of Data in Computer Systems Converting from Denary to Binary Converting from denary to binary is also quite straight forward. If we wanted to convert 202 into binary we would do the following: 1286432168421 Learning Objectives: Numbers: a)Convert positive denary numbers (0-255) into 8- bit binary numbers and vice versa. b)Add two 8-bit binary integers and explain overflow errors which may occur c)Convert positive denary whole numbers (0-255) into 2-digit hexadecimal number and vice versa d)Convert between denary and hexadecimal equivalents of the same number e)Explain the use of hexadecimal to represent binary numbers. Does 16 fit into 10? NO! So we add a 0 into the column and move on… 1 1 00

12 GCSE Computing: A451 Computer Systems & Programming www.computerscienceuk.com Representation of Data in Computer Systems Converting from Denary to Binary Converting from denary to binary is also quite straight forward. If we wanted to convert 202 into binary we would do the following: 1286432168421 Learning Objectives: Numbers: a)Convert positive denary numbers (0-255) into 8- bit binary numbers and vice versa. b)Add two 8-bit binary integers and explain overflow errors which may occur c)Convert positive denary whole numbers (0-255) into 2-digit hexadecimal number and vice versa d)Convert between denary and hexadecimal equivalents of the same number e)Explain the use of hexadecimal to represent binary numbers. Does 8 fit into 10? YES! So we add a 1 into the column and subtract 8 from 10 (leaving 2) 1 1 00 1

13 GCSE Computing: A451 Computer Systems & Programming www.computerscienceuk.com Representation of Data in Computer Systems Converting from Denary to Binary Converting from denary to binary is also quite straight forward. If we wanted to convert 202 into binary we would do the following: 1286432168421 Learning Objectives: Numbers: a)Convert positive denary numbers (0-255) into 8- bit binary numbers and vice versa. b)Add two 8-bit binary integers and explain overflow errors which may occur c)Convert positive denary whole numbers (0-255) into 2-digit hexadecimal number and vice versa d)Convert between denary and hexadecimal equivalents of the same number e)Explain the use of hexadecimal to represent binary numbers. Does 4 fit into 2? NO! So we add a 0 into the column and move on… 1 1 00 1 0

14 GCSE Computing: A451 Computer Systems & Programming www.computerscienceuk.com Representation of Data in Computer Systems Converting from Denary to Binary Converting from denary to binary is also quite straight forward. If we wanted to convert 202 into binary we would do the following: 1286432168421 Learning Objectives: Numbers: a)Convert positive denary numbers (0-255) into 8- bit binary numbers and vice versa. b)Add two 8-bit binary integers and explain overflow errors which may occur c)Convert positive denary whole numbers (0-255) into 2-digit hexadecimal number and vice versa d)Convert between denary and hexadecimal equivalents of the same number e)Explain the use of hexadecimal to represent binary numbers. Does 2 fit into 2? YES! So we add a 1 into the column and subtract 2 from 2 (leaving 0) 1 1 00 1 01

15 GCSE Computing: A451 Computer Systems & Programming www.computerscienceuk.com Representation of Data in Computer Systems Converting from Denary to Binary Converting from denary to binary is also quite straight forward. If we wanted to convert 202 into binary we would do the following: 1286432168421 Learning Objectives: Numbers: a)Convert positive denary numbers (0-255) into 8- bit binary numbers and vice versa. b)Add two 8-bit binary integers and explain overflow errors which may occur c)Convert positive denary whole numbers (0-255) into 2-digit hexadecimal number and vice versa d)Convert between denary and hexadecimal equivalents of the same number e)Explain the use of hexadecimal to represent binary numbers. Does 1 fit into 0? NO! So we add a 0 into the column and that is it! 1 1 00 1 010

16 GCSE Computing: A451 Computer Systems & Programming www.computerscienceuk.com Representation of Data in Computer Systems Converting from Denary to Binary So 202 in binary is: 1286432168421 Learning Objectives: Numbers: a)Convert positive denary numbers (0-255) into 8- bit binary numbers and vice versa. b)Add two 8-bit binary integers and explain overflow errors which may occur c)Convert positive denary whole numbers (0-255) into 2-digit hexadecimal number and vice versa d)Convert between denary and hexadecimal equivalents of the same number e)Explain the use of hexadecimal to represent binary numbers. 1 1001010 128 64 8 2 202 2 1 Check that it works:

17 GCSE Computing: A451 Computer Systems & Programming www.computerscienceuk.com Mini Whiteboard Practice Convert 234 into binary: 1286432168421

18 GCSE Computing: A451 Computer Systems & Programming www.computerscienceuk.com Mini Whiteboard Practice Convert 42 into binary: 1286432168421

19 GCSE Computing: A451 Computer Systems & Programming www.computerscienceuk.com Mini Whiteboard Practice Convert 175 into binary: 1286432168421

20 GCSE Computing: A451 Computer Systems & Programming www.computerscienceuk.com Representation of Data in Computer Systems Adding 8-bit binary numbers Adding binary numbers is much like adding denary numbers (the system we use as humans). Things to remember: 1.Keep your numbers in the correct columns 2.1+1 = 10 in binary 3.1+1+1 = 11 in binary 1286432168421 00110011 10001111 Learning Objectives: Numbers: a)Convert positive denary numbers (0-255) into 8- bit binary numbers and vice versa. b)Add two 8-bit binary integers and explain overflow errors which may occur c)Convert positive denary whole numbers (0-255) into 2-digit hexadecimal number and vice versa d)Convert between denary and hexadecimal equivalents of the same number e)Explain the use of hexadecimal to represent binary numbers.

21 GCSE Computing: A451 Computer Systems & Programming www.computerscienceuk.com Representation of Data in Computer Systems Adding 8-bit binary numbers Adding binary numbers is much like adding denary numbers (the system we use as humans). Things to remember: 1.Keep your numbers in the correct columns 2.1+1 = 10 in binary 3.1+1+1 = 11 in binary 1286432168421 00110011 10001111 1 0 Learning Objectives: Numbers: a)Convert positive denary numbers (0-255) into 8- bit binary numbers and vice versa. b)Add two 8-bit binary integers and explain overflow errors which may occur c)Convert positive denary whole numbers (0-255) into 2-digit hexadecimal number and vice versa d)Convert between denary and hexadecimal equivalents of the same number e)Explain the use of hexadecimal to represent binary numbers.

22 GCSE Computing: A451 Computer Systems & Programming www.computerscienceuk.com Representation of Data in Computer Systems Adding 8-bit binary numbers Adding binary numbers is much like adding denary numbers (the system we use as humans). Things to remember: 1.Keep your numbers in the correct columns 2.1+1 = 10 in binary 3.1+1+1 = 11 in binary 1286432168421 00110011 10001111 11 10 Learning Objectives: Numbers: a)Convert positive denary numbers (0-255) into 8- bit binary numbers and vice versa. b)Add two 8-bit binary integers and explain overflow errors which may occur c)Convert positive denary whole numbers (0-255) into 2-digit hexadecimal number and vice versa d)Convert between denary and hexadecimal equivalents of the same number e)Explain the use of hexadecimal to represent binary numbers.

23 GCSE Computing: A451 Computer Systems & Programming www.computerscienceuk.com Representation of Data in Computer Systems Adding 8-bit binary numbers Adding binary numbers is much like adding denary numbers (the system we use as humans). Things to remember: 1.Keep your numbers in the correct columns 2.1+1 = 10 in binary 3.1+1+1 = 11 in binary 1286432168421 00110011 10001111 111 010 Learning Objectives: Numbers: a)Convert positive denary numbers (0-255) into 8- bit binary numbers and vice versa. b)Add two 8-bit binary integers and explain overflow errors which may occur c)Convert positive denary whole numbers (0-255) into 2-digit hexadecimal number and vice versa d)Convert between denary and hexadecimal equivalents of the same number e)Explain the use of hexadecimal to represent binary numbers.

24 GCSE Computing: A451 Computer Systems & Programming www.computerscienceuk.com Representation of Data in Computer Systems Adding 8-bit binary numbers Adding binary numbers is much like adding denary numbers (the system we use as humans). Things to remember: 1.Keep your numbers in the correct columns 2.1+1 = 10 in binary 3.1+1+1 = 11 in binary 1286432168421 00110011 10001111 1111 0010 Learning Objectives: Numbers: a)Convert positive denary numbers (0-255) into 8- bit binary numbers and vice versa. b)Add two 8-bit binary integers and explain overflow errors which may occur c)Convert positive denary whole numbers (0-255) into 2-digit hexadecimal number and vice versa d)Convert between denary and hexadecimal equivalents of the same number e)Explain the use of hexadecimal to represent binary numbers.

25 GCSE Computing: A451 Computer Systems & Programming www.computerscienceuk.com Representation of Data in Computer Systems Adding 8-bit binary numbers Adding binary numbers is much like adding denary numbers (the system we use as humans). Things to remember: 1.Keep your numbers in the correct columns 2.1+1 = 10 in binary 3.1+1+1 = 11 in binary 1286432168421 00110011 10001111 11111 00010 Learning Objectives: Numbers: a)Convert positive denary numbers (0-255) into 8- bit binary numbers and vice versa. b)Add two 8-bit binary integers and explain overflow errors which may occur c)Convert positive denary whole numbers (0-255) into 2-digit hexadecimal number and vice versa d)Convert between denary and hexadecimal equivalents of the same number e)Explain the use of hexadecimal to represent binary numbers.

26 GCSE Computing: A451 Computer Systems & Programming www.computerscienceuk.com Representation of Data in Computer Systems Adding 8-bit binary numbers Adding binary numbers is much like adding denary numbers (the system we use as humans). Things to remember: 1.Keep your numbers in the correct columns 2.1+1 = 10 in binary 3.1+1+1 = 11 in binary 1286432168421 00110011 10001111 111111 000010 Learning Objectives: Numbers: a)Convert positive denary numbers (0-255) into 8- bit binary numbers and vice versa. b)Add two 8-bit binary integers and explain overflow errors which may occur c)Convert positive denary whole numbers (0-255) into 2-digit hexadecimal number and vice versa d)Convert between denary and hexadecimal equivalents of the same number e)Explain the use of hexadecimal to represent binary numbers.

27 GCSE Computing: A451 Computer Systems & Programming www.computerscienceuk.com Representation of Data in Computer Systems Adding 8-bit binary numbers Adding binary numbers is much like adding denary numbers (the system we use as humans). Things to remember: 1.Keep your numbers in the correct columns 2.1+1 = 10 in binary 3.1+1+1 = 11 in binary 1286432168421 00110011 10001111 111111 1000010 Learning Objectives: Numbers: a)Convert positive denary numbers (0-255) into 8- bit binary numbers and vice versa. b)Add two 8-bit binary integers and explain overflow errors which may occur c)Convert positive denary whole numbers (0-255) into 2-digit hexadecimal number and vice versa d)Convert between denary and hexadecimal equivalents of the same number e)Explain the use of hexadecimal to represent binary numbers.

28 GCSE Computing: A451 Computer Systems & Programming www.computerscienceuk.com Representation of Data in Computer Systems Adding 8-bit binary numbers Adding binary numbers is much like adding denary numbers (the system we use as humans). Things to remember: 1.Keep your numbers in the correct columns 2.1+1 = 10 in binary 3.1+1+1 = 11 in binary 1286432168421 00110011 10001111 111111 11000010 Learning Objectives: Numbers: a)Convert positive denary numbers (0-255) into 8- bit binary numbers and vice versa. b)Add two 8-bit binary integers and explain overflow errors which may occur c)Convert positive denary whole numbers (0-255) into 2-digit hexadecimal number and vice versa d)Convert between denary and hexadecimal equivalents of the same number e)Explain the use of hexadecimal to represent binary numbers.

29 GCSE Computing: A451 Computer Systems & Programming www.computerscienceuk.com Representation of Data in Computer Systems Adding 8-bit binary numbers A quick check… 1286432168421 00110011 10001111 111111 11000010 Learning Objectives: Numbers: a)Convert positive denary numbers (0-255) into 8- bit binary numbers and vice versa. b)Add two 8-bit binary integers and explain overflow errors which may occur c)Convert positive denary whole numbers (0-255) into 2-digit hexadecimal number and vice versa d)Convert between denary and hexadecimal equivalents of the same number e)Explain the use of hexadecimal to represent binary numbers. 51 + 143 = 194 1286432168421 11000010 = 194

30 GCSE Computing: A451 Computer Systems & Programming www.computerscienceuk.com Mini Whiteboard Practice Add the following 2 binary numbers: 00110011 10001111

31 GCSE Computing: A451 Computer Systems & Programming www.computerscienceuk.com Mini Whiteboard Practice Add the following 2 binary numbers: 00110111 10101111

32 GCSE Computing: A451 Computer Systems & Programming www.computerscienceuk.com Representation of Data in Computer Systems What about the following situation 1286432168421 10110011 10001111 111111 1000010 Learning Objectives: Numbers: a)Convert positive denary numbers (0-255) into 8- bit binary numbers and vice versa. b)Add two 8-bit binary integers and explain overflow errors which may occur c)Convert positive denary whole numbers (0-255) into 2-digit hexadecimal number and vice versa d)Convert between denary and hexadecimal equivalents of the same number e)Explain the use of hexadecimal to represent binary numbers. 1 0 If the last part of the addition means that there is a carry, we simply place it as the first number. This will mean that the answer is a 9-bit answer.

33 GCSE Computing: A451 Computer Systems & Programming www.computerscienceuk.com Representation of Data in Computer Systems The problem with 9-bit answers Because the largest number we can hold in a byte is 255, if we add two bytes together there is a chance that the answer will be greater than 255. This answer will not be able to be held in a byte and so this causes an over flow error. In modern computers, CPU’s can hold much larger numbers so this is dealt with. Ever heard of a 32 or 64 bit processor? – these can deal with larger binary numbers! However you do need to know that overflow errors occur when doing binary addition when the answer is 9 bits in length. Learning Objectives: Numbers: a)Convert positive denary numbers (0-255) into 8- bit binary numbers and vice versa. b)Add two 8-bit binary integers and explain overflow errors which may occur c)Convert positive denary whole numbers (0-255) into 2-digit hexadecimal number and vice versa d)Convert between denary and hexadecimal equivalents of the same number e)Explain the use of hexadecimal to represent binary numbers. = OVERFLOW ERROR!

34 GCSE Computing: A451 Computer Systems & Programming www.computerscienceuk.com Mini Whiteboard Practice Add the following 2 binary numbers: 10110110 11011111

35 GCSE Computing: A451 Computer Systems & Programming www.computerscienceuk.com Mini Whiteboard Practice Add the following 2 binary numbers: 11010010 01011100


Download ppt "GCSE Computing: A451 Computer Systems & Programming www.computerscienceuk.com Numbers Representation of Data in Computer Systems."

Similar presentations


Ads by Google