Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSCI 1412 Logic Gates Parminder Kang Home: Phones OFF Please.

Similar presentations


Presentation on theme: "CSCI 1412 Logic Gates Parminder Kang Home: Phones OFF Please."— Presentation transcript:

1 CSCI 1412 Logic Gates Parminder Kang Email: pkang@dmu.ac.uk Home: www.cse.dmu.ac.uk/~pkang Phones OFF Please

2 1.Basic Gates 1.1 AND gate: The AND operation is performed by the AND gate. Definition: For two integers A & B; if A AND B are equal to 1 then the result is 1. Otherwise the result is 0. The AND operation is represented by '.' (dot), although the dot is often omitted in logical expressions. We write: T=A.B (or T=AB), and say, 'T equals A and B'

3 The operation of the AND gate is described by the truth table: A B T 0 0 0 0 1 0 1 0 0 1 1 1

4 1.2 OR Gate: The OR operation is performed by the OR gate: Definition: For two integers A & B; if A OR B, OR both are equal to 1 then the result is 1. Otherwise the result is 0. The OR operation is represented by '+' We write: T=A+B, and say, 'T equals A or B'

5 The operation of the OR gate is described by the truth table: A B T 0 0 0 0 1 1 1 0 1 1 1 1

6 1.3 NOT Gate: The NOT operation is performed by the INVERTER (or NOT gate). The output of the inverter is the logical inverse of the input. We write: T=/A, and say, 'T equals not A'. The operation of the inverter is described by the truth table: A T 0 1 1 0

7 Inverters are often appended to AND and OR gates to produce NAND and NOR gates. ABAB T NAND Gate ABAB T NOR Gate

8 1.4 EXCLUSIVE-OR The EXCLUSIVE-OR operation is performed by the EXCLUSIVE-OR gate: Definition: For two integers A & B; if A OR B are different then the result is 1. Otherwise the result is 0. T=A B; 'T equals A exclusive or B' A B T 0 0 0 0 1 1 1 0 1 1 1 0

9 ABAB T The EX-OR is a luxury as we don't really need it and we can make it anyway from the other gates. EX-OR is very common so someone decided that we need special symbols for it.

10 2 Adder: an adder is a digital circuit that performs addition of numbers. In modern computers adders reside in the ALU where other operations are performed. 2.1 Half Adder: A half adder has two inputs, generally labelled A and B, and two outputs, the sum S and carry C.

11

12 2.1 Full Adder: A full adder is a logical circuit that performs an addition operation on three binary digits. The full adder produces a sum and carry value, which are both binary digits. InputOutput ABCinCoutS 0000111100001111 0011001100110011 0101010101010101 0001011100010111 0110100101101001

13


Download ppt "CSCI 1412 Logic Gates Parminder Kang Home: Phones OFF Please."

Similar presentations


Ads by Google