Back to 课程

Computer Science AS CIE

0% Complete
0/0 Steps
  1. data-representation as
    5 主题
  2. multimedia as
    3 主题
  3. compression as
    2 主题
  4. networks-and-the-internet as
    11 主题
  5. computers-and-components as
    5 主题
  6. logic-gates-and-logic-circuits as
    2 主题
  7. central-processing-unit-cpu-architecture as
    6 主题
  8. assembly-language- as
    4 主题
  9. bit-manipulation as
    1 主题
  10. operating-systems as
    3 主题
  11. language-translators as
    2 主题
  12. data-security as
    3 主题
  13. data-integrity as
    1 主题
  14. ethics-and-ownership as
    3 主题
  15. database-concepts as
    3 主题
  16. database-management-systems-dbms- as
    1 主题
  17. data-definition-language-ddl-and-data-manipulation-language-dml as
    1 主题
  18. computational-thinking-skills as
    1 主题
  19. algorithms as
    4 主题
  20. data-types-and-records as
    2 主题
  21. arrays as
    2 主题
  22. files as
    1 主题
  23. introduction-to-abstract-data-types-adt as
    1 主题
  24. programming-basics as
    1 主题
  25. constructs as
    2 主题
  26. structured-programming as
    1 主题
  27. program-development-life-cycle as
    1 主题
  28. program-design- as
    2 主题
  29. program-testing-and-maintenance as
    3 主题
课 Progress
0% Complete

Exam code:9618

From problem statements

  • A problem statement is typically a written interpretation of a scenario that requires a specific logical outcome

  • Logic circuits can be constructed using from problem statements

Worked Example

A server room has an automatic cooling fan (F)
The fan turns on based on the following input parameters:

Parameter

Description

Binary Value

Condition

T

Temperature

1 = Too high

0 = Acceptable

H

Humidity

1 = Too high

0 = Acceptable

M

Maintenance mode

1 = Active

0 = Inactive

D

Door sensor

1 = Door open

0 = Door closed

The fan (F = 1) turns on if:

  • The temperature is too high

  • AND humidity is too high

  • AND the door is closed

  • UNLESS maintenance mode is active (if maintenance is active, the fan must stay off)

Draw a logic circuit to represent how the fan (F) operates based on the input conditions. [3]

Answer

Logic circuit with three inputs: T and H to an AND gate, D and M to NOT gates, outputs combined through further AND gates, resulting in output F.
  • NOT gates on D and M inputs [1 mark]

  • AND gate combines T AND H or NOT D AND NOT M [1 mark]

  • Combines two previous AND outputs (e.g. (T AND H) AND (NOT D AND NOT M)) [1 mark]

From logic expressions

  • A logic expression is a way of showing how a logic circuit works using symbols and Boolean logic (AND, OR, NOT)

  • It describes the conditions that must be met for the output to be true (1) or false (0)

  • From a logic expression, a logic circuit and/or truth table can be constructed

Worked Example

A logic expression is given:

S = (A AND B AND C) OR (B XOR C)

(a) Draw the logic circuit for the given expression [4]

(b) Complete the truth table for the logic expression: [2]

S = (A AND B AND C) OR (B XOR C)

Answer

(a)

Logic circuit diagram with three inputs, A, B, and C, using two AND gates, two OR gates, and one NOT gate, producing output S.
  • Each correct gate [1 mark]

(b)

A

B

C

S

0

0

0

0

0

0

1

1

0

1

0

1

0

1

1

0

1

0

0

0

1

0

1

1

1

1

0

1

1

1

1

1

  • Rows 1 to 4 correct [1 mark]

  • Rows 5 to 8 correct [1 mark]

From truth tables

  • To create a truth table for the expression P = (A AND B) AND NOT C 

    • Calculate the numbers of rows needed (2number of inputs)

    • In this example there are 3 inputs (A, B, C) so a total of 8 rows are needed (23)

    • To not miss any combination of inputs, start with 000 and count up in 3-bit binary (0-7)

A

B

C

0

0

0

0

0

1

0

1

0

0

1

1

1

0

0

1

0

1

1

1

0

1

1

1

  • Add a new column to show the results of the brackets first (A AND B)

<td class=”border border-dark ContentBlock_tableC

A

B

C

A AND B

0

0

0

0

0

0

1

0

0

1

0

0

0

1

1

0

1

0

0

0

1

0

1

0

1

1

0

Responses

您的邮箱地址不会被公开。 必填项已用 * 标注