Turn on thread page Beta
 You are Here: Home

# cpt4 help plizzzzzzzzzz watch

1. 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
(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)

Turn on thread page Beta
TSR Support Team

We have a brilliant team of more than 60 Support Team members looking after discussions on The Student Room, helping to make it a fun, safe and useful place to hang out.

This forum is supported by:
Updated: June 21, 2004
Today on TSR

### A-level myths busted

Seven myths about moving up

### University open days

1. University of Cambridge
Wed, 26 Sep '18
2. Norwich University of the Arts
Fri, 28 Sep '18
3. Edge Hill University
Faculty of Health and Social Care Undergraduate
Sat, 29 Sep '18
Poll

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