OP Maths Binary Minimum and Maximum Values to Decimal Notation Worksheet

Question Description

Hello hello hello I’m back again lol how’s it going? Can you have a look through and see if you can answer these questions ok? I would rather give you the business than open it up to the floor 

  • This question part asks you to apply what you have learned to a new situation.One way of dealing with the imprecision of floating-point numbers is to ‘sandwich’ the exact value between the two closest values on either side. So, for example, in a decimal system that can represent exactly 4 digits beyond the decimal point, the value 0.333333… would be ‘sandwiched’ between 0.3333 and 0.3334. When a calculation is performed, it is repeated with each of the sandwich values to give a range within which the exact result of the calculation lies. For example, the exact value of 3 × 0.333333… is somewhere between 0.3333 × 3 and 0.3334 × 3, so between the values 0.9999 and 1.0002. Although this does not give us the exact value of the calculation, this method tells us a minimum and maximum value for it, within the limits of the precision of the system. 
    • i.Show that 0.0100112 is the binary representation of 0.29687510
    • ii.A computer system allows only 4 binary digits after the decimal point. Write the two binary values with exactly 4 digits after the decimal point that ‘sandwich’ 0.0100112.
    • iii.Using the two binary ‘sandwich’ values that you found in (ii), write down the minimum and maximum binary values that sandwich the result of 0.0100112 + 0.0100112
    • iv.Convert each of the binary values you found in (iii) to decimal notation. Give the minimum and maximum values in decimal notation.
    • v.Calculate, in decimal, the value of 0.29687510 + 0.29687510 (Your answer is the actual value so it should not be rounded). By what percentage, rounded to the nearest whole percent, does the maximum value exceed the actual value? Your answer should show the actual value, the percentage and your workings for full marks.
    • (10 marks)
  • c.This question part is based on truth tables and assesses your ability to form logic expressions.During the Coronavirus pandemic in 2020, a supermarket puts restrictions on fruit and veg combinations that people can leave the supermarket with on a Thursday. In particular, for apples (A), bananas (B) and carrots (C), the following two rules are issued:
    • Rule 1: No apples allowed. (translated into the logic expression NOT A)
    • Rule 2: Bananas or carrots are allowed. (translated into the logic expression B OR C)
    • To avoid any misinterpretation, the rules have been translated into logic expressions (as shown above).
    • i.Complete the following truth table. In the final column, show purchases that are acceptable on a Thursday according to both Rule 1 and Rule 2. 

ABCNOT AB OR CACCEPTABLE000001010011100101110111

  • ii.Find a logic expression which is logically equivalent to the logic expression A?B in the following table. (Here, A?B is a logic expression featuring a new operation that we have named ‘?’.) Follow the method that is described in Block 1 Part 1. To obtain the logic expression for A?B, first obtain the logic expressions for the relevant rows of the table below. Then construct the logic expression for A?B from that. For full marks, show your working.

ABA?BLogic expression001011100110

  • (6 marks)

(Total 22 marks)

This part of the question involves calculations. For full marks, you must include your workings and explanations.

Consider the following two processors: 

Processor 1 has a clock speed of 4.0 GHz with 32 KiB of L1 cache. 

Processor 2 has a clock speed of 2.0 GHz with 64 KiB of L1 cache. 

In order to decide which to buy, you estimate the time each processor will take to load a program with 10,000 RISC instructions into the processor’s registers and the time to execute the instructions.

Each RISC instruction has a size of 4 bytes.

Each RISC instruction takes one clock pulse to execute once it is in the registers.

  • i.Show that a program consisting of 10,000 RISC instructions will fit into 64 KiB of L1 cache, but will not fit into 32 KiB of L1 cache.
  • ii.It takes 1 nanosecond (1 x 10-9 s) to move an instruction from L1 cache to the registers and 9 nanoseconds to move an instruction from L2 cache to the L1 cache. Assume that for Processor 2, all of the instructions can be found in L1 cache and for Processor 1, all of the instructions that won’t fit in L1 cache can be found in L2 cache. How much time is needed to load all 10,000 instructions into the registers for each processor? Write your answers in seconds, using scientific notation.
  • iii.For each processor, calculate the time it takes to execute 10,000 RISC instructions. You should not include the time to load the instructions into the registers here. Write your answers in seconds, using scientific notation.

Based on your answers to parts i and ii of this question, you should now be able to make an estimate of which processor is faster overall, although you don’t need to provide your estimate in answer to this question. 

(12 marks)

A program is required to compare three numbers to see if any of them is equal to the product of the other two.

The program will take three integers, between 1 and 100 inclusive.

The program should output one of the following strings:

  • a = b * c
  • b = a * c
  • c = a * b
  • No number is the product of the others

You are given the following test data and an incomplete and error-filled program.

Test Number

Inputs 

Expected Outputabc1623a = b * c2362b = a * c3326c = a * b4789No number is product of the others

# Problem: Check if any of three numbers is product of others # Input: a as an integer from 1 to 100  # Input: b as an integer from 1 to 100  # Input: c as an integer from 1 to 100  a = 6  b = 2  c = 3  # Output: answer, a string  if a == b + c      answer = ‘a = b * c’  if b == a * c      answer = ‘b = a * c’ if c == a + b :      answer = ‘c = a * b’ if (a != b * c) and (b != a * c) and (c != a * b):      answer = ‘No number is product of others’ print (answer)

  • a. 
    • i.What are the inputs and outputs of this problem and their types? 
    • ii.What are the admissible values for the inputs?
    • (5 marks)
  • b. 
    • i.What are the syntax errors in this program? Consider no other errors at this point.
    • ii.Once they are corrected, which of the above tests would the program still fail and why? Refer to test cases using their Test Number from the first column.
    • iii.Give an explanation for the choice of input values in the test table.
    • (8 marks)

Get 20% Discount on This Paper
Pages (550 words)
Approximate price: -

Try it now!

Get 20% Discount on This Paper

We'll send you the first draft for approval by at
Total price:
$0.00

How it works?

Follow these simple steps to get your paper done

Place your order

Fill in the order form and provide all details of your assignment.

Proceed with the payment

Choose the payment system that suits you most.

Receive the final file

Once your paper is ready, we will email it to you.

Our Services

Ace Writing Center has stood as the world’s leading custom essay writing services providers. Once you enter all the details in the order form under the place order button, the rest is up to us.

Essays

Essay Writing Services

At Ace Writing Center, Nowadays, students normally have extremely busy schedules. You will note that some of them have to take on some evening or weekend jobs in order to get some income that can help them to sustain in college or in the university. This can deny them a chance to write all the essays given. Others usually get bombarded with a lot of work by their lecturers. This can still delay such students from working on all their essays. However, some of them usually try to work on all these essays but end up delivering their work late. This can prevent them from graduating since most lecturers are strict on deadlines. If you want to write a business essay, the wise way is to hire an outstanding essay writing service like us, so that you can get the best results. If you are keen, you will note that many companies usually overcharge their customers. Some of them are there only to make money. And in reality, they really don’t care to build a long term commitment with students. You should not choose such companies. You should take your time and choose a reliable company to work with. Ace Writing Center is the ultimate solution for you. We have been offering our writing service for more than 7 years. This is a clear indication that you will get quality essay writing service. We have a wide range of writers who can work on any business essay that you might have. We believe in doing extensive research so that we can provide quality work to all our clients. .

Admissions

Admission and Business Papers

Have you ever had to write an admission essay for college? The majority of students face the same issues when applying to a university or college and many in such situations decide they need professional help to cope with this matter. They get in a situation when the deadline keeps coming closer but lack motivation to start because they are just not sure if their writing skills are strong enough. We have a solution for you! Ace Writing Center is the best admission essay writing service with a large professional team and years of experience in providing high-quality papers to students of all levels and faculties. The mission of our team is to help students make their dreams of entering a good college come true and that’s what we offer!.

Editing

Editing and Proofreading

Sometimes all the words for your paper just flow out of your mind and into your fingers. You type quickly at your keyboard and there they are, your beautiful words right there on the screen. But you have no idea how to polish it up. You may be wishing there was a paper writing service that offered this type of writing service. Look no more! Here at Ace Writing Center, we offer you an editing and proofreading option that you can't find anywhere else..

Coursework

College Essay Writing

In case you are familiar Ace Writing Center, you know the way to distinguish a better company from a cheap one exactly. First of all, poor service website does not have a sufficient support. We think support team is an essential part of success; it has to answer all clients’ questions and be a connecting link between clients and their writers. On our web-service you will get answers about anything you need and your writer will receive all your instructions, assignments and requirements exactly and swiftly. A writing service that we run has got a flexible pricing system that will save you from senseless wastes and many bonus systems that let you sparing money for something important for you.