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

1.4.1 Data Types

Uploaded by

Hriansh Desai
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)
7 views

1.4.1 Data Types

Uploaded by

Hriansh Desai
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/ 9

Unit 6: Data Types

(AS Content)
Marks: /36
Answer all the questions.

1(a). Convert the denary number –8 to:

(i) An 8-bit sign and magnitude binary number.

[1]

(ii) An 8-bit two's complement binary number.

[1]

© OCR 2018. You may photocopy this page.


PhysicsAndMathsTutor.com
(b). A computer represents floating point binary numbers using a 6-bit mantissa and 4-bit exponent, both using two's
complement.

Add the following three numbers together and give the answer in the format described. You must show your
working.

[6]

2a). Two equal (unsigned) integers, shown below, are added together. Calculate the result, showing your working.

[2]

(b). State which bitwise manipulation on 00010101 would have achieved the same result as the calculation on part
(a).

[1]

© OCR 2018. You may photocopy this page.


PhysicsAndMathsTutor.com
3(a). An AND operation with the mask 10101010 is applied to the binary number 01010101. Show the result.

[1]
(b). An OR operation with the mask 10101010 is applied to the binary number 01010101. Show the result.

[1]

4. Two floating point numbers are shown below. Calculate the answer of the second number subtracted from the
first. You must show your working and ensure your answer is normalised.

01001100 0011 - 01001010 0010

[5]

© OCR 2018. You may photocopy this page.


PhysicsAndMathsTutor.com
5(a). The XOR operator can be used to encrypt data.

Show the effect of applying XOR on Text and Key, by completing the last row of the table below.

[2]
(b). Show the effect of applying XOR on your answer to part (a) and Key, by completing the first and last rows of the
table below.

[2]
(c). Explain whether the type of encryption described above is symmetric or asymmetric.

[2]
(d). Explain why asymmetric encryption is more suited to transactions over the internet than symmetric encryption.

[4]

© OCR 2018. You may photocopy this page.


PhysicsAndMathsTutor.com
6(a). Show a representation of denary -119 in 8-bits using:

(i) Sign and Magnitude

[1]

(ii) Two's Complement

[1]

(b). A floating point number is represented with a mantissa of 8-bits followed by an exponent of 4-bits, both in two's
complement.

00011010 0010

(i) Identify whether or not the number is normalised.

[1]

(ii) State how you arrived at your answer to part (i).

[1]

© OCR 2018. You may photocopy this page.


PhysicsAndMathsTutor.com
7. Explain how, using bit shift, the unsigned binary number 00101100 can be divided by 4.

[2]

8. 00001100 is shifted two places to the left.

(i) Show the result.

[1]

(ii) Identify what arithmetic operation this shift is equivalent to.

[1]

END OF QUESTION PAPER

© OCR 2018. You may photocopy this page.


PhysicsAndMathsTutor.com
Question Answer/Indicative content Marks Guidance

1 a i 10001000 1

ii 11111000 1

b 6 If candidate fails to discard the overflowing


1 they can still get marks 1–4.

(1 per –)

Total 8

2 a Shift left (1). 1 For 1 mark.

b 00101010 2 For 2 marks – award 1 mark for correct


111 answer and 1 mark for carrying bits.

Total 3

3 a 00000000 1

b 11111111 1

Total 2

4 Exponent of first number is 3 (1) 5 Accept any sensible method (eg converting
Making it 0100.1100 (1) one number to have same exponent as
Exponent of second number is 2 (1) other and subtracting) with correct answer
Making it 010.01010 (1) for full marks.

Subtract numbers (1)


Normalised is 01001110 0010 (1)

Total 5

5 a 2
One byte correct (1) all three bytes
correct. (1)

b 2 Allow FT if (a) is incorrect but bottom row


must match XOR with top row and key.
One byte correct (1) all three bytes
correct. (1)

© OCR 2018. You may photocopy this page.


PhysicsAndMathsTutor.com
Question Answer/Indicative content Marks Guidance

c Symmetric (1) …. as the same key is used 2 Allow FT for asymmetric if (b) indicates
to decrypt it as encrypt it (1) asymmetric encryption used

d Any four from: 4


Symmetric encryption would require both
parties to have copy of the key (1) this
couldn’t be transmitted over the internet or
an eavesdropper monitoring the message
may see it (1) Asymmetric gets round this
requirement as there are two different keys
(1) One key encrypts the data (1) which
can be publically distributed (1) and a
different key to decrypt it (1) which is kept
private (1)

Total 10

6 a i 11110111 1

ii 10001001 1

b i Not Normalised 1

ii (Mantissa) Starts with 00 (normalised 1


numbers start 01 or 10)

Total 4

7 Shift Right (1) 2 Allow one mark for correct number of


places but wrong direction.
Two Places (1) (AO1.2)

Examiner’s Comments
Generally most candidates stated that two
bit shifts were required but some went on
to state the incorrect direction i.e. left.

Total 2

© OCR 2018. You may photocopy this page.


PhysicsAndMathsTutor.com
Question Answer/Indicative content Marks Guidance

8 i 00110000 1

ii Multiplying by 4 1

Total 2

© OCR 2018. You may photocopy this page.


PhysicsAndMathsTutor.com

Powered by TCPDF (www.tcpdf.org)

You might also like