ComputerSlides
Showing posts sorted by relevance for query logic. Sort by date Show all posts
Showing posts sorted by relevance for query logic. Sort by date Show all posts

DATA PROCESSING LOGIC GATES


LOGIC GATES










A logic gate is an elementary building block of a digital circuit. One of the most useful aspects of computers is their ability to make decisions. If the number of items in stock falls below a certain level, then print an order for some more. The ability to make useful decisions like this is because of special circuits in the processor. These circuits are called logic circuits. Logic circuits are made from components called logic gates. .

SS3 DATA PROCESSING MIDTERM EXAM QUESTIONS

COMPUTERSLIDES / SS3 / EXAM PRACTICE

Data Processing Midterm Exam

30 multiple-choice questions · 3 written tasks · 70 marks

ANDSTARTDECIDEPROCESS

Instructions

Select one answer per question. Each multiple-choice question is worth one mark. Written tasks are worth 40 marks in total. Check your answers after completing the test.

Topics: logic gates, flowcharts, programming and operators.

1. Which gate outputs 1 only when both inputs are 1?

Answer & explanation

A. AND — AND requires both inputs to be 1.

2. AND: A = 0, B = 1. What is Y?

Answer & explanation

A. 0 — Both inputs must be 1.

3. OR: A = 1, B = 0. What is Y?

Answer & explanation

C. 1 — At least one input is 1.

4. Which gate inverts a single input?

Answer & explanation

B. NOT — NOT reverses the input.

5. Which diagram shows the steps of a process?

Answer & explanation

B. Flowchart — A flowchart visualizes a process.

6. Which labels normally mark the beginning and end of a basic flowchart?

Answer & explanation

C. START – STOP — Terminal symbols mark the beginning and end.

7. What is a set of instructions executed by a computer?

Answer & explanation

C. Program — A program contains executable instructions.

8. Who writes computer programs?

Answer & explanation

B. Programmer — A programmer writes code.

9. Which shape commonly represents Start or Stop?

Answer & explanation

B. Oval — An oval is a terminal symbol.

10. Which Python operator multiplies numbers?

Answer & explanation

C. * — * multiplies.

11. Which Python operator performs division?

Answer & explanation

A. / — / divides.

12. Which Excel formula operator raises a number to a power?

Answer & explanation

B. ^ — Excel uses ^ for exponentiation; Python uses **.

13. Which operator means less than?

Answer & explanation

B. < — < compares two values.

14. Which Python operator tests equality?

Answer & explanation

D. == — == compares; = assigns.

15. What connects the steps in a flowchart?

Answer & explanation

B. Arrows — Arrows show the direction of control.

16. Which shape represents input/output?

Answer & explanation

A. Parallelogram — A parallelogram represents input/output.

17. Which shape represents a processing step?

Answer & explanation

C. Rectangle — A rectangle represents processing.

18. Which shape represents a decision?

Answer & explanation

C. Diamond — A diamond represents a decision.

19. Which is an arithmetic operator in Python?

Answer & explanation

D. None of these — These are comparison operators.

20. Which are arithmetic operators?

Answer & explanation

D. All of these — All three perform arithmetic.

21. Which is a Python comparison operator?

Answer & explanation

D. None of these — None compares values.

22. Which Excel operator means not equal?

Answer & explanation

C. <> — Excel uses <>; Python uses !=.

23. Which is a valid Python identifier?

Answer & explanation

A. total_cost — Identifiers may begin with a letter or underscore, not a digit; keywords are reserved.

24. Which flowchart symbol branches based on a condition?

Answer & explanation

B. Decision box — A decision box branches based on a condition.

25. What shows the direction of a flowchart?

Answer & explanation

C. Flowlines — Flowlines connect steps.

26. Which is a Python arithmetic operator?

Answer & explanation

D. None of these — All listed symbols are comparison operators.

27. Which operator means less than or equal to?

Answer & explanation

C. <= — <= compares values.

28. AND: A = 0, B = 1. What is Y?

Answer & explanation

D. 0 — AND outputs 0 when either input is 0.

29. OR: A = 0, B = 1. What is Y?

Answer & explanation

C. 1 — OR outputs 1 when either input is 1.

30. Which are standard flowchart symbols?

Answer & explanation

D. All of these — All three are standard symbols.

Score: not graded

Section B — Written tasks (40 marks)

500 pens cost $2,500. Draw a flowchart to calculate the price of each pen. (15 marks)

Suggested answer

Start → Input total cost = 2500 and quantity = 500 → Calculate price = cost / quantity → Output $5 → Stop.

Draw a flowchart to calculate and print 50% of $500. (10 marks)

Suggested answer

Start → Input amount = 500 → Calculate result = amount × 0.50 → Output $250 → Stop.

Define a flowchart. (15 marks)

Suggested answer

A flowchart is a graphical representation of the steps of a process or algorithm using standard symbols connected by flowlines.

Written responses are self-assessed; the automatic score covers Section A only.