top of page
Image by Alexander Grey

ASCII & Unicode

Unit 5 Summary - part 1

Image by Nareeta Martin
Image by Annie Spratt
Image by Kenrick Mills

ASCII has 128 characters and 7 bits of binary.

2560px-ASCII-Table-wide.svg.png

An example of finding ASCII codes.

Image by Scott Webb
Lesson10_Slide01.jpg
Image by Krystal Ng
Image by Adrian Infernus
Unicode is invented because ASCII doesn't support these:

1. Other languages' writings.
2. Vowels & consonants accents.
3. icons, emoticons, emojis

 

Every letter we type can be ASCII or Unicode.
ASCII is included in Unicode, that's why Python uses Unicode.
Image by J Lee
Image by Pawel Czerwinski
To find a character's Unicode, use ord on Python:
​

Character = input("Enter a single character: ")

if len(Character)>1:

    Character = Character[0]

print("the character", Character, "has the ASCII or Unicode value", ord(Character))

​

​
To find a Unicode's character, use chr on Python:
 

Code = input("Enter a Unicode value: ")

Code = int(Code)

print("The Unicode value", Code, "represents the character",chr(Code)) 

Image by Alexander Grey

Oxford AQA IGCSE 2019

Image by Pawel Czerwinski

10.1.

The ASCII code of the character 'A' is 65 in decimal.

A memory location contains the binary pattern 1000101 This binary pattern is for an ASCII code.

What character does this binary pattern represent? [1 mark]

​

__________________________________________________________________________________

​

Answer:

Put the binary in this table:

Binary.png

Start calculating every top row that has 1 in it: 64+4+1 = 69

If A is 65, that means 69 is E.

Image by Kseniya Lapteva

10.2.

State two advantages of Unicode compared to ASCII. [2 marks]

​

__________________________________________________________________________________

​

Alternative answers:

  • Can represent more characters / can represent special characters

  • Can represent alphabets with lots of characters / can represent multiple/different alphabets;

  • Unlike ASCII, Unicode is consistent across countries;

Image by Alexander Grey

Oxford AQA IGCSE 2020

Image by Pawel Czerwinski

11.1.

The ASCII character code for a is 1100001

Complete the table below to show how the string cab would be encoded as a bit pattern using ASCII. [2 marks]

​

__________________________________________________________________________________

​

ASCII 2020.png

Answers:

You don't need to calculate

"a" = 1100001

 

Always add from the right. To add 1, change the right 0 into 1, and change the end right to 0. 

"b" = 1100010

​

The same goes to c. To add 1, change the right 0 into 1.

"c" = 1100011

 

Image by Pawel Czerwinski

11.2.

How many different characters can be encoded using ASCII? [1 mark]

​

__________________________________________________________________________________

​

Answers:

Normal ASCII only has 7 bits. The answer is 128. Remember this.

​

Because if you start creating this column:

Binary.png

Put all 1 in all columns, you'll get this calculation:

64+32+16+8+4+2+1 = 127 and one more character of index number 0, so it's 128.

Candy Cotton

Oxford AQA IGCSE Specimen Paper

1.6.

ASCII uses 7 bits to represent a character. How many different characters can be represented using ASCII? [1 mark]

​

Final Answer:

__________________________________________________________________________________

​

​

1.7.

How many extra bits would be needed to represent twice as many characters as ASCII can represent? [1 mark]

​

Final Answer:

__________________________________________________________________________________

Image by Codioful (Formerly Gradienta)

Oxford AQA IGCSE Mock Paper

1.3.

The ASCII code of the letter ‘A’ is 65 in decimal.

What is the ASCII code of the letter ‘D’ in binary? [1 mark]

​

__________________________________________________________________________________

Image by Pawel Czerwinski
Visconsio Nekoland Logo.jpg
PT. Visconsio Kaya Jaya Masyhur

© 2020-2023 by Miana Kitty

bottom of page