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

Chapter 1 - Data Representation

Uploaded by

shamim.arefin
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)
48 views

Chapter 1 - Data Representation

Uploaded by

shamim.arefin
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/ 19

Data representation

1 Convert the denary number 165 into:

a binary

b hexadecimal

2 a Convert the following binary number into denary:

01110110

b Convert the following hexadecimal number into denary:

5F

c Convert the following binary number into hexadecimal:

101011000100
d Convert the following hexadecimal number into binary:

3ED

Cambridge IGCSE and O Level Computer Science Computer Systems Workbook 5


1 Data representation

3 a How many mebibytes (MiB) of storage would be needed to store 800 photographs each of which are 16
MiB in size?

b Write your answer from part a in gibibytes (GiB).

4 The ASCII code for 'A' is 65 and for 'a' is 97.

a Write these denary values in 8-bit binary:

i 65

ii 97

b State the denary ASCII code for 'V' and ’v'.

i ’V'
ii V

c Write the two denary values in part b in 8-bit binary format:

i ’V'

6 Cambridge IGCSE and 0 Level Computer Science Computer Systems Workbook


1 Data representation

ii

d Using your answers to part a and part b, suggest an easy way of finding the ASCII binary code for a lower-
case letter (for example, 'm') if the ASCII code for the upper-case letter (for example, 'M') is known.

5 A computer system uses binary codes for letters of the alphabet as follows:

A = 10, B = 11, C = 12, ..., X = 33, Y = 34, Z = 35

a Write the denary value for 'X' in binary using an 8-bit register:

b To convert the binary code for 'X' to the binary code for 'x', all the bits in the 8-bit register in part a undergo
a logic shift two places to the left.

i Write down the contents of the 8-bit register after the bits, representing 'X', have been moved two
places to the left.

ii Convert the binary value in part b i into denary:

c State the denary values for the following two letters using the method described in part b.

i r:

Cambridge IGCSE and 0 Level Computer Science Computer Systems Workbook 7


1 Data representation

ii m:

6 a Convert the denary number 4 4 8 0 1 into hexadecimal.

b Convert the hexadecimal number in part a into a 16-bit binary number.

7 State three uses of the hexadecimal system.

1 ..........................................................................................................................................................................

2 ..................................................................................................................................................................

3 ..................................................................................................................................................................

8 Cambridge IGCSE and 0 Level Computer Science Computer Systems Workbook


1 Data representation

ii Convert 00111101 into denary.

b i Add together 01011110 and 0011110 1, giving your answer in binary.

ii Convert your answer in part b i to denary.

11 a Write down the largest number that can be represented by the following binary register.

Give your answer in binary and denary form:


128 64 32 16 8 4 2 1

b i Add together 01110111 and 1001110 1, giving your answer as an 8-bit binary number.

ii Comment on your answer to part b i.

12 Cambridge IGCSE and 0 Level Computer Science Computer Systems Workbook


1 Data representation

12 An 8-bit binary register contains the following value:

0 0 1 1 1 1 0 0

a Write down the denary value of the register.

b The contents of the register undergo a logical shift one place to the right.

i Show the result of this right shift:

ii Write down the denary value of your answer to part b i.


iii The register in part b i now undergoes a further Logical shift two places to the right. Comment on
your result.

c The content of the original register (shown in part a) now undergoes a logical shift two places to the left.

i Show the contents of the register after this left shift operation.

ii State, with reasons, the effect of this shift on the denary value shown in part a.

Cambridge IGCSE and 0 Level Computer Science Computer Systems Workbook 13


1 Data representation

13 a Convert the denary numbers, 37 and 19, into 8-bit binary numbers:

37: .................................................................................................................................................................

19: .................................................................................................................................................................

b Add together the two binary numbers in part a, and give your answer in binary.

c Carry out a logical shift, two places to the left, on your result from part b.

Comment on your answer.

d Carry out a logical shift, four places to the right, on your result from part b.

Comment on your answer.

14 A computer system uses two's complement notation.

a Complete the headings for an 8-bit binary number which uses two's complement:
64 32 16 8 4 2 1

b Write down i the most negative and ii the most positive numbers that can be stored in an 8-bit register
which uses two's complement. Give your answers in both denary and binary format.

i most negative:

14 Cambridge IGCSE and 0 Level Computer Science Computer Systems Workbook


1

denary value:
ii most positive:

denary value:

c Convert the following two denary numbers into 8-bit binary numbers which use the two's complement
format.

i +47

d Convert the following two binary numbers, written in two's complement format, into denary.

i 11001110

ii 11111110

e i Convert the denary number, +45, into binary, using the two's complement format.

ii Convert the denary number, -45, into binary, using the two's complement format.
iii Add together the binary numbers found in parts e i and e ii, leaving your answer in binary. Comment
on the result.

Cambridge IGCSE and 0 Level Computer Science Computer Systems Workbook 15


1

15 a A camera detector has an array of 4096 by 2048 pixels and uses a colour depth of 16.

Calculate the size of an image taken by this camera; give your answer in MiB.

b An audio CD uses 40960 samples per second, with 16 bits being used per sample.

The music being sampled uses two channels to allow for stereo recordings.

Calculate the file size for a 1024 second recording. Give your answer in MiB.

16 Cambridge IGCSE and 0 Level Computer Science Computer Systems Workbook


1

16 a Give three reasons why it is often necessary to reduce the size of a file.

1 ....................................................................................................................................................................

2 .............................................................................................................................................................

3 .............................................................................................................................................................

b Explain the difference between lossy and lossless file compression.

Cambridge IGCSE and 0 Level Computer Science Computer Systems Workbook 17


1

c i Give one example of the use of lossy file compression.

ii Give one example of the use of lossless file compression.

17 In terms of representing bitmap images, explain the following:

a colour depth: ...................................................................................................................................................

b image resolution: ............................................................................................................................................

18 Explain the difference between ASCII code and Unicode.

18 Cambridge IGCSE and 0 Level Computer Science Computer Systems Workbook


1

Seven statements are shown on the left and eleven computing terms are shown on the right in the
diagram below.

Draw lines to connect each statement to the correct computer term.

In a binary number, this is the right-most binary digit Overflow error

Resolution
Method used by a computer to allow the representation of
negative numbers as well as positive numbers
Unicode

Result of adding two binary numbers that exceeds the


maximum size of a number which can be stored American standard code for information interchange

The moving of bits to the left or to the right in a register, which Pixel
represents multiplication by 2' or division by 2* (where x
represents the number of places the bits are moved left or
right) Two s complement

Sampling rate
A 7-bit code used to represent letters, numbers and
characters found on a standard keyboard plus 32 control Logical shift
codes

Least significant bit


Number of sound samples taken per second when
representing sound digitally in a computer
Error code

The smallest element of a picture Colour depth

20 a Which one of the following is not a correct hexadecimal number?

A CODE

B AXIS

C IDEA

D FACE

b The number of bits used to represent a sound sample is known as:

A the sampling rate

B amplitude value

C loudness of a sound sample

D sampling resolution

Cambridge IGCSE and 0 Level Computer Science Computer Systems Workbook 19


1

c The MP3 format removes redundant sound from a file. Which one of the following best describes the type
of file reduction being used by the MP3 format?

A lossy files compression

B sound file damping

C image file compression

D lossless file compression

d Temporary files produced by a camera where no compression has been applied, are called:

A jpeg files

B png files

C gif files

D raw bitmap files

e Lossless file compression, which reduces the size of a string of adjacent, identical data, is called:

A jpeg

B run-length encoding

C sampling resolution

D audio compression

21 a Explain what is meant by run-length encoding (RLE).

20 Cambridge IGCSE and 0 Level Computer Science Computer Systems Workbook


1

i The above monochrome image is being designed.

Each white square is represented by 'W' and each dark square is represented by 'D'. Show how run-
length encoding (RLE) would be used to produce a condensed file for the above image. Using the grid
below, write down the data you would expect to find in the RLE compressed format; the first two have
been done for you.

3W 2D

ii Assuming that each square in the 8 x 8 grid requires one byte of storage, and each character in the RLE
code also requires one byte of storage (for example, '3' requires 1 byte, 'W' requires 1 byte), calculate
the file size reduction when using RLE.

22 a Explain the following terms used in the electronic storage of sound:

i sampling resolution:

Cambridge IGCSE and 0 Level Computer Science Computer Systems Workbook 21


1

ii sampling rate:

b Look at the sound wave below that has been sampled:

Sample number
<-------------1 second------------x -------------- 1 second------------>

i From the graph, what is the sampling resolution?

ii From the graph, what is the sampling rate?

iii Using the x-axis, locate points 9 and 18 on the graph. Write down the 4-bit binary values
corresponding to they-axis values of these two points.

point 9:

point 18:

22 Cambridge IGCSE and 0 Level Computer Science Computer Systems Workbook


1

c Discuss the benefits and drawbacks of increasing the sampling rate and sampling resolution when
representing sound in an electronic (binary) format.

23 Write down a series of steps that could be used to convert a denary number into a hexadecimal
number. Your steps should allow somebody to follow them clearly to give the correct converted value.

Cambridge IGCSE and 0 Level Computer Science Computer Systems Workbook 23


1

24 a State what is meant by a bit.

b Give two reasons why computers use binary numbers rather than decimal numbers.

1 .............................................................................................................................................................

2 .............................................................................................................................................................

c Explain why the hexadecimal number system is used by computer technicians and programmers.

24 Cambridge IGCSE and 0 Level Computer Science Computer Systems Workbook

You might also like