Data Representation
Data representation is the study of how different kinds of information - numbers, text, images, sound - are stored inside a computer using only 0s and 1s. ...
How Data Is Stored as Bits
Data representation is the study of how different kinds of information - numbers, text, images, sound - are stored inside a computer using only 0s and 1s. The smallest unit is the bit (a single 0 or 1). Eight bits make one byte, and a byte can represent 256 different values. Larger units follow: kilobyte, megabyte, gigabyte and so on. Everything you see on screen is ultimately a pattern of bits interpreted according to an agreed code.
Encoding Text and Numbers
Text is stored using character encoding schemes. ASCII uses 7 or 8 bits per character and covers English letters, digits and symbols; for example capital A is 65. Unicode (and its common form UTF-8) extends this to cover almost every language and emoji in the world, which is why it is now the standard. Numbers can be stored as integers (whole numbers) or as floating-point values for decimals. Signed integers often use a method called two's complement to represent negative numbers, allowing subtraction to be done using addition circuits.
Example and Exam Tip
Example: The word "Hi" is stored as the ASCII codes 72 and 105, which in binary are 01001000 and 01101001. Exam tip: remember the unit ladder (8 bits = 1 byte, 1024 bytes = 1 KB) and be ready to explain the difference between ASCII and Unicode in two or three lines. A frequent question asks why Unicode replaced ASCII - the answer is that ASCII could not represent non-English scripts, while Unicode assigns a unique code point to every character across all languages.