Low-level operations and computer architectureText

All data is stored in computers using 1s and 0s (bits). We explain how much data we are storing by using terms like kilobytes and megabytes.

Part ofComputing ScienceSoftware design and development

Text

To store text in a computer we give each character its own special number. This number is called its code. We can then store this code in the computer using binary ones and zeros, as described in the previous section.

There are several different ways of giving characters codes, but the most popular one is called ASCII.

Pronounced 'ask-ee', ASCII stands for American Standard Code for Information Interchange. With ASCII, each letter, number or symbol is given a number code from 0 to 127.

For example, the ASCII code for uppercase A is 65 and for lowercase a is 97. Most computers use ASCII codes to represent text, which makes it possible to transfer data from one computer to another.

Here is a table of ASCII codes:

CodeCharacterCodeCharacterCodeCharacterCodeCharacter
033!66B99c
134"67C100d
235#68D101e
336$69E102f
437%70F103g
538&71G104h
639'72H105i
7Bell40(73I106j
8Backspace41)74J107k
942*75K108l
10New line43+76L109m
1144,77M110n
12New page45-78N111o
13Return46.79O112p
14Shift (in)47/80P113q
15Shift (out)48081Q114r
1649182R115s
1750283S116t
1851384T117u
1952485U118v
2053586V119w
2154687W120x
2255788X121y
2356889Y122z
2457990Z123{
2558:91[124|
2659;92\125}
27Escape60˂93]126~
2861=94^127_
2962˃95_
3063?96'
3164@97a
32Space65A98b
Code0
Character
Code33
Character!
Code66
CharacterB
Code99
Characterc
Code1
Character
Code34
Character"
Code67
CharacterC
Code100
Characterd
Code2
Character
Code35
Character#
Code68
CharacterD
Code101
Charactere
Code3
Character
Code36
Character$
Code69
CharacterE
Code102
Characterf
Code4
Character
Code37
Character%
Code70
CharacterF
Code103
Characterg
Code5
Character
Code38
Character&
Code71
CharacterG
Code104
Characterh
Code6
Character
Code39
Character'
Code72
CharacterH
Code105
Characteri
Code7
CharacterBell
Code40
Character(
Code73
CharacterI
Code106
Characterj
Code8
CharacterBackspace
Code41
Character)
Code74
CharacterJ
Code107
Characterk
Code9
Character
Code42
Character*
Code75
CharacterK
Code108
Characterl
Code10
CharacterNew line
Code43
Character+
Code76
CharacterL
Code109
Characterm
Code11
Character
Code44
Character,
Code77
CharacterM
Code110
Charactern
Code12
CharacterNew page
Code45
Character-
Code78
CharacterN
Code111
Charactero
Code13
CharacterReturn
Code46
Character.
Code79
CharacterO
Code112
Characterp
Code14
CharacterShift (in)
Code47
Character/
Code80
CharacterP
Code113
Characterq
Code15
CharacterShift (out)
Code48
Character0
Code81
CharacterQ
Code114
Characterr
Code16
Character
Code49
Character1
Code82
CharacterR
Code115
Characters
Code17
Character
Code50
Character2
Code83
CharacterS
Code116
Charactert
Code18
Character
Code51
Character3
Code84
CharacterT
Code117
Characteru
Code19
Character
Code52
Character4
Code85
CharacterU
Code118
Characterv
Code20
Character
Code53
Character5
Code86
CharacterV
Code119
Characterw
Code21
Character
Code54
Character6
Code87
CharacterW
Code120
Characterx
Code22
Character
Code55
Character7
Code88
CharacterX
Code121
Charactery
Code23
Character
Code56
Character8
Code89
CharacterY
Code122
Characterz
Code24
Character
Code57
Character9
Code90
CharacterZ
Code123
Character{
Code25
Character
Code58
Character:
Code91
Character[
Code124
Character|
Code26
Character
Code59
Character;
Code92
Character\
Code125
Character}
Code27
CharacterEscape
Code60
Character˂
Code93
Character]
Code126
Character~
Code28
Character
Code61
Character=
Code94
Character^
Code127
Character_
Code29
Character
Code62
Character˃
Code95
Character_
Code
Character
Code30
Character
Code63
Character?
Code96
Character'
Code
Character
Code31
Character
Code64
Character@
Code97
Charactera
Code
Character
Code32
CharacterSpace
Code65
CharacterA
Code98
Characterb
Code
Character
Translating the letter A into Binary.

Each ASCII character is made up of eight bits in total but only uses seven of these bits to represent a character. One bit is used for error checking during transmission, this is known as a parity bit.

This means that ASCII code only allows for the representation of 128 characters. In order to represent more character sets, it is possible to use Unicode instead of ASCII. Unicode allows for the representation of up to 65, 536 characters.