Character Sets, Data Storage, and Memory Types
This page provides an in-depth overview of various aspects of computer data representation and storage, including character sets, sound and image storage, compression techniques, and memory types.
Character Sets
Character sets allow computers to understand letters, numbers, and other characters. They are logically ordered, with lower values assigned to earlier characters.
Definition: ASCII (American Standard Code for Information Interchange) is a character encoding standard that assigns unique binary codes to characters.
ASCII uses 8 bits (1 byte) per character, allowing for 256 possible characters.
Highlight: Unicode uses 2 bytes per character, accommodating languages with thousands of characters, such as Arabic.
Storing Sound
Sound must be encoded into binary for computers to process it. This involves breaking down audio into thousands of samples per second, each stored as binary data.
Key factors in sound storage:
-
Sample rate: Measured in Hz, it determines how many samples are taken per second. Higher sample rates result in clearer sound but require more storage space.
-
Bit depth: The number of bits available for each sample. Higher bit depth improves quality but increases storage requirements.
-
Duration: Longer audio naturally requires more storage space.
Example: To calculate a sound file size, use the formula: file size = sample rate × duration (s) × bit depth
Storing Images
Images are stored as a series of pixels in binary, with each pixel represented by a specific color code.
Vocabulary: Resolution refers to the number of pixels in an image. Higher resolution results in clearer images but requires more storage space.
Color depth is the number of bits used to store the color for each pixel. Higher color depth allows for more realistic colors but increases file size.
Example: To calculate an image file size, use the formula: file size = color depth × image height (px) × image width (px)
Compression
Compression is the process of encoding data to reduce its size, thus saving storage space. There are two main types:
-
Lossless Compression: Compresses data without losing information, allowing for perfect reconstruction of the original data.
-
Lossy Compression: Reduces file size by discarding some information, resulting in smaller files but with some loss of quality.
Memory Types
The document discusses two primary types of computer memory:
-
RAM (Random Access Memory):
- Volatile (loses data when power is off)
- Used for currently open programs
- Faster than secondary storage
- More expensive per GB than HDDs or SSDs
-
ROM (Read Only Memory):
- Non-volatile (retains data when power is off)
- Contains instructions for booting the computer
- Data is written permanently during manufacturing
Highlight: Virtual memory is simulated memory written to a file on the hard drive, allowing more applications to run than physical RAM can support.
The page also covers data storage units, binary-to-hexadecimal conversion, and factors to consider when choosing storage media, such as capacity and speed.