Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
109 views

Coding Systems - ASCII and Unicode

The document discusses two common character coding schemes: ASCII and Unicode. ASCII uses 7-bit binary to represent 128 characters, while Unicode superseded ASCII and can represent many more characters from different languages using more bits. The document also provides information on the workings and limitations of ASCII, and how Unicode addressed these limitations by supporting more languages.

Uploaded by

Ibrahim Abdulali
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
109 views

Coding Systems - ASCII and Unicode

The document discusses two common character coding schemes: ASCII and Unicode. ASCII uses 7-bit binary to represent 128 characters, while Unicode superseded ASCII and can represent many more characters from different languages using more bits. The document also provides information on the workings and limitations of ASCII, and how Unicode addressed these limitations by supporting more languages.

Uploaded by

Ibrahim Abdulali
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 23

LO: Exploring how coding systems are used

Starter

• Using the link post in note, outline the key points from coding
systems (ASCII and Unicode) from GCSE.

• Feel free to discuss your points with others.

Success Criteria
Explain the what the two most common character coding schemes used in computing.
Describe the advantages and disadvantages of both of the character coding schemes.
Explain the workings for both character sets and alternative versions of each
LO: Exploring how coding systems are used

AQA Computer Science


AS Paper 02
Data Representation
26. Coding Systems
3.5.5.1 – 3.5.6

Success Criteria
Explain the what the two most common character coding schemes used in computing.
Describe the advantages and disadvantages of both of the character coding schemes.
Explain the workings for both character sets and alternative versions of each
LO: Exploring how coding systems are used

Coding Systems
LO: Exploring how coding systems are used

Success Criteria

• Explain the what the two most common character coding schemes used in
computing.

• Describe the advantages and disadvantages of both of the character coding


schemes.

• Explain the workings for both character sets and alternative versions of
each
Success Criteria
Explain the what the two most common character coding schemes used in computing.
Describe the advantages and disadvantages of both of the character coding schemes.
Explain the workings for both character sets and alternative versions of each
LO: Exploring how coding systems are used

Coding Systems

• Most computers can only understand binary and we often need to


store numbers, letters and characters.

• To do this, a computer will use a coding systems/schemes.

• The most popular coding schemes are ASCII and UNICODE.

You need to know how each works and the benefits and drawbacks of
using them. (Many parts of this ppt and the text books have
information that can support this)

Success Criteria
Explain the what the two most common character coding schemes used in computing.
Describe the advantages and disadvantages of both of the character coding schemes.
Explain the workings for both character sets and alternative versions of each
LO: Exploring how coding systems are used

ASCII and Unicode


• A standard method for the representation of all the keyboard
characters, including the numbers, and other commonly used
functions in ASCII or the American Standard Code for Information
Interchange.

• The most recent version is an 8-bit code allowing for 256 characters.
However 7-bit is more common. So if it 7 or 8 bit? (next slide)

• ASCII values can take many forms:


• Numbers
• Letters (capitals and lower case are separate)
• Punctuation (?/|\£$ etc.)
• non-printing commands (enter, escape, F1)

Success Criteria
Explain the what the two most common character coding schemes used in computing.
Describe the advantages and disadvantages of both of the character coding schemes.
Explain the workings for both character sets and alternative versions of each
LO: Exploring how coding systems are used
ASCII table – is it really 8 bits?
• ASCII normally uses 8 bits (1 byte) to store each character.

• The 8th bit is used as a check digit, meaning that only 7 bits are available to
store each character. (ASCII table on next slide)

• How many different values can ASCII store?


• 2^7 = 128 different values

There is also extended ASCII that uses the


8th bit to store data, allowing for a much
Success Criteria
larger character set, but for the exam you'll
Explain the what the two most common character coding schemes used in computing.
Describe the advantages and disadvantages of bothbe fine
of the with 7coding
character bit parity ASCII
schemes.
Explain the workings for both character sets and alternative versions of each
LO: Exploring how coding systems are used

ASCII & Unicode

• The limitations of ASCII:

• 256 characters (extended ASCII) are not sufficient to represent all of the
possible characters, numbers and symbols.

• It was initially developed in English and therefore did not represent all of the
other languages and scripts in the world.

• Widespread use of web made it more important to have universal


international coding system.

• The range of platforms and program has increased dramatically with more
developers from around the world using a much wider range of characters.

Success Criteria
Explain the what the two most common character coding schemes used in computing.
Describe the advantages and disadvantages of both of the character coding schemes.
Explain the workings for both character sets and alternative versions of each
LO: Exploring how coding systems are used

ASCII & Unicode

• Unicode is being constantly developed and updated to include more


of the ‘diverse languages of the modern world.’ eg Chinese or Arabic
different to English
OR
• German, Spanish including containing different characters not found
on international English keyboards

• It is important that any new standard is universally adopted, which


in this case involves everyone in the computing industry throughout
the world.

Success Criteria
Explain the what the two most common character coding schemes used in computing.
Describe the advantages and disadvantages of both of the character coding schemes.
Explain the workings for both character sets and alternative versions of each
LO: Exploring how coding systems are used
ASCII Table

As you can see, a = 97, b = 98, c = 99. This


means that if we are told what value a
character is we can easily work out the
value of subsequent or prior characters.

Success Criteria
Explain the what the two most common character coding schemes used in computing.
Describe the advantages and disadvantages of both of the character coding schemes.
Explain the workings for both character sets and alternative versions of each
LO: Exploring how coding systems are used

Quick Question

• The ASCII character code in binary for F is 01000110, what


would the binary character code be for the letter G?

Success Criteria
Explain the what the two most common character coding schemes used in computing.
Describe the advantages and disadvantages of both of the character coding schemes.
Explain the workings for both character sets and alternative versions of each
LO: Exploring how coding systems are used

Key words

Keyword
Unicode: a standard binary coding system that has superseded ASCII

Success Criteria
Explain the what the two most common character coding schemes used in computing.
Describe the advantages and disadvantages of both of the character coding schemes.
Explain the workings for both character sets and alternative versions of each
LO: Exploring how coding systems are used

Activity 1 – Quick Quiz Question

• How many ASCII ‘characters’ does the following piece of text use?

Hello Mate,
ASCII rocks!

Success Criteria
Explain the what the two most common character coding schemes used in computing.
Describe the advantages and disadvantages of both of the character coding schemes.
Explain the workings for both character sets and alternative versions of each
LO: Exploring how coding systems are used

Activity 1 – Quick Quiz Question


ANSWER

• How many ASCII ‘characters’ does the following piece of text use?

Hello Mate,
ASCII rocks!

Hello Mate,[EOL][CR]
ASCII rocks![EOL]

Success Criteria
Explain the what the two most common character coding schemes used in computing.
Describe the advantages and disadvantages of both of the character coding schemes.
Explain the workings for both character sets and alternative versions of each
LO: Exploring how coding systems are used
UNICODE
• The problem with ASCII is that only allows us to use a small number of
characters (128 or 256 for extended ASCII).

• This is okay for English speaking countries but what happens if you live
in a country that uses a different character set?

• Chinese characters  汉字
• Japanese characters  漢字
• Cyrillic Кири́ллица
• Gujarati ગુજરાતી
• Urdu ‫ا‬ You can see that we quickly run into trouble
as ASCII can't possibly store these hundreds
of thousands of extra characters in just 7 bits.

What we use instead is unicode. There are


several versions of unicode, each with using a
Success Criteria
different
Explain the what the two most common character coding schemes used number of bits to store data:
in computing.
Describe the advantages and disadvantages of both of the character coding schemes.
Explain the workings for both character sets and alternative versions of each
LO: Exploring how coding systems are used

ASCII & Unicode

• As a result, a new standard called Unicode has emerged which follows the
same basic principles as ASCII in that in one of its forms it has a unique 8-bit
code for every keyboard character on a standard English keyboard.

• ASCII codes have been subsumed within Unicode meaning that the ASCII
code for capital letter A is 65 and so is the Unicode code for the same
character. Unicode also includes international characters or over 29 countries
and even includes conversions of classical and ancient characters.

• To represent these extra characters it is obviously necessary to use more than


8 bits per character and there are two common encodings of Unicode in use
today (UTF-8 and UTF-16). As the name suggests the latter is a 16-bit code.

Keyword
Success Criteria
Unicode: a standard binary coding system that has superseded ASCII
Explain the what the two most common character coding schemes used in computing.
Describe the advantages and disadvantages of both of the character coding schemes.
Explain the workings for both character sets and alternative versions of each
LO: Exploring how coding systems are used
UNICODE

Success Criteria
Explain the what the two most common character coding schemes used in computing.
Describe the advantages and disadvantages of both of the character coding schemes.
Explain the workings for both character sets and alternative versions of each
LO: Exploring how coding systems are used
Activity 2 – ASCII and UNICODE
• Complete the questions on ASCII and UNICODE. Write the answers in your
exercise book.

1. The ASCII code for the letter ‘D’ is 100 0100, what is the letter ‘G’ stored as?

2. The ASCII code for the letter 's' is 111 0011, what is the letter 'm' stored as?

3. Give a benefit of using ASCII?

4. Give a benefit of using Unicode over ASCII?

5. How many different characters can 7-bit ASCII represent?

6. You are designing a computer system for use worldwide, what character
encoding scheme should you use and why?
Success Criteria
Explain the what the two most common character coding schemes used in computing.
Describe the advantages and disadvantages of both of the character coding schemes.
Explain the workings for both character sets and alternative versions of each
LO: Exploring how coding systems are used

Activity 2 – ASCII and UNICODE ANSWERS


1. The ASCII code for the letter ‘D’ is 100 0100, what is the letter ‘G’ stored as?
100 0111 - as it is 3 characters further on in the alphabet

2. The ASCII code for the letter 's' is 111 0011, what is the letter 'm' stored as?
110 1101 - as it is 6 characters down in the alphabet

3. Give a benefit of using ASCII?


Each character only takes up 8 bits, meaning that storing data in ASCII may take up less memory than Unicode
4. Give a benefit of using unicode over ASCII?
ASCII stores a much smaller character set than Unicode, meaning that you are limited to the Latin character set and
cannot represent characters from other languages.

5. How many different characters can 7-bit ASCII represent?


2^7 = 128

6. You are designing a computer system for use worldwide, what character encoding scheme should you use and
why?
Unicode as it would allow you to display non Latin character sets such as Hindi and Cyrillic

Success Criteria
Explain the what the two most common character coding schemes used in computing.
Describe the advantages and disadvantages of both of the character coding schemes.
Explain the workings for both character sets and alternative versions of each
LO: Exploring how coding systems are used

Coding ASCII

• CHR(integer) = converts ASCII code to character

• Asc(character) = converts character to ASCII code

Success Criteria
Explain the what the two most common character coding schemes used in computing.
Describe the advantages and disadvantages of both of the character coding schemes.
Explain the workings for both character sets and alternative versions of each
LO: Exploring how coding systems are used

Activity 3

• Write notes from this presentation and pages 207-209 (not including
error checking)

• Remember you may be asked how ASCII and/or Unicode work and
the benefits and drawbacks of using them.

Success Criteria
Explain the what the two most common character coding schemes used in computing.
Describe the advantages and disadvantages of both of the character coding schemes.
Explain the workings for both character sets and alternative versions of each
LO: Exploring how coding systems are used

Activity 4

• Complete the worksheet

Success Criteria
Explain the what the two most common character coding schemes used in computing.
Describe the advantages and disadvantages of both of the character coding schemes.
Explain the workings for both character sets and alternative versions of each
LO: Exploring how coding systems are used

Activity 5 – Coding ASCII

• Write a program in Python that takes and encrypts the string “Hello AS Computer
Science”.

• The program must encrypt using an offset of 30.

• The program must not encrypt spaces it must leave them in as spaces.

• Extension:
• Extend this program to read in the string from a text file and write the encrypted string to another
external file.

• Put your code into a function called Encrypt

• Create another function called Decrypt that will revert the string back to its original form.

Success Criteria
Explain the what the two most common character coding schemes used in computing.
Describe the advantages and disadvantages of both of the character coding schemes.
Explain the workings for both character sets and alternative versions of each
LO: Exploring how coding systems are used
💣 Make this a short term
target. i.e can you have
How are you going to 1
find out? found out what you need
thing to by next lesson?
Try 3 before (asking) I need to
me! find out
more about
You could …
1. Look in your
2 new things class/text book
I learnt today 2. Use a dictionary
3. Ask a friend

3 things I knew already, but now


understand better.


Success Criteria

Explain the what the two most common character coding schemes used in computing.
Describe the advantages and disadvantages of both of the character coding schemes.
Explain the workings for both character sets and alternative versions of each

You might also like