4.5 Fundamentals of data representation

Number systems

Natural numbers

Content

Additional information

Be familiar with the concept of a natural number and the set ℕ of natural numbers (including zero).

ℕ = {0, 1, 2, 3, … }

Integer numbers

Content

Additional information

Be familiar with the concept of an integer and the set ℤ of integers.

ℤ = { …, -3, -2, -1, 0, 1, 2, 3, … }

Rational numbers

Content

Additional information

Be familiar with the concept of a rational number and the set ℚ of rational numbers, and that this set includes the integers.

ℚ is the set of numbers that can be written as fractions (ratios of integers). Since a number such as 7 can be written as 7/1, all integers are rational numbers.

Irrational numbers

Content

Additional information

Be familiar with the concept of an irrational number.

An irrational number is one that cannot be written as a fraction, for example √2.

Real numbers

Content

Additional information

Be familiar with the concept of a real number and the set ℝ of real numbers, which includes the natural numbers, the rational numbers and the irrational numbers.

ℝ is the set of all 'possible real world quantities'.

Ordinal numbers

Content

Additional information

Be familiar with the concept of ordinal numbers and their use to describe the numerical positions of objects.

When objects are placed in order, ordinal numbers are used to tell their position. For example, if we have a well-ordered set S = {‘a’, ‘b’, ‘c’, ‘d’}, then ‘a’ is the 1st object, ‘b’ the 2nd, and so on.

Counting and measurement

Content

Additional information

Be familiar with the use of:

  • natural numbers for counting
  • real numbers for measurement.
 

Number bases

Number base

Content

Additional information

Be familiar with the concept of a number base, in particular:

  • decimal (base 10)
  • binary (base 2)
  • hexadecimal (base 16).

Students should be familiar with expressing a number’s base using a subscript as follows:

Base 10: Number10, eg 6710

Base 2: Number2, eg 100110112

Base 16: Number16, eg AE16

Convert between decimal, binary and hexadecimal number bases.

 

Be familiar with, and able to use, hexadecimal as a shorthand for binary and to understand why it is used in this way.

 

Units of information

Bits and bytes

Content

Additional information

Know that:

  • the bit is the fundamental unit of information
  • a byte is a group of 8 bits.

A bit is either 0 or 1.

Know that the 2n different values can be represented with n bits.

For example, 3 bits can be configured in 23 = 8 different ways.

000, 001, 010, 011, 100, 101, 110, 111

Units

Content

Additional information

Know that quantities of bytes can be described using binary prefixes representing powers of 2 or using decimal prefixes representing powers of 10, eg one kibibyte is written as 1KiB = 210 B and one kilobyte is written as 1 kB = 103 B.

Know the names, symbols and corresponding powers of 2 for the binary prefixes:
  • kibi, Ki - 210
  • mebi, Mi - 220
  • gibi, Gi - 230
  • tebi, Ti - 240
Know the names, symbols and corresponding powers of 10 for the decimal prefixes:
  • kilo, k - 103
  • mega, M - 106
  • giga, G - 109
  • tera, T - 1012

Historically the terms kilobyte, megabyte, etc have often been used when kibibyte, mebibyte, etc are meant.

Binary number system

Unsigned binary

Content

Additional information

Know the difference between unsigned binary and signed binary.

Students are expected to be able to convert between unsigned binary and decimal and vice versa.

Know that in unsigned binary the minimum and maximum values for a given number of bits, n, are 0 and 2n -1 respectively.

 

Unsigned binary arithmetic

Content

Additional information

Be able to:

  • add two unsigned binary integers
  • multiply two unsigned binary integers.
 

Signed binary using two’s complement

Content

Additional information

Know that signed binary can be used to represent negative integers and that one possible coding scheme is two’s complement.

This is the only representation of negative integers that will be examined. Students are expected to be able to convert between signed binary and decimal and vice versa.

Know how to:

  • represent negative and positive integers in two’s complement
  • perform subtraction using two’s complement
  • calculate the range of a given number of bits, n.
 

Numbers with a fractional part

Content

Additional information

Know how numbers with a fractional part can be represented in:

  • fixed point form in binary in a given number of bits
  • floating point form in binary in a given number of bits.

Students are not required to know the Institute of Electrical and Electronic Engineers (IEEE) standard, only to know, understand and be able to use a simplified floating representation consisting of mantissa + exponent.

Be able to convert for each representation from:

  • decimal to binary of a given number of bits
  • binary to decimal of a given number of bits.

Exam questions on floating point numbers will use a format in which both the mantissa and exponent are represented using two's complement.

Rounding errors

Content

Additional information

Know and be able to explain why both fixed point and floating point representation of decimal numbers may be inaccurate.

Use binary fractions. For a real number to be represented exactly by the binary number system, it must be capable of being represented by a binary fraction in the given number of bits. Some values cannot ever be represented exactly, for example 0.110.

Absolute and relative errors

Content

Additional information

Be able to calculate the absolute error of numerical data stored and processed in computer systems.

 

Be able to calculate the relative error of numerical data stored and processed in computer systems.

 

Compare absolute and relative errors for large and small magnitude numbers, and numbers close to one.

 

Range and precision

Content

Additional information

Compare the advantages and disadvantages of fixed point and floating point forms in terms of range, precision and speed of calculation.

 

Normalisation of floating point form

Content

Additional information

Know why floating point numbers are normalised and be able to normalise un-normalised floating point numbers with positive or negative mantissas.

 

Underflow and overflow

Content

Additional information

Explain underflow and overflow and describe the circumstances in which they occur.

 

Information coding systems

Character form of a decimal digit

Content

Additional information

Differentiate between the character code representation of a decimal digit and its pure binary representation.

 

ASCII and Unicode

Content

Additional information

Describe ASCII and Unicode coding systems for coding character data and explain why Unicode was introduced.

 

Error checking and correction

Content

Additional information

Describe and explain the use of:

  • parity bits
  • majority voting
  • checksums
  • check digits.
 

Representing images, sound and other data

Bit patterns, images, sound and other data

Content

Additional information

Describe how bit patterns may represent other forms of data, including graphics and sound.

 

Analogue and digital

Content

Additional information

Understand the difference between analogue and digital:

  • data
  • signals.
 

Analogue/digital conversion

Content

Additional information

Describe the principles of operation of:

  • an analogue to digital converter (ADC)
  • a digital to analogue converter (DAC).
 

Know that ADCs are used with analogue sensors.

 

Know that the most common use for a DAC is to convert a digital audio signal to an analogue signal.

 

Bitmapped graphics

Content

Additional information

Explain how bitmaps are represented.

 

Explain the following for bitmaps:

  • resolution
  • colour depth
  • size in pixels.

The size of an image is also alternatively sometimes described as the resolution of an image.

Size of an image in pixels is width of image in pixels x height of image in pixels.

Resolution is expressed as number of dots per inch where a dot is a pixel.

Colour depth = number of bits stored for each pixel.

Calculate storage requirements for bitmapped images and be aware that bitmap image files may also contain metadata.

Ignoring metadata,

storage requirements = size in pixels x colour depth

where size in pixels is width in pixels x height in pixels.

Be familiar with typical metadata.

eg width, height, colour depth.

Vector graphics

Content

Additional information

Explain how vector graphics represents images using lists of objects.

The properties of each geometric object/shape in the vector graphic image are stored as a list.

Give examples of typical properties of objects.

 

Use vector graphic primitives to create a simple vector graphic.

 

Vector graphics versus bitmapped graphics

Content

Additional information

Compare the vector graphics approach with the bitmapped graphics approach and understand the advantages and disadvantages of each.

 

Be aware of appropriate uses of each approach.

 

Digital representation of sound

Content

Additional information

Describe the digital representation of sound in terms of:

  • sample resolution
  • sampling rate and the Nyquist theorem.
 

Calculate sound sample sizes in bytes.

 

Musical Instrument Digital Interface (MIDI)

Content

Additional information

Describe the purpose of MIDI and the use of event messages in MIDI.

 

Describe the advantages of using MIDI files for representing music.

 

Data compression

Content

Additional information

Know why images and sound files are often compressed and that other files, such as text files, can also be compressed.

 

Understand the difference between lossless and lossy compression and explain the advantages and disadvantages of each.

 

Explain the principles behind the following techniques for lossless compression:

  • run length encoding (RLE)
  • dictionary-based methods.
 

Encryption

Content

Additional information

Understand what is meant by encryption and be able to define it.

Students should be familiar with the terms cipher, plaintext and ciphertext.

Caesar and Vernam ciphers are at opposite extremes. One offers perfect security, the other doesn’t. Between these two types are ciphers that are computationally secure – see below. Students will be assessed on the two types. Ciphers other than Caesar may be used to assess students' understanding of the principles involved. These will be explained and be similar in terms of computational complexity.

Be familiar with Caesar cipher and be able to apply it to encrypt a plaintext message and decrypt a ciphertext.

Be able to explain why it is easily cracked.

 

Be familiar with Vernam cipher or one-time pad and be able to apply it to encrypt a plaintext message and decrypt a ciphertext.

Explain why Vernam cipher is considered as a cypher with perfect security.

Since the key k is chosen uniformly at random, the ciphertext c is also distributed uniformly. The key k must be used once only. The key k is known as a one-time pad.

Compare Vernam cipher with ciphers that depend on computational security.

Vernam cipher is the only one to have been mathematically proved to be completely secure. The worth of all other ciphers ever devised is based on computational security. In theory, every cryptographic algorithm except for Vernam cipher can be broken, given enough ciphertext and time.