Grade 10 · Theory
Digital character and primitive data types
Data representation, storage and social implications · about 4 min
Everything a computer stores — text, numbers, images — is ultimately encoded as binary. Programming languages give us primitive data types so the computer knows how to interpret those bits.
Key points- Character encoding maps characters to numbers: ASCII (128 characters) and Unicode/UTF-8 (all the world's scripts).
- Common primitive types: integer (whole numbers), real/float (decimals), boolean (true/false), char (one character), string (text).
- Choosing the right type saves memory and prevents errors (age → integer, price → real, name → string).
- Type ranges matter: an integer type has a maximum value it can hold.
- ASCII — the classic 7-bit character encoding standard.
- Unicode — a universal encoding covering virtually all characters and emoji.
- Boolean — a type with only two values: true or false.
EXAM TIP
given a list of fields (e.g. from a form), choose and justify a data type for each — justify with one short reason.