Digital data - CCEACharacter sets

What is digital data, and how do computers understand it? How is digital data represented, stored, shared and manipulated?

Part ofDigital Technology (CCEA)Digital development concepts (programming)

Character sets

All data is stored inside a computer as numbers. Each character in text is stored as a binary number.

A common way to do this is to use American Standard Code for Information Interchange (ASCII).

This is just a standard for representing letters in binary. For example, 01000001 (65₁₀) is A, 01000010 (66₁₀) is B, etc. The total amount of characters a computer can use is called the character set.

ASCII table

CodeCharacterCodeCharacterCodeCharacterCodeCharacter
032Space64@96
133!65A97a
23466B98b
335#67C99c
436$68D100d
537%69E101e
638&70F102f
7Bell3971G103g
8Backspace40(72H104h
941)73I105i
10New line42*74J106j
1143+75K107k
12New page44,76L108l
13Return45-77M109m
14Shift (in)46.78N110n
15Shift (out)47/79O111o
1648080P112p
1749181Q113q
1850282R114r
1951383S115s
2052484T116t
2153585U117u
2254686V118v
2355787W119w
2456888X120x
2557989Y121y
2658:90Z122z
27Escape59;91[123{
2860 ˂ 92\124|
2961=93]125}
3062 ˃ 94^126~
3163?95_127_
Code0
Character
Code32
CharacterSpace
Code64
Character@
Code96
Character
Code1
Character
Code33
Character!
Code65
CharacterA
Code97
Charactera
Code2
Character
Code34
Character
Code66
CharacterB
Code98
Characterb
Code3
Character
Code35
Character#
Code67
CharacterC
Code99
Characterc
Code4
Character
Code36
Character$
Code68
CharacterD
Code100
Characterd
Code5
Character
Code37
Character%
Code69
CharacterE
Code101
Charactere
Code6
Character
Code38
Character&
Code70
CharacterF
Code102
Characterf
Code7
CharacterBell
Code39
Character
Code71
CharacterG
Code103
Characterg
Code8
CharacterBackspace
Code40
Character(
Code72
CharacterH
Code104
Characterh
Code9
Character
Code41
Character)
Code73
CharacterI
Code105
Characteri
Code10
CharacterNew line
Code42
Character*
Code74
CharacterJ
Code106
Characterj
Code11
Character
Code43
Character+
Code75
CharacterK
Code107
Characterk
Code12
CharacterNew page
Code44
Character,
Code76
CharacterL
Code108
Characterl
Code13
CharacterReturn
Code45
Character-
Code77
CharacterM
Code109
Characterm
Code14
CharacterShift (in)
Code46
Character.
Code78
CharacterN
Code110
Charactern
Code15
CharacterShift (out)
Code47
Character/
Code79
CharacterO
Code111
Charactero
Code16
Character
Code48
Character0
Code80
CharacterP
Code112
Characterp
Code17
Character
Code49
Character1
Code81
CharacterQ
Code113
Characterq
Code18
Character
Code50
Character2
Code82
CharacterR
Code114
Characterr
Code19
Character
Code51
Character3
Code83
CharacterS
Code115
Characters
Code20
Character
Code52
Character4
Code84
CharacterT
Code116
Charactert
Code21
Character
Code53
Character5
Code85
CharacterU
Code117
Characteru
Code22
Character
Code54
Character6
Code86
CharacterV
Code118
Characterv
Code23
Character
Code55
Character7
Code87
CharacterW
Code119
Characterw
Code24
Character
Code56
Character8
Code88
CharacterX
Code120
Characterx
Code25
Character
Code57
Character9
Code89
CharacterY
Code121
Charactery
Code26
Character
Code58
Character:
Code90
CharacterZ
Code122
Characterz
Code27
CharacterEscape
Code59
Character;
Code91
Character[
Code123
Character{
Code28
Character
Code60
Character ˂
Code92
Character\
Code124
Character|
Code29
Character
Code61
Character=
Code93
Character]
Code125
Character}
Code30
Character
Code62
Character ˃
Code94
Character^
Code126
Character~
Code31
Character
Code63
Character?
Code95
Character_
Code127
Character_

7-bit ASCII

Bytes are frequently used to hold individual characters in a text document. In the character set, each binary value between 0 and 127 is given a specific character. This means we have a total of 128 different characters (remember we begin at 0).

8-bit (extended) ASCII

Most computers extend the ASCII character set to use the full range of 256 characters available in a byte. The upper 128 characters handle special things like accented characters from common foreign languages, or symbols such as é or ©.

Unicode

Some languages use a completely different alphabet to the English language alphabet. It would be impossible to use ASCII (7 bit) or Extended ASCII (8bit) to create all the additional characters needed for these alphabets.

Unicode can assign a lot more characters. The 1-byte system used in 8-bit ASCII can only represent up to 256 characters. Unicode uses a 2-byte system for each character, which means that more than 65,000 characters can be represented.

This allows us to represent all the characters needed in languages such as Japanese or Greek, the Cyrillic alphabets or Braille.

Data types

Data typeDescriptionExample data
IntegerThese are whole numbers only0, 1, 2, 3
Real/FloatThese are numbers that can have a decimal part0.1, 1.2, 3.4, 5.0
BooleanThis has two values onlyTrue/False, 1/0, Y/N
CharacterThis is a single letter, number or symbolA, B, C, @, *
StringThis is used for text, and can include any characterDigital Technology, aeg54jklM
Date/TimeUsed for dates and times20:55 29/11/2016
Data typeInteger
DescriptionThese are whole numbers only
Example data0, 1, 2, 3
Data typeReal/Float
DescriptionThese are numbers that can have a decimal part
Example data0.1, 1.2, 3.4, 5.0
Data typeBoolean
DescriptionThis has two values only
Example dataTrue/False, 1/0, Y/N
Data typeCharacter
DescriptionThis is a single letter, number or symbol
Example dataA, B, C, @, *
Data typeString
DescriptionThis is used for text, and can include any character
Example dataDigital Technology, aeg54jklM
Data typeDate/Time
DescriptionUsed for dates and times
Example data20:55 29/11/2016