This Unit

Resources

Lecture Material

 

     Lecture Notes

Logic Functions

The combination of logic gates are used in the construction of logic circuits for binary addition.  Logic gates are AND, OR, NOT, NAND, NOR and XOR - exclusive OR.

Logic Gates

AND

OR

NOT

NAND

NOR

XOR

Combinations and Arithmetic

Combining Logic Gates

Binary Addition

Exercises


Logic Gates

    AND GATE

The AND gate produces a 1 only if both inputs are 1.  Otherwise a 0 is produced.

Have a look...

Here is part of a truth table for the AND gate:-

x

y

Q = (x.y)

0 0 0
0      
        
        

~Now try the activity~

Activity A

Fill in the rest of the AND truth table

    OR GATE

The OR gate produces a 1 if at least one input is 1.  Otherwise a 0 is produced.

Have a look...

Here is part of a truth table for the OR gate:-

x

y

Q = (x + y)

0 0 0
0      
        
        

~Now try the activity~

Activity B

Fill in the rest of the OR truth table

    NOT GATE

The NOT gate inverts an input so a 1 becomes a 0 and a 0 becomes a 1.

Have a look...

Here is part of a truth table for the NOT gate:-

x

Q = ( x )

0   
1   

~Now try the activity~

Activity C

Fill in the rest of the NOT truth table

    NAND GATE

The NAND gate produces outputs the inverse of those for the AND gate.

Have a look...

Here is part of a truth table for the NAND gate:-

x

y

Q = (x.y)

0 0 1
0      
          
            

~Now try the activity~

Activity D

Fill in the rest of the NAND truth table

    NOR GATE

The NOR gate produces outputs the inverse of those for the OR gate

Have a look...

Here is part of a truth table for the NOR gate:-

x

y

Q = (x+y)

0 0 1
0      
        
        

~Now try the activity~

Activity E

Fill in the rest of the NOR truth table

    XOR GATE

The XOR gate produces a 1 only if one input is 1.  Otherwise a 0 is produced.

Have a look...

Here is part of a truth table for the XOR gate:-

x

y

Q = (X.Y + X.Y)

0 0 0
0      
        
        

~Now try the activity~

Activity F

Fill in the rest of the XOR truth table

 


Combinations and Arithmetic

    Combining Logic Gates

Logic gates can be combined to form logic circuits.  Consider the combination of an OR gate and a NOT gate.

Here is part of a truth table for this circuit:-

A

B

A + B

A + B

0 0 0 1
0         
           
           

~Now try the activity~

Activity G

  1. Fill in the rest of the truth table above.

Which logic function does the circuit simulate - AND, OR, NOT, NAND, NOR or XOR?

  1. Draw two logic gates that simulate a NAND gate.

 

    Binary Addition

How can we use logic gates to carry out computer arithmetic?

Let's suppose we wish to add two binary digits X and Y.  Considering  the following table:-

X

Y

Carry

Sum

0 0 0 0
0 1 0 1
1 0 0 1
1 1 1 0

When we add two binary digits, we may get the result of 00, 01, or 10.  We can consider the left bit to be a carry bit.  Now consider the 0's and 1's as two signals.  We require two input signals and two output signals.  I.e.

How can we use gates to construct this half-adder. Consider the following circuit:-

This circuit simulates the sum operation where the two inputs are 0 and the output is 0.

Can this circuit be used to simulate the other three sum operations?  Try the activity and find out.

~Now try the activity~

Activity H

  1. Check the circuit above to see if it can be used to simulate the other three sum operations.

  2. Consider the inputs to a half-adder and the carry bit produced.  Which logic gate could be used to represent this operation?

 


Exercises

Now try the following.

Exercises

  1. Draw a truth table for the function Q1 =  X.Y.Z + X.Y.Z

  2. Draw a truth table for the function Q2 =  A.B.C + A.B.C + A.B.C + A.B.C

  3. Draw a truth table for the function Q2 . Q3 where Q3 = Q1Note: Q2 and Q2 are defined above

  4. Produce a truth table that defines the difference between two inputs X and Y. Hint: Consider the truth table for the sum operation.  This time though we need a difference column and a borrow column.

  5. Add a carry circuit to a sum circuit to produce a complete half-adder circuit.

        Question 1

 


That's it!!

 

 Site Home

Unit Home  

This Unit 

Unit Information

Overview

Assessment

Syllabus

Assignments

Scheme of Work

Resources

Information

Blackboard

Learning Center

Reading

Utilities

Links

Lecture Materials

Tutorials & Notes

Activities

Quizzes

Site Home Top Unit Home

ADR 2002