Data Representation - AQA Computer Science Cheat Sheet: by Via

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Data Representation - AQA Computer Science Cheat Sheet

by [deleted] via cheatography.com/56036/cs/15729/

Number Bases Binary Addition

Denary Base 10.


or
Deci​‐
mal
Binary Base 2. Used by computers to represent all data and
instru​ctions. Uses 1s and 0s to powers of 2 to represent
whole numbers.
Hexa​‐ Base 16. Used in computing because more values can be
dec​‐ repres​ented by fewer charac​ters. This makes it easier for
imal humans to read and unders​tand.
Image: http:/​/ch​ort​le.c​cs​u.e​du/​ass​emb​lyt​uto​ria​l/C​hap​ter​-08​/as​s08​‐
_3.html
Converting Between Number Bases

Denary to Divide by 2, then read the remainders backwards. Binary Shifts


Binary
Binary to Multiply the binary numbers (i.e. every single digit) by
Denary the relevant place value, then add all of these together.
Denary to Divide by 16, then read the divisors and remainder
Hexa​dec​‐ backwards. Then convert digits to hex digits.
imal
Hexa​dec​‐ 1. Separate the hex digits Binary shifts can be used for multip​lic​ation and division by powers
imal to 2. Convert each digit to binary of two.
Denary 3. Concat​enate, then convert to denary
Binary to Convert to denary, then hex. Image: http:/​/wi​ki.s​ch​ool​cod​ers.co​m/g​cse​/da​ta-​rep​res​ent​ati​on/​num​‐
Hexa​dec​‐ ber​s/b​ina​ry-​shift/
imal
Units of Inform​ation
Hexa​dec​‐ Convert to denary, then binary.
imal to Bit b A single binary digit.
Binary Byte B 8 bits.
Kilobyte kB 1,000 bytes

Megabyte MB 1,000 kilobytes.


Gigabyte GB 1,000 Megabytes.
Terabyte TB 1,000 Gigabytes.

By [deleted] Published 14th May, 2018. Sponsored by Readable.com


cheatography.com/deleted- Last updated 14th May, 2018. Measure your website readability!
56036/ Page 1 of 2. https://readable.com
Data Representation - AQA Computer Science Cheat Sheet
by [deleted] via cheatography.com/56036/cs/15729/

ASCII vs Unicode Data Compre​ssion

What is ASCII? Data compre​ssion is used to reduce file size, which means that
A character set that uses 7 bits, so can represent up to 128 they take up less storage space. Lossy compre​ssion is where some
charac​ters; this means that only Latin letters can be used (i.e. data is removed - this means that an image would lose some detail.
charac​ter​s/l​etters from other languages can't be repres​ented). Loss​less compre​ssion preserves all of the inform​ation.
However, it takes up less space that Unicode.
Run length encoding (RLE) uses data frequency pairs to reduce
What is Unic​ode?
the amount of data stored. It does so by stating the character and
Unicode is also a character set, but it can represent many, many then the length of the run. Example:
values, including non-La​tin​-based languages. 1001 1111 0101 can be shown as 1 1 2 0 5 1 1 0 1 1 1 0 1 1

Repres​enting Images Huffman coding is more efficient than RLE. It is also lossless. It

Pixel A single point in a graphical issues. Short for 'picture finds the frequency of each data item to create a Huffman tree, which

element'. assigns the most frequent items the shortest code. When you move
down a branch to the left, a 0 is assigned. When you move to the
Bitmap A grid of pixels, with each pixel repres​ented by a binary
right, a 1 is assigned.
number.
total bits needed = number of bits needed per character x number of
Colour Number of colours that can (not necess​arily are) be
characters
depth repres​ented in an image, and the corres​ponding number of
bits needed to represent each pixel (e.g. 2 bits for 4
Repres​enting Sound
colours). The greater the colour depth, the bigger the file
Sample A measure of amplitude at a given point. Used to
size.
convert an analogue wave into a digital format.
Reso​‐ How much detail there is in an image. The more pixels per
Sampling The number of samples taken in a second. Measured
lution inch, the higher the resolu​tion. The higher the resolu​tion,
rate in Hertz.
depth the bigger the file size.
Sampling The number of bits per sample.
Meta​‐ Gives the software the inform​ation needed to display the
resolu​tion
data image properly (size, resolution depth, colour depth).
Bit rate The number of bits used per second of the audio.
Bitmap file size = width x height x colour depth (in bits)
Usually measured in kilobits per second (kbps).

File size (bits) = sampling rate x resolution x lenght of recording


(seconds)

By [deleted] Published 14th May, 2018. Sponsored by Readable.com


cheatography.com/deleted- Last updated 14th May, 2018. Measure your website readability!
56036/ Page 2 of 2. https://readable.com

You might also like