Presentation is loading. Please wait.

Presentation is loading. Please wait.

4. Computer Maths and Logic 4.2 Boolean Logic 4.2.4 Logic Circuits.

Similar presentations


Presentation on theme: "4. Computer Maths and Logic 4.2 Boolean Logic 4.2.4 Logic Circuits."— Presentation transcript:

1 4. Computer Maths and Logic 4.2 Boolean Logic 4.2.4 Logic Circuits

2 Logic gates Each logical operator is performed physically by a logic circuit (logic gate) ‏

3 NOT gate

4 AND gate

5 OR gate

6 NAND gate

7 NOR gate

8 XOR gate

9 Computers contain very large arrays of logic gates combined to form circuits such as adders, decoders or flip-flops. Boolean expressions are reduced to their simplest form before building these circuits Uses of logic gates

10 A simple AND gate can be used as a switch, one input is the control, the other the data - when the control is 0, output is always 0 (switch is off), when the control is 1, output is always the same as the data: Switches

11

12 A half adder takes two data inputs and adds them producing two outputs, the sum and the carry. This represents what happens in binary addition: 1 plus 1 is 0 carry 1. Half adder

13 1011 0101 0110 0000 CarrySumBA OutputsInputs

14 So in a half adder, the sum is A  B and the carry is A B The logic circuit is: Half adder

15

16 When adding binary numbers, the carry must be added to the next column on the left A full adder does this by putting together two half adders and an OR gate: Full adder

17

18 So a full adder takes three inputs (two data inputs and the previous carry input) and produces two outputs, the sum and the carry These can be cascaded to make parallel adders (i.e. adds multiple- bit numbers e.g. bytes, etc.) ‏ Full adder

19 Parallel adder

20 What does this do?

21 A circuit that is stable in one state until flipped into the other. Can act as memory cells i.e. retain a 0 or 1 until changed. Flip-flop


Download ppt "4. Computer Maths and Logic 4.2 Boolean Logic 4.2.4 Logic Circuits."

Similar presentations


Ads by Google