0% found this document useful (0 votes)
34 views

4.5 Fundamentals of Data Representation

This document discusses fundamentals of data representation including: 1) Different number systems such as natural numbers, integers, rational numbers, and real numbers. 2) Binary, decimal, and hexadecimal number bases. 3) Units of information such as bits and bytes. 4) Representing numbers in binary including unsigned, signed using two's complement, and with fractional parts.

Uploaded by

louistestevens
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views

4.5 Fundamentals of Data Representation

This document discusses fundamentals of data representation including: 1) Different number systems such as natural numbers, integers, rational numbers, and real numbers. 2) Binary, decimal, and hexadecimal number bases. 3) Units of information such as bits and bytes. 4) Representing numbers in binary including unsigned, signed using two's complement, and with fractional parts.

Uploaded by

louistestevens
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

🔢

4.5 Fundamentals of data


representation
Status

4.5.1 Number systems


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

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

4.5.1.2 Integer numbers


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

Z = {… , −3, −2, −1, 0, 1, 2, 3, …}

4.5.1.3 Rational numbers

4.5 Fundamentals of data representation 1


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

ℹ Q 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.

4.5.1.4 Irrational numbers


Be familiar with the concept of an irrational number.

ℹ An irrational number is one that cannot be written as a fraction, for


example 2.

4.5.1.5 Real numbers


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.

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

4.5.1.6 Ordinal numbers


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.

4.5.1.7 Counting and measurement


Be familiar with the use of:

natural numbers for counting

real numbers for measurement.

4.5 Fundamentals of data representation 2


4.5.2 Number bases
4.5.2.1 Number base
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 , e.g. 6710


Base 2: Number2 , e.g. 100110112
Base 16: Number16 , e.g. 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.

4.5.3 Units of information


4.5.3.1 Bits and bytes
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.

4.5 Fundamentals of data representation 3


ℹ For example, 3 bits can be configured in 23 = 8 different ways.
000, 001, 010, 011, 100, 101, 110, 111

4.5.3.2 Units
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.

4.5.4 Binary number system


4.5.4.1 Unsigned binary
Know the difference between unsigned binary and signed binary.

4.5 Fundamentals of data representation 4


❗ 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.

4.5.4.2 Unsigned binary arithmetic


Be able to:

add two unsigned binary integers

multiply two unsigned binary integers

4.5.4.3 Signed binary using two’s complement


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

4.5.4.4 Numbers with a fractional part


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

4.5 Fundamentals of data representation 5


❗ 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.

4.5.4.5 Rounding errors


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 .

4.5.4.6 Absolute and relative errors


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.

4.5.4.7 Range and precision

4.5 Fundamentals of data representation 6


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

4.5.4.8 Normalisation of floating point form


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

4.5.4.9 Underflow and overflow


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

4.5.5 Information coding systems


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

4.5.5.2 ASCII and Unicode


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

4.5.5.3 Error checking and correction


Describe and explain the use of:

parity bits

majority voting

checksums

check digits

4.5.6 Representing images, sound and


other data
4.5.6.1 Bit patterns, images, sound and other data

4.5 Fundamentals of data representation 7


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

4.5.6.2 Analogue and digital


Understand the difference between analogue and digital:

data

signals

4.5.6.3 Analogue/digital conversion


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.

4.5.6.4 Bitmapped graphics


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.

4.5 Fundamentals of data representation 8


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

ℹ Ignoring metadata, storage requirements =


colour depth
size in pixels ×

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

Be familiar with typical metadata.

ℹ e.g. width, height, colour depth.

4.5.6.5 Vector graphics


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.

4.5.6.6 Vector graphics versus bitmapped graphics


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.

4.5.6.7 Digital representation of sound


Describe the digital representation of sound in terms of:

sample resolution

sampling rate and the Nyquist theorem

Calculate sound sample sizes in bytes.

4.5 Fundamentals of data representation 9


4.5.6.8 Digital representation of sound
Describe the purpose of MIDI and the use of event messages in MIDI.

Describe the advantages of using MIDI files for representing music.

4.5.6.9 Data compression


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

4.5.6.10 Digital representation of sound


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.

4.5 Fundamentals of data representation 10


ℹ 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.

4.5 Fundamentals of data representation 11

You might also like