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.