Presentation is loading. Please wait.

Presentation is loading. Please wait.

Arithmetic Shifts and Character Representation

Similar presentations


Presentation on theme: "Arithmetic Shifts and Character Representation"— Presentation transcript:

1 Arithmetic Shifts and Character Representation
Component 1.4 Arithmetic Shifts and Character Representation

2 Learning Outcomes Use arithmetic shift functions and explain their effect Describe how characters are stored as a binary number Describe standardised character sets, including Unicode and American Standard Code for Information Interchange (ASCII)

3 Starter: Pre-Reading Questions
What is a character? What does the term ‘character encoding’ mean? What is ASCII? What does a character set do? How many characters can be stored using ASCII? What is an arithmetic shift? What can they be used for?

4 Arithmetic Shifts Shifts are manipulations of bit patterns. A shift involves moving the bits in a specified direction, either left or right, by a specified number of places Shift left by 2 places of Shift right by 2 places of

5 Right Shifts This operation preserves the sign of a number and will divide a binary number by 2 at each shift. It will work for positive and negative numbers. At each shift the right hand bit is lost and a copy of the sign bit is inserted to the left Negative numbers (has a 1 at the start in Two’s complement) - 63 right shift 1 place = - 32 Positive numbers (has a 2 at the start in Two’s complement) Positive integer in Two’s complement: 65 right shift 1 place = 32 _ _100000 Drops out Shifts Copy of Sign Bit _ _100000 Drops out Shifts Copy of Sign Bit

6 Left Shifts Similar to right shifts, but at each shift the sign bit is lost and a 0 bit is moved in to the right. The effect of each shift is to multiply the integer x 2. The process can be repeated until the sign bit is changed, at which point overflow occurs. Negative numbers (has a 1 at the start in Two’s complement) - 64 left shift 1 place = left shift 1 place = left shift 1 place = overflow _ Sign Bit drops out Shifts 0 Bit inserted _ Sign Bit drops out Shifts 0 Bit inserted _ Sign Bit drops out Shifts 0 Bit inserted

7 Graded exercises Complete questions 1-8 of the grade 4 exercises
Extension – use the multiplication and division slides to help you analyse trends on arithmetic shifts 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!

8 Multiplication and division
Arithmetic shifts can be used for division and multiplication Left Shift (Multiplication) Right Shift (Division) When a left shift is performed the number is doubled each time shift. When a right shift is performed the number is halved each shift. Note when the right bit has value i.e. when the shift is applied to an odd number the result is rounded down to the next even integer 1 1 = 51 = 102 = 51 = 25 2 2 = 51 = 204 = 51 = 12

9 Graded exercises Complete questions 8-9 of the Grade 4 exercises
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!

10 Character sets A character can be a letter, digit, space, punctuation mark or various other symbols. When characters are stored on a computer system, they are stored as a binary number. It is important that computer systems recognise that characters can be represented differently by other computer systems; otherwise data could not be exchanged between computers. A character set is a table that maps a character with a unique binary number. A character set is a method of storing the characters and their binary values. This helps different computers convert messages from one to another.

11 ASCII One of the most common character sets is called ASCII.
ASCII is the 7-bit American Standard Code for Information Interchange (ASCII). Denary Binary Hex Character 32 100000 20 space 33 100001 21 ! 34 100010 22 " 35 100011 23 # 36 100100 24 $ 37 100101 25 % 38 100110 26 & 39 100111 27 ' 40 101000 28 (

12 ASCII Table Denary Binary Hex Character 32 100000 20 space 64 1000000
40 @ 96 60 ` 33 100001 21 ! 65 41 A 97 61 a 34 100010 22 " 66 42 B 98 62 b 35 100011 23 # 67 43 C 99 63 c 36 100100 24 $ 68 44 D 100 d 37 100101 25 % 69 45 E 101 e 38 100110 26 & 70 46 F 102 f 39 100111 27 ' 71 47 G 103 g 101000 28 ( 72 48 H 104 h 101001 29 ) 73 49 I 105 i 101010 2A * 74 4A J 106 6A j 101011 2B + 75 4B K 107 6B k 101100 2C , 76 4C L 108 6C l 101101 2D - 77 4D M 109 6D m 101110 2E . 78 4E N 110 6E n 101111 2F / 79 4F O 111 6F o 110000 30 80 50 P 112 p 110001 31 1 81 51 Q 113 q 110010 2 82 52 R 114 r 110011 3 83 53 S 115 s 110100 4 84 54 T 116 t 110101 5 85 55 U 117 u 110110 6 86 56 V 118 v 110111 7 87 57 W 119 w 111000 8 88 58 X 120 x 111001 9 89 59 Y 121 y 111010 3A : 90 5A Z 122 7A z 111011 3B ; 91 5B [ 123 7B { 111100 3C 92 5C \ 124 7C | 111101 3D = 93 5D ] 125 7D } 111110 3E 94 5E ^ 126 7E ~ 111111 3F ? 95 5F _

13 ASCII – The problem The problem with using this ASCII character set is that it is only able to represent 128 different characters and computer systems need to be able to store more characters than this. For example, you may have noticed that the £ character is missing from the table above. As a result, other character sets were developed and used to allow computer systems to store more characters.

14 Unicode Unicode is a standard character set that has combined and replaced many others. It was originally an extension to the ASCII character set and it contains many of the characters used around the world. To see the different characters that are available with Unicode go to – there are too many for this presentation!

15 Graded exercises Complete questions 10-14 of the Grade 4 exercises
Extension: Move on to the grade 5 exam questions – stick these into your book 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!

16 Grade 5-7 Exam Questions Complete the Grade 5-7 exam questions.
The mark schemes for these questions are in the folder, you can use these to help you. But if you do you must put an N next to the question number – this will help you to focus your revision.

17 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 arithmetic shifts and Character Encoding Think about what you have learnt today, what questions you have been asked, definitions of words, or anything else you think is important!

18 Homework Question Sheets: Q23 – Character Sets - ASCII
Q24 – Character Sets - Unicode Exam Questions: Complete your Year 11 target grade Pre-Reading: 45-46 Notes on Sound and Image encoding


Download ppt "Arithmetic Shifts and Character Representation"

Similar presentations


Ads by Google