Discussion prompt
20 minutes. Choose a file you use often (a text note, a photograph or a spreadsheet). In 150 to 200 words, explain what is stored as bits, which code or table gives the bits their meaning, and roughly how its size could be estimated.
Private: nothing you type here is sent or stored.
This course has no discussion board yet, so the prompt is a private reflection.
Recap
- A bit is 0 or 1; binary place values double from the right.
- n bits hold 2 to the power n patterns, from 0 to one less than that.
- Convert decimal to binary by repeated division by 2, reading remainders from last to first.
- Text is stored through a code table such as ASCII or Unicode; images are grids of pixels with colour values.
- Uncompressed image size = pixels × bytes per pixel; 1 byte = 8 bits.
Module notes
Key terms. Bit: a single 0 or 1. Byte: 8 bits. Binary: numbers written with 0 and 1. ASCII: an early character code. Unicode: a large character code covering world scripts. Pixel: one square of an image. Compression: storing data in fewer bits.
Rules and formulas. Patterns with n bits = 2 to the power n. Largest value = that number minus 1. Image bytes = pixels × bytes per pixel. Bytes × 8 = bits.
Limits of this module. This module covers non-negative whole numbers, simple character codes and uncompressed image size. Negative numbers, fractions, audio, video and real file formats are outside its scope.
Next
Continue to Module 3: Logic and Decisions. You can also return to the course overview or the University Track.
References and further reading
- Specialty Digest encyclopedia: Computer, Algorithm and Programming Language.
- ASCII and Unicode are public standards; the examples here use only the widely documented codes for A (65), a (97) and the digit 0 (48).
- All sizes and readings in this module are invented for teaching and labelled as such.