section 6 - programming Flashcards

1
Q

Logic Gates

A

Logic gates are special circuits built into computer chips. They receive binary data, apply a Boolean operation, then output a binary result.
Logic diagrams are often drawn to show logic gates and circuits. Each type of logic gate is shown by a different symbol.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Truth tables

A

Each type of logic gate also has a corresponding truth table.

Truth tables show all possible input combinations of 1s and 0s, and the corresponding outputs.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Not gate

A

1) NOT gates take a single input and give a single output.

2) The output is always the opposite value to the input. If 1 is input, it outputs 0. If O is input, it outputs 1.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

And gate

A

1) AND gates take two inputs and give one output.

2) If both inputs are 1, the output is 1, otherwise the output is 0.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Or gate

A

1) OR gates take two inputs and give one output.

2) If one or more inputs are 1, then the output is 1, otherwise the output is 0.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Multiple logic gates

A

Multiple logic gates can be added to the same logic circuit to carry out different operations.

You can work out the truth tables by working through each gate in order.

For every input combination, follow them through each gate step-by-step, then write down the output.

By using brackets and the terms AND, OR and NOT, circuits can be written as logical statements, like NOT(A AND B) below. Operations in brackets should be completed first, just like in normal maths.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

AND followed by NOT.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

OR followed by NOT.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

two-level logic circuits

A

they require the inputs to pass through a maximum of two logic gates to reach the output.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

two-level logic circuit with 3 inputs

A

Using Boolean operators, this circuit can be written as R = (A OR B) AND (NOT C). (This is an example of Boolean algebra).

To cover every input combination, extra rows are needed in the truth table. There are 3 inputs and each can take one of 2 values, so 2 x 2 x 2 = 8 rows are needed.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly