Computers hold every kind of data as binary digits. This topic covers binary numbers and how text, images and sound are stored.
AND gives true only when both inputs are true. OR gives true when at least one is. NOT reverses its input.
Boolean logic works inside the circuits of a processor, and again in programs, where the condition of an if or a while is either true or false.
Binary is base 2 and uses only 0 and 1. A single 0 or 1 is a bit, four bits are a nibble and eight are a byte.
Each column has a place value: 1, 2, 4, 8, 16, 32, 64, 128 reading right to left. Denary is the base-10 system we normally use, and hexadecimal is base 16, using 0 to 9 then A to F.
To convert binary to denary, add the place values of the columns holding a 1: 1001 is 8 + 1, which is 9.
To convert denary to binary, take each place value in turn from the largest that fits. Hexadecimal A is denary 10, and binary 1111 is hexadecimal F.
ASCII represents text characters, and Unicode covers a far wider range of writing systems.
An image is a grid of pixels, and colour depth is the number of bits per pixel, so 2 bits give 4 colours. Resolution is the pixel width multiplied by the height.
Sound is stored by sampling: a higher sampling rate, such as 44.1 kHz, and a higher bit rate give better quality and a larger file. Storage is measured in multiples of a thousand, so 1 KB is 1000 bytes and 1 MB is 1000 KB.
Compression makes a file smaller. Lossy compression discards some data permanently, giving a much smaller file. Lossless compression keeps everything, so the original can be restored exactly.
Back to Binary and Data practice ยท View all Binary and Data questions