Data Representation CS Thinking Example 1
Follow the full solution, then compare it with the other examples linked below.
Example 1
easyA computer stores the character 'A' as the number 65 (ASCII). Explain why computers use numbers to represent characters.
Solution
- 1 Step 1: Computers can only store binary numbers (sequences of 0s and 1s).
- 2 Step 2: To store text, each character is assigned a unique number using an encoding scheme like ASCII (A=65, B=66, etc.).
- 3 Step 3: The binary for 65 is 01000001, which is what the computer actually stores. The encoding scheme maps between human-readable characters and binary.
Answer
Computers only store binary numbers. Characters are represented by assigning each a unique number via an encoding scheme like ASCII.
Character encoding is a fundamental concept in data representation. ASCII uses 7 bits (128 characters), while Unicode extends this to represent characters from all writing systems worldwide.
About Data Representation
The way information—numbers, text, images, and sound—is encoded as binary digits (0s and 1s) inside a computer. Different encoding schemes map real-world data to binary patterns, such as ASCII/Unicode for text, RGB for colors, and sampling for audio.
Learn more about Data Representation →More Data Representation Examples
Example 2 medium
Explain how a computer represents a colour image using binary. What are pixels and colour depth?
Example 3 mediumSound is analogue but computers are digital. Describe how analogue sound is converted to digital for
Example 4 hardExplain the difference between lossless and lossy compression. Give an example of each and explain w