Turn on thread page Beta
    • Thread Starter
    Offline

    0
    ReputationRep:
    hey ppl, exam 2moro, dreading it! but i need help on this question from the jan o2 past paper.i got the mark scheme and it doesnt rily help me to undrstand on how to solve these problems. and the heinebook book, well it mught as well be in a foreign language! if sum1 could help me though this, much appreciated!

    7 A simple logic processing language is used to represent, as a set of facts and rules, the valid constructions of numbers for a particular task. The set of facts and rules are shown below in clauses labelled i to vi.
    i. digit (1 2 3 4 5 6 7 8 9 0)
    ii. sign (+/-)
    iii. integer IF digit
    iv. integer IF digit AND integer
    v. number IF integer
    vi. number IF sign AND integer
    Clause i has the meaning “1, 2, 3, ...0 are all digits”
    Clause iv has the meaning “something is an integer if it is a digit followed by an integer”
    (a) State whether or not the following numbers are valid and list the clauses used to justify
    your answer.
    (i) 79 (3 marks)
    (ii) 148.5 (2 marks)
    (iii) –2003598 (3 marks)
    (b) One of these numbers is invalid according to the above facts and rules. Write the clause(s) that would make this number valid. (2 marks)
 
 
 

University open days

  1. University of Cambridge
    Christ's College Undergraduate
    Wed, 26 Sep '18
  2. Norwich University of the Arts
    Undergraduate Open Days Undergraduate
    Fri, 28 Sep '18
  3. Edge Hill University
    Faculty of Health and Social Care Undergraduate
    Sat, 29 Sep '18
Poll
Which accompaniment is best?

The Student Room, Get Revising and Marked by Teachers are trading names of The Student Room Group Ltd.

Register Number: 04666380 (England and Wales), VAT No. 806 8067 22 Registered Office: International House, Queens Road, Brighton, BN1 3XE

Write a reply...
Reply
Hide
Reputation gems: You get these gems as you gain rep from other members for making good contributions and giving helpful advice.