Wednesday, 11 December 2013

~DIGITAL LOGIC~


Organization and Architecture???????

In describing computer system, a distinction is often made between computer architecture and computer organization.
Computer architecture refers to those attributes of a system visible to a programmer, or put another way, those attributes that have a direct impact on the logical execution of a program.
Computer organization refers to the operational units and their interconnection that realize the architecture specification.
Examples of architecture attributes include the instruction set, the number of bit to represent various data types (e.g.., numbers, and characters), I/O mechanisms, and technique for addressing memory.
"WE LOVE  COA"



1~AN INTRODUCTION TO DIGITAL LOGIC-SIGNALS AND GATE.


What Are You Going To Learn?
Logic Signals And Gates

AND
OR
NOT(Inverter)
NAND Wiring A Gate
A NAND Simulation



Introduction - Why Do You Want to Learn This Material?
        In this lesson you're going to be introduced to Digital Logic.  There are lots of reasons to learn digital logic.  Here are some of those reasons.
  • Digital logic is the foundation for digital computers.  If you want to understand the innards of computers you need to know digital logic.
  • Digital logic has relations to other kinds of logic including:
    • Formal logic - as taught by many philosophy departments
    • Fuzzy logic - a tool used to design control systems and many other systems.
    • So, in learning digital logic you learn something that helps you elsewhere.
  • For many students, learning digital logic is fun.
What Are You Going to Learn?
        There are at least two general areas you need to become familiar with.
  • First, there's background you need to know - the basics of digital logic - things like zeros and ones (0s and 1s) and how you can represent signals as sequences of zeroes and ones.  Eventually you will want to know how large arrays of zeroes and ones can be used in computer files to store information in pictures, documents, sounds and even movies and you'll want to learn about how information can be transmitted, between computers and digital signal sources.
  • You will also need to know things about digital circuits - gates, flip-flops and memory elements and others - so that you can eventually design circuits to manipulate digital signals.
  • Operations on Logic Signals
            Once we have the concept of a logic signal we can talk about operations that can be performed on logic signals.  Begin by assuming we have two logic signals, A and B.  Then assume that those two signals form an input set to some circuit that takes two logic signals as inputs, and has an output that is also a logic signal.  That situation is represented below.
           

  • The output, C, depends upon the inputs, A and B.  There are many different ways that C could depend upon A and B.  The output, C, is a function, - a logic function - of the inputs, A and B.  IWe will examine a few basic logic functions - ANDOR and NOT functions and start learning the circuitry that you use to implement those functions. 
  • Logic Gates
            If we think of two signals, A and B, as representing a truth value of two different propositions, then A could be either TRUE (a logical 1) or FALSE (a logical 0).  B can take on the same values.  Now consider a situation in which the output, C, is TRUE only when both A is TRUE and B is TRUE.  We can construct a truth table for this situation. In that truth table, we insert all of the possible combinations of inputs, A and B, and for every combination of A and B we list the output, C.


    ABC
    FalseFalseFalse
    FalseTrueFalse
    TrueFalseFalse
    TrueTrueTrue
    An AND Example
            Let's imagine a physician prescribing two drugs.  For some conditions drug A is prescribed, and for other conditions drug B is prescribed.  Taken separately each drug is safe.  When used together dangerous side effects are produced.
    Let
    • A = Truth of the statement "Drug 'A' is prescribed.".
    • B = Truth of the statement "Drug 'B' is prescribed.".
    • C = Truth of the statement "The patient is in danger.".
    Then, the truth table below shows when the patient is in danger. 
     

    ABC
    FalseFalseFalse
    FalseTrueFalse
    TrueFalseFalse
    TrueTrueTrue
    Notice that C is TRUE when both A AND B are true and only then! 

AND GATES
        An AND function can be implemented electrically using a device known as an AND gate.  You might imagine a system in which zero (0) is represented by zero (0) volts, and one (1) is represented by three (3) volts, for example.  If we are going to use electrical devices we need some sort of symbolic representation.  There is a standard symbol for an AND gate shown below.

        


OR Gates
        Consider a case where a pressure can be high and a temperature can be high Let's assume we have two sensors that measure temperature and pressure..  The first sensor has an output, T, that is 1 when a temperature in a boiler is too high, and 0 otherwise.  The second sensor produces an output, P, that is 1 when the pressure is too high, and 0 otherwise.  Now, for the boiler, we have a dangerous situation when either the temperature or the pressure is too high.  It only takes one.  Let's construct a truth table for this situation.  The output, D, is 1 when danger exists.


TPD
FalseFalseFalse
FalseTrueTrue
TrueFalseTrue
TrueTrueTrue
        What we have done is defined an OR gate.  An OR gate is a gate for which the output is 1 whenever one or more of the inputs is 1.  The output of an OR gate is 0 only when all inputs are 0.  Shown below is a schematic symbol for an OR gate, together with the simulated LEDs and input buttons so that you can explore OR gate behavior.
In terms of Boolean variables, the truth table for an OR gate looks like this.


ABC
000
011
101
111
NOT Gates (Inverters)
        A third important logical element is the inverter.  An inverter does pretty much what it says.  If the input is 0, the output is 1.  Conversely, if the input is 1, the output is 0. The symbol for an inverter is shown below.  Again, you can putter with this inverter with the simulated LEDs.  X is the input to the inverter.  The output is NOT-X represented as ~1 or:

        The truth table for an inverter is pretty simple since there is only one input.  Call the input A, and the output C, and the truth table is:

AC
01
10
NAND Gates
        There is another important kind of gate, the NAND gate.  Actually, the way to start thinking about a NAND gate is to think of it as an AND gate with an inverter on the output.  That's shown below.
Actually, however, the symbol for a NAND gate compresses the inverter down to a dot at the output of the NAND gate as shown.
Here is a simulated NAND gate.  Check it out.




ABC
001
011
101
110

TRY THIS!!!


BOOLEAN EQUATION FORMS

A Boolean algebra is the combinations of variable and operators.Typically,it has one or more inputs and produces an output in the range 0 and 1.The complement of a variable is by a bar over the letter.





SIMPLIFICATION OF BOOLEAN EQUATION



~LAWS OF BOOLEAN ALGEBRA-rule to simplify Boolean expression


Notation

The following notation is used for Boolean algebra on this page, which is the electrical engineering notation:
  • False: 0
  • True: 1
  • NOT x: x
  • x AND y: x · y
  • x OR y: x + y
  • x XOR y: xy
The precedence from high to low is AND, XOR, OR. Examples:
  • x + y · z means x + (y · z)
  • xy · z means x ⊕ (y · z)
  • x + yz means x + (yz)

Basic laws

Constants

  • NOT:
    • 0 = 1
    • 1 = 0
  • AND:
    • 0 · 0 = 0
    • 0 · 1 = 0
    • 1 · 0 = 0
    • 1 · 1 = 1
  • OR:
    • 0 + 0 = 0
    • 0 + 1 = 1
    • 1 + 0 = 1
    • 1 + 1 = 1
  • XOR:
    • 0 ⊕ 0 = 0
    • 0 ⊕ 1 = 1
    • 1 ⊕ 0 = 1
    • 1 ⊕ 1 = 0

Constant and variable

  • AND:
    • 0 · x = 0
    • 1 · x = x
  • OR:
    • 0 + x = x
    • 1 + x = 1
  • XOR:
    • 0 ⊕ x = x
    • 1 ⊕ x = x

One variable

  • NOT:
    • NOT x = x
  • AND:
    • x · x = x
    • x · x = 0
  • OR:
    • x + x = x
    • x + x = 1
  • XOR:
    • xx = 0
    • xx = 1

XOR

XOR can be defined in terms of AND, OR, NOT:
  • xy = (x · y) + (x · y)
  • xy = (x + y) · (x + y)
  • xy = (x + y) · (x · y)

Commutativity

  • AND: x · y = y · x
  • OR: x + y = y + x
  • XOR: xy = yx

Associativity

  • AND: (x · y) · z = x · (y · z)
  • OR: (x + y) + z = x + (y + z)
  • XOR: (xy) ⊕ z = x ⊕ (yz)

Distributivity

  • x · (y + z) = (x · y) + (x · z)
  • x + (y · z) = (x + y) · (x + z)
  • x · (yz) = (x · y) ⊕ (x · z)

De Morgan’s laws

  • NAND: x · y = x + y
  • NOR: x + y = x · y

Absorption

x + x · y = x
Proof: x + x · y
= x · 1 + x · y
= x · (1 + y)
= x · 1
= x
x · (x + y) = x
Proof: x · (x + y)
= (x + 0) · (x + y)
= x + (0 · y)
= x + 0
= x
 
~KARNAUGH MAP-a grid like representation og a truth table 


What Does a Karnaugh Map Look Like?
        A Karnaugh Map is a grid-like representation of a truth table.  It is really just another way of presenting a truth table, but the mode of presentation gives more insight.  A Karnaugh map has zero and one entries at different positions.  Each position in a grid corresponds to a truth table entry.  Here's an example taken from the voting circuit presented in the lesson on Minterms.  The truth table is shown first.  The Karnaugh Map for this truth table is shown after the truth table.
 

A
B
C
V
0
0
0
0
0
0
1
0
0
1
0
0
0
1
1
1
1
0
0
0
1
0
1
1
1
1
0
1
1
1
1
1
  
How Can a Karnaugh Map Help?
        At first, it might seem that the Karnaugh Map is just another way of presenting the information in a truth table.  In one way that's true.  However, any time you have the opportunity to use another way of looking at a problem advantages can accrue to you.  In the case of the Karnaugh Map the advantage is that the Karnaugh Map is designed to present the information in a way that allows easy grouping of terms that can be combined.
        Let's start by looking at the Karnaugh Map we've already encountered.  Look at two entries side by side.  We'll start by focussing on the ones shown below in gray.
        Let's examine the map again.
  • The term on the left in the gray area of the map corresponds to:
  • The term on the right in the gray area of the map corresponds to:
  • These two terms can be combined to give
        The beauty of the Karnaugh Map is that it has been cleverly designed so that any two adjacent cells in the map differ by a change in one variable.  It's always a change of one variable any time you cross a horizontal or vertical cell boundaries.  (It's not fair to go through the corners!)
 
Problem P1.   Here is a Karnaugh map with two entries.  Determine the product term represented by this map.



        Larger groups in Karnaugh Maps of any size can lead to greater simplification.  Let's consider the group shown shaded below.  There are four terms covered by the shaded area.

  • In the upper left:-

    • In the upper right;

    • In the lower left;

    • In the lower right;

            These terms can be combined (assuming they are all ones in the Karnaugh Map!).  The result is

  • By combining the first two terms above (the two terms at the top of the Karnaugh Map):-

    • By combining the last two terms above (the two terms at the bottom of the Karnaugh Map):-

    • Then, these two germs can be combined to give:

            Notice how making the grouping larger reduces the number of variables in the resulting terms.  That simplification helps when you start to connect gates to implement the function represented by a Karnaugh map.         By now you should have inferred the rules for getting the sum-of-products form from the Karnaugh map.
    • The number of ones in a group is a power of 2.  That's 2, 4, 8 etc.
    • If a variable takes on both values (0 and 1) for different entries (1s) in the Karnaugh Map, that variable will not be in the sum-of-products form.  Note that the variable should be one in half of the K-Map ones and it should be zero (inverted) in the other half.
    • If a variable is always 1 or always zero (it appears either inverted all the time in all entries that are one, or it is always not inverted) then that variable appears in that form in the sum-of-products form.
    •  AMIR IZZUDDIN BIN ABDULLAH
    • B031310085
           

    4 comments:

    1. smart, creative and inovative...
      nice and good job guys..:-)
      this really help me to finish my assignments..;-)
      keep it up..

      ReplyDelete
    2. usefull information . thanks.

      ReplyDelete