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

Binary Revision Past Paper Questions

dfsfsd

Uploaded by

ksshubhan
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
95 views

Binary Revision Past Paper Questions

dfsfsd

Uploaded by

ksshubhan
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

Q1.

The figure below shows a number stored using a fixed point representation and two’s
complement, with six bits before and four bits after the binary point.

Convert the number in the figure above to decimal.

You should show your working.

4 + 8 + (-32) + 1/2 + 1/8 + 1/16

= -19.3125

Answer: -19.3125
(Total 2 marks)

Q2.
State two reasons why values stored using a floating point representation are usually
stored in normalised form.

Reason 1: To maximise accuracy for a given number of bits

Reason 2: To allow unique representation of each number

(Total 2 marks)

Q3.
Use a normalised floating point representation with an 8-bit mantissa and a 4-bit
exponent, both stored using two’s complement.

The figure below shows a floating point representation of a number.

Calculate the decimal equivalent of the number.

Express your answer as a fraction or to 4 decimal places.

You should show your working.

0.00000001101100

27/4096

Answer: 27/4096

Page 1 of 7
(Total 2 marks)

Q4.
Use a normalised floating point representation with an 8-bit mantissa and a 4-bit
exponent, both stored using two’s complement.

Write the normalised floating point representation of the decimal value –23.25 in the
boxes below.

You should show your working.

11101000.11

1.0100011 0101

Answer
(Total 3 marks)

Q5.
Use a normalised floating point representation with an 8-bit mantissa and a 4-bit
exponent, both stored using two’s complement.

The figure below shows the closest possible representation of the decimal number –
0.22558594(actual number we want to represent) in this floating point system.

By converting this number back to decimal it can be seen that the actual value stored is –
0.2265625(closest value possible)

Calculate the relative error that has occurred when representing –0.22558594

You should show your working.

Express your answer as a percentage to 2 decimal places.

Relative error = absolute error / actual value

([-0.22558594 – (-0.2265625)]/-0.22558594) * 100

-0.43%

Answer: -0.43%
(Total 2 marks)

Q6.
Use binary addition in 8-bit two’s complement to perform the subtraction:

Page 2 of 7
18 – 72

You must show both your working and your final answer in binary.

0001 0010

1011 1000

1100 1010

Answer: 1100 1010


(Total 2 marks)

Q7.
A particular computer uses a normalised floating point representation with an 8-bit
mantissa and a 4-bit exponent, both stored using two’s complement.

(a) Four-bit patterns that are stored in this computer’s memory are listed in Figure 1
and are labelled with the letters A to D. Three of the bit patterns are valid normalised
floating point numbers and one is not.

Figure 1

Complete the table below. In the Correct letter (A–D) column write the appropriate
letter from A to D to indicate which bit pattern in Figure 1 is an example of the type
of value described in the Value description column.

Do not use the same letter more than once.

Correct letter (A–


Value description
D)

A negative value that is valid in the


A
representation.

The largest positive value that can be


D
represented in the system.

Page 3 of 7
A value that is not valid in the representation
C
because it is not normalised.
(3)

(b) Figure 2 shows a floating point representation of a number:

Figure 2

Calculate the decimal equivalent of the number.

You should show your working.

0110100.0

32 + 16 + 4

= 52

Answer: 52
(2)

In this floating point system, the closest possible representation of the decimal number
104.7 is shown in Figure 3.

Figure 3

By converting this number back to decimal it can be seen that the actual value stored is
105

(c) Calculate the absolute error that has occurred when representing 104.7 in
Figure 3.

105 – 104.7 = 0.3

Answer: 0.3 (You shouldn’t be getting a negative answer for this)


(1)

(d) Calculate the relative error that has occurred when representing 104.7 in Figure 3.

Express your answer as a percentage to two decimal places.

(0.3/104.7) * 100

Answer: 0.29%
(1)

Page 4 of 7
(e) Explain why the relative error is usually considered to be a more important measure
of error than the absolute error.

Relative error is given as a percentage over the actual value.

The impact of an error depends on its size relative to the number that should be
represented. An absolute error is more significant the smaller that number is and
vice versa if the number is larger.
(0/1)
(Total 8 marks)

Q8.
Non-integer values such as -1.65 and 23/1068 can be represented by a computer using a
fixed point or a floating point system.

State one advantage of using a floating point system over a fixed point system and one
advantage of using a fixed point system over a floating point system.

You should assume that the two systems use the same number of bits to store a value.

Advantage of floating point

 Can represent a wider range of numbers when using the same number of bits.

Advantage of fixed point:

 Simpler to calculate and process because the binary point is fixed in place and
does not have to be moved

 (In a given number of bits) a fixed point system can represent (some) numbers
more precisely than a floating point system; A. “accurately” for “precision” as BOD

 Calculations can be performed more quickly; NE. time efficient; A. simpler


evaluation

 Represents all numbers to a constant (A. fixed, guaranteed) level of


precision/accuracy;

 NE. easier to understand


(Total 1/2 marks)

Q9.
This question uses a normalised floating point representation with a 7-bit mantissa and a
5-bit exponent, both stored using two’s complement.

The following is a floating point representation of a number:

Calculate the decimal equivalent of the number.

Page 5 of 7
Express your answer to at least four decimal places or as a fraction. You should show
your working.

1.010100

1010.100

Answer: -11/2
(Total 2 marks)

Q10.
This question uses a normalised floating point representation with a 7-bit mantissa and a
5-bit exponent, both stored using two’s complement.

Write the normalised floating point representation of the decimal value 1632 in the boxes
below.

You should show your working.

-2048 1024 512 256 128 64 32 16 8 4 2 1

0 . 1 1 0 0 1 10 0 00

01010

Answer: 0.110011 01010

(Total 2/3 marks)

Q11.
This question uses a normalised floating point representation with a 7-bit mantissa and a
5-bit exponent, both stored using two’s complement.

State, in decimal, the highest (most positive) and lowest (most negative) values that could
be represented by this floating point system.

You should show your working.

0.111111 01111

1.000000 01111

Highest value: 0.111111 01111

Lowest value: 1.000000 01111

(Total 3 marks)

Q12.

Page 6 of 7
This question uses a normalised floating point representation with a 7-bit mantissa and a
5-bit exponent, both stored using two’s complement.

When the decimal value 28.25 is converted into binary using this floating point system, a
rounding error occurs.

Explain:

• why a rounding error has occurred, and


• what the system might do when the value 28.25 is converted into binary.

Error occurred because there are not enough bits in the mantissa to accurate represent
28.25. System may assign bits from the exponent to the mantissa to increase accuracy
(Total 2 marks)

Page 7 of 7

You might also like